RE: struts tag extension for dynamic group level security

2005-01-25 Thread Prasad, Kamakshya
Hi,

I was thinking more, where we don't have to put this logic check for
each of the controls. Instead extend struts input tags having additional
properties/attributes where developer can specify the identifier of
access and then in a separate xml/db keep the mapping between the
identifier, input element and user group.

Regards,
KP

-Original Message-
From: Kishore Senji [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 26, 2005 2:33 PM
To: Struts Users Mailing List
Subject: Re: struts tag extension for dynamic group level security

How abt  ?


On Wed, 26 Jan 2005 14:01:51 +0900, Prasad, Kamakshya
<[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> Are there any struts tag extension available implementing the dynamic
> security?
> 
> We want to drill the security access to each input element fields.
> Further, the security groups are also dynamic. We are planning to use
> xml for storing the mapping.
> 
> Regards,
> 
> KP
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get the item of ArrayList?

2005-01-25 Thread Kishore Senji
On Wed, 26 Jan 2005 14:16:13 +0800, Daniel PC Leung <[EMAIL PROTECTED]> wrote:
> The error message looks like this.
> 
> [ServletException in:/layout/tabsLayout.jsp] java.util.ArrayList'
> 
> The tabsLayout.jsp file looks like this.
> (How can I solve it? Thanls)
> 
>  type="org.apache.struts.tiles.beans.MenuItem" >
> <%
>  String href = request.getRequestURI() + "?"+parameterName + "=" + index;
>  String color = notSelectedColor;
>  if( index == selectedIndex )
>{
>selectedBody = tab.getLink();
>color = selectedColor;
>}
>  index++;
> %>
>  
>

I guess the exception is thrown in the subsequent lines and it's
because you over wrote "tab" to the collection (tabList) in the above
line from it's initial assignment to each "item" in the collection
(tabList) exposed through the "id" attribute of the .
Removing the above  line should get rid of the exception;

>
>
>  
>  <%=tab.getValue()%> 
>  
>  
>   <%=tab.getValue()%> 
>  
>
>  
>  
>  
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Martin Wegner

I am looking for the:

http://blahblahblah.com:8080/AppName/

As Craig said I can get that if I have a Request object.  But from a
PlugIn I don't have that.  I can think of some ugly hacks but nothing
clean.


--Marty

--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> Do you want the URL or the Internet Protocol address?  I have some
> ideas on the latter.
> 
> Jack
> 
> 
> On Tue, 25 Jan 2005 21:05:30 -0800 (PST), Martin Wegner
> <[EMAIL PROTECTED]> wrote:
> > Jack,
> > 
> > That tells me where the JAR files are stored which is cool.  But what
> I am
> > looking for a valid URL (of which there may be many) to access my
> given
> > web application.  This info has to come from the container which may
> be
> > the problem.  I don't see anything in the container standard which
> > provides this info.
> > 
> > Any other ideas?
> > 
> > --Marty
> > 
> > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > 
> > > Not sure what you want.  Does this help?
> > >
> > > package whatever;
> > >
> > > import java.io.File;
> > > import java.net.URL;
> > >
> > > public final class Classpath {
> > >   public static final String SLASH= File.separator;
> > >   public static final String HERE =
> > > Classpath.class.getClassLoader().getResource("whatever" + SLASH +
> > >
> > > "Classpath.class").getFile();
> > > }
> > >
> > >
> > > On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > As far as I can tell the attributes offer no insight.  I have yet
> to
> > > find
> > > > a way to get to the container from within a PlugIn.  But I will
> keep
> > > > looking.  Using an initParam is not an option in this application.
> > > >
> > > > --Marty
> > > >
> > > > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > The OP was looking for a way to construct the entire path.  I
> too
> > > got as
> > > > >
> > > > > far as ServletContext, but I'm not sure what in it would give
> you
> > > that,
> > > > > or even all the pieces to constuct it... Maybe getAttribute()? 
> I'm
> > > not
> > > > > sure what it will return, although you can use
> getAttributeNames()
> > > to
> > > > > see.  The Javadocs indicates the attributes are
> container-specific
> > > > > though, so I'm not sure he'd want to use that anyway.
> > > > >
> > > > > This is just a matter of curiosity for me at this point, I long
> ago
> > > > > solved this problem another way.  I'd like to know how to do it
> > > though.
> > > > >
> > > > > --
> > > > > Frank W. Zammetti
> > > > > Founder and Chief Software Architect
> > > > > Omnytex Technologies
> > > > > http://www.omnytex.com
> > > > >
> > > > >
> > > > > Jim Barrows wrote:
> > > > > > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > >>I seem to remember trying to solve this problem myself and
> coming
> > > to
> > > > > the
> > > > > >>conclusion that there was no way to do it independent of a
> > > request.  I
> > > > > >>wound up just sticking it in my application config file that
> gets
> > > read
> > > > > >>in the plugin anyway.  Can anyone prove me wrong? :)
> > > > > >
> > > > > >
> > > > > > Your looking for the application context correct?
> > > > > > In the init you are passed the ActionServlet, which inherits
> from
> > > > > > HttpServlet, which will give you the ServletContext.  IIRC you
> can
> > > get
> > > > > > the context from there.
> > > > > >
> > > > > >
> > > > > >>--
> > > > > >>Frank W. Zammetti
> > > > > >>Founder and Chief Software Architect
> > > > > >>Omnytex Technologies
> > > > > >>http://www.omnytex.com
> > > > > >>
> > > > > >>Martin Wegner wrote:
> > > > > >>
> > > > > >>>In have a Struts PlugIn that needs to determine the URL for
> the
> > > > > containing
> > > > > >>>web application (http://localhost:8080/BlahBlahBlah/).  I am
> > > unable
> > > > > to
> > > > > >>>find a way to determine this information.  Any ideas?
> > > > > >>>
> > > > > >>>Thanks.
> > > > > >>>
> > > > > >>>
> > > > > >>>--Marty
> > > > > >>>
> > > > > >>>
> > > > >
> > >
> >>>-
> > > > > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>.
> > > > > >>>
> > > > > >>
> > > > >
> > >
> >>-
> > > > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Frank W. Zammetti
> > > > > Founder and Chief Software Architect
> > > > > Omnytex Technologies
> > > > > http://www.omnytex.com
> > > > >
> > > > >
> > > > >
> > >
> -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional comman

How to get the item of ArrayList?

2005-01-25 Thread Daniel PC Leung
The error message looks like this.

[ServletException in:/layout/tabsLayout.jsp] java.util.ArrayList'  

The tabsLayout.jsp file looks like this.
(How can I solve it? Thanls)



<% 
  String href = request.getRequestURI() + "?"+parameterName + "=" + index;
  String color = notSelectedColor;
  if( index == selectedIndex )
{
selectedBody = tab.getLink();
color = selectedColor;
} 
  index++;
%> 
  
 


  
  <%=tab.getValue()%> 
  
  
   <%=tab.getValue()%> 
  
  
  
  
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Dakota Jack
Do you want the URL or the Internet Protocol address?  I have some
ideas on the latter.

Jack


On Tue, 25 Jan 2005 21:05:30 -0800 (PST), Martin Wegner
<[EMAIL PROTECTED]> wrote:
> Jack,
> 
> That tells me where the JAR files are stored which is cool.  But what I am
> looking for a valid URL (of which there may be many) to access my given
> web application.  This info has to come from the container which may be
> the problem.  I don't see anything in the container standard which
> provides this info.
> 
> Any other ideas?
> 
> --Marty
> 
> --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> 
> > Not sure what you want.  Does this help?
> >
> > package whatever;
> >
> > import java.io.File;
> > import java.net.URL;
> >
> > public final class Classpath {
> >   public static final String SLASH= File.separator;
> >   public static final String HERE =
> > Classpath.class.getClassLoader().getResource("whatever" + SLASH +
> >
> > "Classpath.class").getFile();
> > }
> >
> >
> > On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > As far as I can tell the attributes offer no insight.  I have yet to
> > find
> > > a way to get to the container from within a PlugIn.  But I will keep
> > > looking.  Using an initParam is not an option in this application.
> > >
> > > --Marty
> > >
> > > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> > >
> > > > The OP was looking for a way to construct the entire path.  I too
> > got as
> > > >
> > > > far as ServletContext, but I'm not sure what in it would give you
> > that,
> > > > or even all the pieces to constuct it... Maybe getAttribute()?  I'm
> > not
> > > > sure what it will return, although you can use getAttributeNames()
> > to
> > > > see.  The Javadocs indicates the attributes are container-specific
> > > > though, so I'm not sure he'd want to use that anyway.
> > > >
> > > > This is just a matter of curiosity for me at this point, I long ago
> > > > solved this problem another way.  I'd like to know how to do it
> > though.
> > > >
> > > > --
> > > > Frank W. Zammetti
> > > > Founder and Chief Software Architect
> > > > Omnytex Technologies
> > > > http://www.omnytex.com
> > > >
> > > >
> > > > Jim Barrows wrote:
> > > > > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>I seem to remember trying to solve this problem myself and coming
> > to
> > > > the
> > > > >>conclusion that there was no way to do it independent of a
> > request.  I
> > > > >>wound up just sticking it in my application config file that gets
> > read
> > > > >>in the plugin anyway.  Can anyone prove me wrong? :)
> > > > >
> > > > >
> > > > > Your looking for the application context correct?
> > > > > In the init you are passed the ActionServlet, which inherits from
> > > > > HttpServlet, which will give you the ServletContext.  IIRC you can
> > get
> > > > > the context from there.
> > > > >
> > > > >
> > > > >>--
> > > > >>Frank W. Zammetti
> > > > >>Founder and Chief Software Architect
> > > > >>Omnytex Technologies
> > > > >>http://www.omnytex.com
> > > > >>
> > > > >>Martin Wegner wrote:
> > > > >>
> > > > >>>In have a Struts PlugIn that needs to determine the URL for the
> > > > containing
> > > > >>>web application (http://localhost:8080/BlahBlahBlah/).  I am
> > unable
> > > > to
> > > > >>>find a way to determine this information.  Any ideas?
> > > > >>>
> > > > >>>Thanks.
> > > > >>>
> > > > >>>
> > > > >>>--Marty
> > > > >>>
> > > > >>>
> > > >
> > >>>-
> > > > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>.
> > > > >>>
> > > > >>
> > > >
> > >>-
> > > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Frank W. Zammetti
> > > > Founder and Chief Software Architect
> > > > Omnytex Technologies
> > > > http://www.omnytex.com
> > > >
> > > >
> > > >
> > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > --
> >
> > "You can lead a horse to water but you cannot make it float on its
> > back."
> >
> > ~Dakota Jack~
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
> > crows."
> >
> > ~Hunkesni

Re: struts tag extension for dynamic group level security

2005-01-25 Thread Kishore Senji
How abt  ?


On Wed, 26 Jan 2005 14:01:51 +0900, Prasad, Kamakshya
<[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> Are there any struts tag extension available implementing the dynamic
> security?
> 
> We want to drill the security access to each input element fields.
> Further, the security groups are also dynamic. We are planning to use
> xml for storing the mapping.
> 
> Regards,
> 
> KP
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Craig McClanahan
On Tue, 25 Jan 2005 21:05:30 -0800 (PST), Martin Wegner
<[EMAIL PROTECTED]> wrote:
> Jack,
> 
> That tells me where the JAR files are stored which is cool.  But what I am
> looking for a valid URL (of which there may be many) to access my given
> web application.  This info has to come from the container which may be
> the problem.  I don't see anything in the container standard which
> provides this info.

You can calculate what you need from an HttpServletRequest (scheme +
serverName + serverPort + contextPath), but there is no way to
determine this information in a PlugIn's init() method, which is in
turn called from a servlet's init() method.

> 
> Any other ideas?
> 
> --Marty
> 

Craig


> --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> 
> > Not sure what you want.  Does this help?
> >
> > package whatever;
> >
> > import java.io.File;
> > import java.net.URL;
> >
> > public final class Classpath {
> >   public static final String SLASH= File.separator;
> >   public static final String HERE =
> > Classpath.class.getClassLoader().getResource("whatever" + SLASH +
> >
> > "Classpath.class").getFile();
> > }
> >
> >
> > On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > As far as I can tell the attributes offer no insight.  I have yet to
> > find
> > > a way to get to the container from within a PlugIn.  But I will keep
> > > looking.  Using an initParam is not an option in this application.
> > >
> > > --Marty
> > >
> > > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> > >
> > > > The OP was looking for a way to construct the entire path.  I too
> > got as
> > > >
> > > > far as ServletContext, but I'm not sure what in it would give you
> > that,
> > > > or even all the pieces to constuct it... Maybe getAttribute()?  I'm
> > not
> > > > sure what it will return, although you can use getAttributeNames()
> > to
> > > > see.  The Javadocs indicates the attributes are container-specific
> > > > though, so I'm not sure he'd want to use that anyway.
> > > >
> > > > This is just a matter of curiosity for me at this point, I long ago
> > > > solved this problem another way.  I'd like to know how to do it
> > though.
> > > >
> > > > --
> > > > Frank W. Zammetti
> > > > Founder and Chief Software Architect
> > > > Omnytex Technologies
> > > > http://www.omnytex.com
> > > >
> > > >
> > > > Jim Barrows wrote:
> > > > > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>I seem to remember trying to solve this problem myself and coming
> > to
> > > > the
> > > > >>conclusion that there was no way to do it independent of a
> > request.  I
> > > > >>wound up just sticking it in my application config file that gets
> > read
> > > > >>in the plugin anyway.  Can anyone prove me wrong? :)
> > > > >
> > > > >
> > > > > Your looking for the application context correct?
> > > > > In the init you are passed the ActionServlet, which inherits from
> > > > > HttpServlet, which will give you the ServletContext.  IIRC you can
> > get
> > > > > the context from there.
> > > > >
> > > > >
> > > > >>--
> > > > >>Frank W. Zammetti
> > > > >>Founder and Chief Software Architect
> > > > >>Omnytex Technologies
> > > > >>http://www.omnytex.com
> > > > >>
> > > > >>Martin Wegner wrote:
> > > > >>
> > > > >>>In have a Struts PlugIn that needs to determine the URL for the
> > > > containing
> > > > >>>web application (http://localhost:8080/BlahBlahBlah/).  I am
> > unable
> > > > to
> > > > >>>find a way to determine this information.  Any ideas?
> > > > >>>
> > > > >>>Thanks.
> > > > >>>
> > > > >>>
> > > > >>>--Marty
> > > > >>>
> > > > >>>
> > > >
> > >>>-
> > > > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>.
> > > > >>>
> > > > >>
> > > >
> > >>-
> > > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Frank W. Zammetti
> > > > Founder and Chief Software Architect
> > > > Omnytex Technologies
> > > > http://www.omnytex.com
> > > >
> > > >
> > > >
> > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > --
> >
> > "You can lead a horse to water but you cannot make it float on its
> > back."
> >
> > ~Dakota Jack~
> >
> > "You can't wake a person who i

Re: PlugIn and the base URL

2005-01-25 Thread Martin Wegner
Jack,

That tells me where the JAR files are stored which is cool.  But what I am
looking for a valid URL (of which there may be many) to access my given
web application.  This info has to come from the container which may be
the problem.  I don't see anything in the container standard which
provides this info.

Any other ideas?


--Marty

--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> Not sure what you want.  Does this help?
> 
> package whatever;
> 
> import java.io.File;
> import java.net.URL;
> 
> public final class Classpath {
>   public static final String SLASH= File.separator;
>   public static final String HERE =
> Classpath.class.getClassLoader().getResource("whatever" + SLASH +
>  
> "Classpath.class").getFile();
> }
> 
> 
> On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
> <[EMAIL PROTECTED]> wrote:
> > 
> > As far as I can tell the attributes offer no insight.  I have yet to
> find
> > a way to get to the container from within a PlugIn.  But I will keep
> > looking.  Using an initParam is not an option in this application.
> > 
> > --Marty
> > 
> > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> > 
> > > The OP was looking for a way to construct the entire path.  I too
> got as
> > >
> > > far as ServletContext, but I'm not sure what in it would give you
> that,
> > > or even all the pieces to constuct it... Maybe getAttribute()?  I'm
> not
> > > sure what it will return, although you can use getAttributeNames()
> to
> > > see.  The Javadocs indicates the attributes are container-specific
> > > though, so I'm not sure he'd want to use that anyway.
> > >
> > > This is just a matter of curiosity for me at this point, I long ago
> > > solved this problem another way.  I'd like to know how to do it
> though.
> > >
> > > --
> > > Frank W. Zammetti
> > > Founder and Chief Software Architect
> > > Omnytex Technologies
> > > http://www.omnytex.com
> > >
> > >
> > > Jim Barrows wrote:
> > > > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>I seem to remember trying to solve this problem myself and coming
> to
> > > the
> > > >>conclusion that there was no way to do it independent of a
> request.  I
> > > >>wound up just sticking it in my application config file that gets
> read
> > > >>in the plugin anyway.  Can anyone prove me wrong? :)
> > > >
> > > >
> > > > Your looking for the application context correct?
> > > > In the init you are passed the ActionServlet, which inherits from
> > > > HttpServlet, which will give you the ServletContext.  IIRC you can
> get
> > > > the context from there.
> > > >
> > > >
> > > >>--
> > > >>Frank W. Zammetti
> > > >>Founder and Chief Software Architect
> > > >>Omnytex Technologies
> > > >>http://www.omnytex.com
> > > >>
> > > >>Martin Wegner wrote:
> > > >>
> > > >>>In have a Struts PlugIn that needs to determine the URL for the
> > > containing
> > > >>>web application (http://localhost:8080/BlahBlahBlah/).  I am
> unable
> > > to
> > > >>>find a way to determine this information.  Any ideas?
> > > >>>
> > > >>>Thanks.
> > > >>>
> > > >>>
> > > >>>--Marty
> > > >>>
> > > >>>
> > >
> >>>-
> > > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>.
> > > >>>
> > > >>
> > >
> >>-
> > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > >
> > > --
> > > Frank W. Zammetti
> > > Founder and Chief Software Architect
> > > Omnytex Technologies
> > > http://www.omnytex.com
> > >
> > >
> > >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> --
> 
> "You can lead a horse to water but you cannot make it float on its
> back."
> 
> ~Dakota Jack~
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be
> crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---
> 
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based
> on this message or any information herein. If you have received this
> message in error, please advise the sender

struts tag extension for dynamic group level security

2005-01-25 Thread Prasad, Kamakshya
Hi All,

 

Are there any struts tag extension available implementing the dynamic
security? 

We want to drill the security access to each input element fields.
Further, the security groups are also dynamic. We are planning to use
xml for storing the mapping.

 

Regards,

KP

 



Re: PlugIn and the base URL

2005-01-25 Thread Frank W. Zammetti
That is actually useful, but I don't think it's what the OP was looking 
for... I think he literally wants the complete URL to the current 
webapp's root.  That's what I was looking for way back when too.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Dakota Jack wrote:
Not sure what you want.  Does this help?
package whatever;
import java.io.File;
import java.net.URL;
public final class Classpath {
  public static final String SLASH= File.separator;
  public static final String HERE =
Classpath.class.getClassLoader().getResource("whatever" + SLASH +
 
"Classpath.class").getFile();
}

On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
<[EMAIL PROTECTED]> wrote:
As far as I can tell the attributes offer no insight.  I have yet to find
a way to get to the container from within a PlugIn.  But I will keep
looking.  Using an initParam is not an option in this application.
--Marty
--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

The OP was looking for a way to construct the entire path.  I too got as
far as ServletContext, but I'm not sure what in it would give you that,
or even all the pieces to constuct it... Maybe getAttribute()?  I'm not
sure what it will return, although you can use getAttributeNames() to
see.  The Javadocs indicates the attributes are container-specific
though, so I'm not sure he'd want to use that anyway.
This is just a matter of curiosity for me at this point, I long ago
solved this problem another way.  I'd like to know how to do it though.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Jim Barrows wrote:
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:

I seem to remember trying to solve this problem myself and coming to
the
conclusion that there was no way to do it independent of a request.  I
wound up just sticking it in my application config file that gets read
in the plugin anyway.  Can anyone prove me wrong? :)

Your looking for the application context correct?
In the init you are passed the ActionServlet, which inherits from
HttpServlet, which will give you the ServletContext.  IIRC you can get
the context from there.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Martin Wegner wrote:

In have a Struts PlugIn that needs to determine the URL for the
containing
web application (http://localhost:8080/BlahBlahBlah/).  I am unable
to
find a way to determine this information.  Any ideas?
Thanks.
--Marty
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: PlugIn and the base URL

2005-01-25 Thread Dakota Jack
Not sure what you want.  Does this help?

package whatever;

import java.io.File;
import java.net.URL;

public final class Classpath {
  public static final String SLASH= File.separator;
  public static final String HERE =
Classpath.class.getClassLoader().getResource("whatever" + SLASH +
 
"Classpath.class").getFile();
}


On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner
<[EMAIL PROTECTED]> wrote:
> 
> As far as I can tell the attributes offer no insight.  I have yet to find
> a way to get to the container from within a PlugIn.  But I will keep
> looking.  Using an initParam is not an option in this application.
> 
> --Marty
> 
> --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> 
> > The OP was looking for a way to construct the entire path.  I too got as
> >
> > far as ServletContext, but I'm not sure what in it would give you that,
> > or even all the pieces to constuct it... Maybe getAttribute()?  I'm not
> > sure what it will return, although you can use getAttributeNames() to
> > see.  The Javadocs indicates the attributes are container-specific
> > though, so I'm not sure he'd want to use that anyway.
> >
> > This is just a matter of curiosity for me at this point, I long ago
> > solved this problem another way.  I'd like to know how to do it though.
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> >
> > Jim Barrows wrote:
> > > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > >>I seem to remember trying to solve this problem myself and coming to
> > the
> > >>conclusion that there was no way to do it independent of a request.  I
> > >>wound up just sticking it in my application config file that gets read
> > >>in the plugin anyway.  Can anyone prove me wrong? :)
> > >
> > >
> > > Your looking for the application context correct?
> > > In the init you are passed the ActionServlet, which inherits from
> > > HttpServlet, which will give you the ServletContext.  IIRC you can get
> > > the context from there.
> > >
> > >
> > >>--
> > >>Frank W. Zammetti
> > >>Founder and Chief Software Architect
> > >>Omnytex Technologies
> > >>http://www.omnytex.com
> > >>
> > >>Martin Wegner wrote:
> > >>
> > >>>In have a Struts PlugIn that needs to determine the URL for the
> > containing
> > >>>web application (http://localhost:8080/BlahBlahBlah/).  I am unable
> > to
> > >>>find a way to determine this information.  Any ideas?
> > >>>
> > >>>Thanks.
> > >>>
> > >>>
> > >>>--Marty
> > >>>
> > >>>
> > >>>-
> > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>.
> > >>>
> > >>
> > >>-
> > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> > >
> > >
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
--

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] a design question

2005-01-25 Thread Eddie Bush
I tend to follow the JavaBeans conventions:

public class GetData {
  private String param1;
  private String param2;

  public GetData() {
  }

  public GetData(String param1, String param2) {
setParam1(param1);
setParam2(param2);
  }

  public String getParam1() {
return param1;
  }

  public void setParam1(String param1) {
this.param1 = param1;
  }

  public String getParam2() {
return param2;
  }

  public void setParam2(String param2) {
this.param2 = param2;
  }
}

Note that the singleton pattern has nothing to do with the way you
pass parameters.  An object being a singleton means that there may
never be more than one object of that type, and that you're guaranteed
there never will be more than one object of that type.  See GoF.

Note that, to follow JavaBean conventions, if you specify a
constructor that has parameters, you'll have to also specify one that
does not.  The no-args constructor allows the class to be dynamically
instantiated.  Following the JavaBean convention for properties, each
property should have its own get/set method.

I personally like this approach better because I can create them
dynamically and set their properties dynamically.  I get a lot of
milage out of beans by doing this.

I didn't really see a question?  Is your question how to best write
the class?  Well, you've got my 2 cents.

Good Luck,

Eddie

On Tue, 25 Jan 2005 13:57:09 -0800 (PST), Ashish Kulkarni
<[EMAIL PROTECTED]> wrote:
> Hi
> Suppose i have a class, which required 3 parameters to
> do some process, out of 3 parameters 2 are standard
> and only one changes depending upon the process.
> I dont want to hard code those 2 values since these
> can be change (this is not a web application so i
> cannot use session)
> What i want to do is create one instance of this class
> with the constant parameters setup,
> So a sort of Singleton pattern,
> This class will have no knowledge to read those 2
> parameters, and have to be supplied by some other
> class
> 
> How will be design this class,
> 
> my class example
> public class GetData
> {
>  private String parm1, parm2;
>  public GetData(String parm1, String parm2)
>   {
> this.parm1 = parm1;
> this.parm2 = parm2;
>   }
> 
>  public void doSomeThing(String parm3)
>   {
>// do some logic here
>   }
> 
> }
> 
> ashish

-- 
Eddie Bush

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Martin Wegner

As far as I can tell the attributes offer no insight.  I have yet to find
a way to get to the container from within a PlugIn.  But I will keep
looking.  Using an initParam is not an option in this application.


--Marty

--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> The OP was looking for a way to construct the entire path.  I too got as
> 
> far as ServletContext, but I'm not sure what in it would give you that, 
> or even all the pieces to constuct it... Maybe getAttribute()?  I'm not 
> sure what it will return, although you can use getAttributeNames() to 
> see.  The Javadocs indicates the attributes are container-specific 
> though, so I'm not sure he'd want to use that anyway.
> 
> This is just a matter of curiosity for me at this point, I long ago 
> solved this problem another way.  I'd like to know how to do it though.
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> Jim Barrows wrote:
> > On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
> > <[EMAIL PROTECTED]> wrote:
> > 
> >>I seem to remember trying to solve this problem myself and coming to
> the
> >>conclusion that there was no way to do it independent of a request.  I
> >>wound up just sticking it in my application config file that gets read
> >>in the plugin anyway.  Can anyone prove me wrong? :)
> > 
> > 
> > Your looking for the application context correct?
> > In the init you are passed the ActionServlet, which inherits from
> > HttpServlet, which will give you the ServletContext.  IIRC you can get
> > the context from there.
> > 
> > 
> >>--
> >>Frank W. Zammetti
> >>Founder and Chief Software Architect
> >>Omnytex Technologies
> >>http://www.omnytex.com
> >>
> >>Martin Wegner wrote:
> >>
> >>>In have a Struts PlugIn that needs to determine the URL for the
> containing
> >>>web application (http://localhost:8080/BlahBlahBlah/).  I am unable
> to
> >>>find a way to determine this information.  Any ideas?
> >>>
> >>>Thanks.
> >>>
> >>>
> >>>--Marty
> >>>
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>>.
> >>>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Niall Pemberton
Thanks Kishore, also good points which I've also added to that page:

 http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html

Niall

- Original Message - 
From: "Kishore Senji" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, January 26, 2005 1:07 AM
Subject: Re: OT - Evaulating JSP as internal template?


> Not anything new, but we can also increase the buffer size
>
> <%@ page buffer="10kb" autoFlush="false" %><%@ taglib
> uri="/WEB-INF/struts-bean.tld"  prefix="bean"  %> id="emailStuff" toScope="request">
>
>   
>  
>  
>  
>  
>   
>
>
>
>
> Also, if you define your action to extend IncludeAction, then by
> having the path to template in the "parameter"
> you could have the call to RequestDispatcher delegated to
> IncludeAction like so :
>
> public ActionForward execute(ActionMapping mapping,
>  ActionForm form,
>  HttpServletRequest request,
>  HttpServletResponse response) throws
Exception {
>
> // Set up attributes used by the template
> request.setAttribute("emailHeading", "Test Heading");
> request.setAttribute("emailBody", "This is some body text");
>
> super.execute(mapping, form, request, response); // generate email
>
> // Get the generated email from the request attribute
> String emailStuff = (String)request.getAttribute("emailStuff");
>
> // ...send the email
>
> // forward to appropriate page
> return mapping.findForward("success");
>
> }
>
>
>
>
>
> On Tue, 25 Jan 2005 19:00:35 -, Niall Pemberton
> <[EMAIL PROTECTED]> wrote:
> > Good points Kris,
> >
> > hope you don't mind, but I added your comments to the page I set up
> > (although I slightly modified the whitespace *hack*).
> >
> > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> >
> > Niall
> >
> > - Original Message -
> > From: "Kris Schneider" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> >
> > Sent: Tuesday, January 25, 2005 4:32 PM
> > Subject: Re: OT - Evaulating JSP as internal template?
> >
> > > For the paranoid, you probably want to be sure that the email template
> > > ("EmailTestTemplate.jsp") doesn't actually produce any output. Because
> > you're
> > > doing an include followed by a forward, there's a *possibility* that
the
> > > forward will throw an IllegalStateException if the include causes the
> > response
> > > to be committed. You can use one of the various JSP whitespace "hacks"
to
> > > help:
> > >
> > > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"
%><%--
> > >
> > > --%>
> > >   ...
> > > 
> > >
> > > Obviously, the example is unlikely to cause a problem, but a more
involved
> > page
> > > might.
> > >
> > > Another approach might be to pass an HttpServletResponseWrapper to the
> > include
> > > method whose output stream (or writer) just buffers the entire
response
> > for
> > > later retrieval.
> > >
> > > Quoting Niall Pemberton <[EMAIL PROTECTED]>:
> > >
> > > > You can do this easily using the  tag and the
> > > > RequestDispatcher. I've put a page up on my web site showing how:
> > > >
> > > > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> > > >
> > > > I believe the RequestDispatcher is the "magic" JSP processor you're
> > looking
> > > > for.
> > > >
> > > > Niall
> > > >
> > > > - Original Message -
> > > > From: "William Stranathan" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" 
> > > > Sent: Tuesday, January 25, 2005 11:00 AM
> > > > Subject: OT - Evaulating JSP as internal template?
> > > >
> > > >
> > > > > The subject is prolly a poor way to say what I'm trying to say
> > > > >
> > > > > Does anybody know of a simple way to use JSP as an INTERNAL
templating
> > > > > engine.  For example, if I have a struts application where I'm
> > > > > generating an email to send, I currently have to use Velocity on
the
> > > > > server side to put the values into the template, then send that.
> > > > >
> > > > > Is there a simple way to do the same with JSP?  Would I be best
served
> > > > > by on the server side, constructing an HTTP request to a JSP that
> > simply
> > > > > pops in the request attributes into the correc place?
> > > > >
> > > > > High-level of what I want to do:
> > > > >
> > > > > ActionForward execute(mapping, form, request, response) {
> > > > >MyForm myform = (MyForm)form;
> > > > >
> > > > >Hashtable vals = new Hashtable();
> > > > >vals.put("user",form.getUser());
> > > > >vals.put("car",form.getCar());
> > > > >
> > > > >JSPProcessor proc = new JSPProcessor();
> > > > >proc.getRequestScope().put("values",vals);
> > > > >StringBuffer buff =
proc.evaluate("WEB-INF/templates/email.jsp");
> > > > >
> > > > >MailUtils.mail("[EMAIL PROTECTED]",buff);
> > > > > }
> > > > >
> > > > > Where JSPProcessor is the kind of magic I'm l

Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Kishore Senji
Not anything new, but we can also increase the buffer size

<%@ page buffer="10kb" autoFlush="false" %><%@ taglib
uri="/WEB-INF/struts-bean.tld"  prefix="bean"  %>

  
 
 
 
 
  

   


Also, if you define your action to extend IncludeAction, then by
having the path to template in the "parameter"
you could have the call to RequestDispatcher delegated to
IncludeAction like so :

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response) throws Exception {

// Set up attributes used by the template
request.setAttribute("emailHeading", "Test Heading");
request.setAttribute("emailBody", "This is some body text");

super.execute(mapping, form, request, response); // generate email

// Get the generated email from the request attribute
String emailStuff = (String)request.getAttribute("emailStuff");

// ...send the email

// forward to appropriate page
return mapping.findForward("success");

}





On Tue, 25 Jan 2005 19:00:35 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> Good points Kris,
> 
> hope you don't mind, but I added your comments to the page I set up
> (although I slightly modified the whitespace *hack*).
> 
> http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> 
> Niall
> 
> - Original Message -
> From: "Kris Schneider" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> 
> Sent: Tuesday, January 25, 2005 4:32 PM
> Subject: Re: OT - Evaulating JSP as internal template?
> 
> > For the paranoid, you probably want to be sure that the email template
> > ("EmailTestTemplate.jsp") doesn't actually produce any output. Because
> you're
> > doing an include followed by a forward, there's a *possibility* that the
> > forward will throw an IllegalStateException if the include causes the
> response
> > to be committed. You can use one of the various JSP whitespace "hacks" to
> > help:
> >
> > <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %><%--
> >
> > --%>
> >   ...
> > 
> >
> > Obviously, the example is unlikely to cause a problem, but a more involved
> page
> > might.
> >
> > Another approach might be to pass an HttpServletResponseWrapper to the
> include
> > method whose output stream (or writer) just buffers the entire response
> for
> > later retrieval.
> >
> > Quoting Niall Pemberton <[EMAIL PROTECTED]>:
> >
> > > You can do this easily using the  tag and the
> > > RequestDispatcher. I've put a page up on my web site showing how:
> > >
> > > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> > >
> > > I believe the RequestDispatcher is the "magic" JSP processor you're
> looking
> > > for.
> > >
> > > Niall
> > >
> > > - Original Message -
> > > From: "William Stranathan" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Tuesday, January 25, 2005 11:00 AM
> > > Subject: OT - Evaulating JSP as internal template?
> > >
> > >
> > > > The subject is prolly a poor way to say what I'm trying to say
> > > >
> > > > Does anybody know of a simple way to use JSP as an INTERNAL templating
> > > > engine.  For example, if I have a struts application where I'm
> > > > generating an email to send, I currently have to use Velocity on the
> > > > server side to put the values into the template, then send that.
> > > >
> > > > Is there a simple way to do the same with JSP?  Would I be best served
> > > > by on the server side, constructing an HTTP request to a JSP that
> simply
> > > > pops in the request attributes into the correc place?
> > > >
> > > > High-level of what I want to do:
> > > >
> > > > ActionForward execute(mapping, form, request, response) {
> > > >MyForm myform = (MyForm)form;
> > > >
> > > >Hashtable vals = new Hashtable();
> > > >vals.put("user",form.getUser());
> > > >vals.put("car",form.getCar());
> > > >
> > > >JSPProcessor proc = new JSPProcessor();
> > > >proc.getRequestScope().put("values",vals);
> > > >StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");
> > > >
> > > >MailUtils.mail("[EMAIL PROTECTED]",buff);
> > > > }
> > > >
> > > > Where JSPProcessor is the kind of magic I'm looking for.  I don't
> really
> > > > see anything built into the API spec, so I SUSPECT if there were
> > > > anything available in Tomcat, for instance, it would be implementation
> > > > specific.
> > > >
> > > > Not a HUGE deal, but it's kinda' a pain to have to train new folks on
> > > > how to put together the JSP's AND how to put together the velocity
> > > > templates.
> > > >
> > > > Thanks,
> > > > Will
> >
> > --
> > Kris Schneider 
> > D.O.Tech   
> >
> > -

Re: html:select drop downs using LabelValueBean

2005-01-25 Thread Wendy Smoak
From: "Justin Moore" <[EMAIL PROTECTED]>
> I am havnig problems with the LabelValueBean in a drop down that is
suppose to show the months.
>   I need to display the labels as strings (ex: Jan, Feb, etc).  I need to
display their respective values
>  as ordinals.  When executing the code below, a JSP exception is thrown,
tellinng me:
>  "cannot find bean under name months".  Any idea what I am doing
incorrectly?
> 
> 
> 


I would leave the JSP as you have it, and move the ArrayList creation to a
ContextListener, placing 'months' in application scope.  It's not as though
the list of months is going to change, doing all that object creation every
time a page is displayed is not necessary.

If you're going to leave it in the form, try property="months" instead of
collection="months".  Check the docs, assuming your  is
surrounded by an  tag, it should call getMonths on the form bean.
IIRC, the collection attribute will make it go hunting in
page|request|session|application scope for something with that name.

-- 
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to determine machine name in a plug-in

2005-01-25 Thread Barnett, Brian W.
Can someone tell me how to determine the machine name of the server from
inside the init() method of a plug-in? It looks like I have an ActionServlet
object and a ModuleConfig object at my disposal.

Thank you,
Brian Barnett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Frank W. Zammetti
The OP was looking for a way to construct the entire path.  I too got as 
far as ServletContext, but I'm not sure what in it would give you that, 
or even all the pieces to constuct it... Maybe getAttribute()?  I'm not 
sure what it will return, although you can use getAttributeNames() to 
see.  The Javadocs indicates the attributes are container-specific 
though, so I'm not sure he'd want to use that anyway.

This is just a matter of curiosity for me at this point, I long ago 
solved this problem another way.  I'd like to know how to do it though.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Jim Barrows wrote:
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
I seem to remember trying to solve this problem myself and coming to the
conclusion that there was no way to do it independent of a request.  I
wound up just sticking it in my application config file that gets read
in the plugin anyway.  Can anyone prove me wrong? :)

Your looking for the application context correct?
In the init you are passed the ActionServlet, which inherits from
HttpServlet, which will give you the ServletContext.  IIRC you can get
the context from there.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Martin Wegner wrote:
In have a Struts PlugIn that needs to determine the URL for the containing
web application (http://localhost:8080/BlahBlahBlah/).  I am unable to
find a way to determine this information.  Any ideas?
Thanks.
--Marty
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: PlugIn and the base URL

2005-01-25 Thread Jim Barrows
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> I seem to remember trying to solve this problem myself and coming to the
> conclusion that there was no way to do it independent of a request.  I
> wound up just sticking it in my application config file that gets read
> in the plugin anyway.  Can anyone prove me wrong? :)

Your looking for the application context correct?
In the init you are passed the ActionServlet, which inherits from
HttpServlet, which will give you the ServletContext.  IIRC you can get
the context from there.

> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> Martin Wegner wrote:
> > In have a Struts PlugIn that needs to determine the URL for the containing
> > web application (http://localhost:8080/BlahBlahBlah/).  I am unable to
> > find a way to determine this information.  Any ideas?
> >
> > Thanks.
> >
> >
> > --Marty
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > .
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
James A Barrows

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Hubert Rabago
I'm not entirely sure, but I think Struts itself has some code that
goes through some length to get information like this.  Could be in
the Struts ActionServlet object.  I don't have time to check right
now, though.

On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> I seem to remember trying to solve this problem myself and coming to the
> conclusion that there was no way to do it independent of a request.  I
> wound up just sticking it in my application config file that gets read
> in the plugin anyway.  Can anyone prove me wrong? :)
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> Martin Wegner wrote:
> > In have a Struts PlugIn that needs to determine the URL for the containing
> > web application (http://localhost:8080/BlahBlahBlah/).  I am unable to
> > find a way to determine this information.  Any ideas?
> >
> > Thanks.
> >
> >
> > --Marty
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > .
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PlugIn and the base URL

2005-01-25 Thread Frank W. Zammetti
I seem to remember trying to solve this problem myself and coming to the 
conclusion that there was no way to do it independent of a request.  I 
wound up just sticking it in my application config file that gets read 
in the plugin anyway.  Can anyone prove me wrong? :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Martin Wegner wrote:
In have a Struts PlugIn that needs to determine the URL for the containing
web application (http://localhost:8080/BlahBlahBlah/).  I am unable to
find a way to determine this information.  Any ideas?
Thanks.
--Marty
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:select drop downs using LabelValueBean

2005-01-25 Thread Justin Moore
Hi,

I am havnig problems with the LabelValueBean in a drop down that is suppose to 
show the months.  I need to display the labels as strings (ex: Jan, Feb, etc).  
I need to display their respective values as ordinals.  When executing the code 
below, a JSP exception is thrown, tellinng me: "cannot find bean under name 
months".  Any idea what I am doing incorrectly?  

ex:

Inside ActionForm:

public ArrayList getMonths()
{

months= new ArrayList();
months.add(new org.apache.struts.util.LabelValueBean( "Jan ", 
"1 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Feb ", 
"2 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Mar ", 
"3" ));
months.add(new org.apache.struts.util.LabelValueBean( "Apr ", 
"4 " ));
months.add(new org.apache.struts.util.LabelValueBean( "May ", 
"5 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Jun ", 
"6 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Jul ", 
"7 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Aug ", 
"8 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Sep ", 
"9 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Oct ", 
"10 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Nov ", 
"11 " ));
months.add(new org.apache.struts.util.LabelValueBean( "Dec ", 
"12 " ));

return months;

}


In JSP:



 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Jason Lea




Oops,

I guess I should add that I was creating email messages during a batch
processing operation at 1am, so this was not generated by an action,
and there was no request/response object available.  Otherwise the
other solution with RequestDispatcher would have worked.

Jason Lea wrote:

  Hi,

I couldn't find a way to do this, other than using Jelly:  
http://jakarta.apache.org/commons/jelly/

Which uses JEXL which is a EL processing engine, so it looks like JSP 
with EL.  The Jelly tutorial has an example where you can call the 
Embedded object to process a jelly script file.  Jelly scripts are not 
exactly the same though.  I used it for creating some HTML email messages.

William Stranathan wrote:

  
  
The subject is prolly a poor way to say what I'm trying to say

Does anybody know of a simple way to use JSP as an INTERNAL templating 
engine.  For example, if I have a struts application where I'm 
generating an email to send, I currently have to use Velocity on the 
server side to put the values into the template, then send that.

Is there a simple way to do the same with JSP?  Would I be best served 
by on the server side, constructing an HTTP request to a JSP that simply 
pops in the request attributes into the correc place?

High-level of what I want to do:

ActionForward execute(mapping, form, request, response) {
  MyForm myform = (MyForm)form;

  Hashtable vals = new Hashtable();
  vals.put("user",form.getUser());
  vals.put("car",form.getCar());

  JSPProcessor proc = new JSPProcessor();
  proc.getRequestScope().put("values",vals);
  StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");

  MailUtils.mail("[EMAIL PROTECTED]",buff);
}

Where JSPProcessor is the kind of magic I'm looking for.  I don't really 
see anything built into the API spec, so I SUSPECT if there were 
anything available in Tomcat, for instance, it would be implementation 
specific.

Not a HUGE deal, but it's kinda' a pain to have to train new folks on 
how to put together the JSP's AND how to put together the velocity 
templates.

Thanks,
Will

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 


  
  
  


-- 
Jason Lea




No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 2005.01.25

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

PlugIn and the base URL

2005-01-25 Thread Martin Wegner

In have a Struts PlugIn that needs to determine the URL for the containing
web application (http://localhost:8080/BlahBlahBlah/).  I am unable to
find a way to determine this information.  Any ideas?

Thanks.


--Marty


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] a design question

2005-01-25 Thread Ashish Kulkarni
Hi
Suppose i have a class, which required 3 parameters to
do some process, out of 3 parameters 2 are standard
and only one changes depending upon the process.
I dont want to hard code those 2 values since these
can be change (this is not a web application so i
cannot use session)
What i want to do is create one instance of this class
with the constant parameters setup, 
So a sort of Singleton pattern, 
This class will have no knowledge to read those 2
parameters, and have to be supplied by some other
class

How will be design this class, 

my class example
public class GetData
{
  private String parm1, parm2;
  public GetData(String parm1, String parm2)
   {
 this.parm1 = parm1;
 this.parm2 = parm2;
   }

  public void doSomeThing(String parm3)
   {
// do some logic here
   }


}

ashish



__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setting beans from a form into a collection.

2005-01-25 Thread Rick Reumann
I don't think you want to use indexed properties for this. If you used 
indexed properties you need to have set/get methods to handle them. In 
your case you should removed the indexed stuff and the whole list should 
submit and populate for you.

Todd Nine wrote the following on 1/25/2005 2:52 PM:
Hi all,
I am having an issue with marshalling a page's collection indexes
back into the form object.
I have a BillingForm object with multiple BlllingListItem beans.  Here
is an excerpt of my BillingForm object
public class BillingForm extends AnnuityForm {
private List billingList;
public List getBillingList() {
return billingList;
}
public void setBillingList(List list) {
billingList = list;
}
...
}
my BillingListItem bean object
public class BillingListItem extends EntityRoleListItem{
private long billToID;
private long entityID;
private long appEntityRoleID;
private boolean billTo;
private String entityRoleType;
private String startDate;
private String stopDate;
private String name;
private AddressForm address;
... setters and getters 
}

And my JSP snippet






			
name="item" property="billTo" tabindex="20" />
			
name="item" property="entityRoleType" /> 
			
			

name="item" property="startDate" size="10"
onkeypress="return formatDate(event, this);" indexed="true" />
			
			

name="item" property="stopDate" size="10"
onkeypress="return formatDate(event, this);" indexed="true" />

			
name="item" property="name" /> 
			
name="item" property="address.addressLine1" /> 
name="item" property="address.addressLine2">


			  
			
name="item" property="address.city">
,
 
			 
name="item" property="address.postalCode4">
	- 
	
			  
		
	


As you can see, I've added the index generation, and the html is
correct.  If I fill in dates and check the checkboxes, the collection
is not populated with BillingListItems.  Is there a way that I can do
this without using 3 String arrays?
Thanks,
Todd
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validation is not working for me

2005-01-25 Thread Norris Shelton
Thank you so much for your help.  

I found the problem.  I saw in an article how the
validatorPlugin was defined with a set-property
property="pathnames" for the validation.xml and the
validator-rules.xml.

Either that does not work or I did it wrong.  I went back to
having a comma separated list.  It's ugly, but it works:
  
  
  



--- Kishore Senji <[EMAIL PROTECTED]> wrote:

> On Mon, 24 Jan 2005 18:38:18 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > It looks like they are set-up, but nothing happens.  It goes
> > right into my dispatch action method.
> > 
> > If I submit the form with nothing entered, it goes into the
> add
> > method.  It was working last night, but 
> 
> I would check the following things:
> 
> * Make sure that the validation plugin is defined
> * Make sure that "watchForm" extends ValidatorForm and not
> ValidatorActionForm
> * Make sure that the validate method calls the
> super.validate() and
> takes the errors into account, if the validate method is
> overridden
> 
> > 
> > Here is my form action: (it works)
> > watchActionAdd.do?method=add
> > 
> > Here is the form declaration:
> > >parameter="method"
> >type="com.appriss.jxportal.watch.WatchAction"
> >name="watchForm"
> >scope="request"
> >validate="true"
> >input="/watch/watchAdd.jsp">
> > > path="/watch/watchView.jsp" contextRelative="true"/>
> >
> > 
> > Here is the validation declaration:
> >
> >
> > > depends="required,minlength">
> >
> > > resource="false"/>
> >
> >minlength
> >2
> >
> >
> > > depends="required,minlength">
> >
> >
> >
> >
> >
> >datePattern
> >MM/dd/
> >
> >
> >
> >
> > 
> > It acts as if there is no validation turned on.
> > 
> > =
> > 
> > Norris Shelton
> > Software Engineer
> > Sun Certified Java 1.1 Programmer
> > Appriss, Inc.
> > ICQ# 26487421
> > AIM NorrisEShelton
> > YIM norrisshelton
> > 
> > __
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo
> > 
> >
>
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



setting beans from a form into a collection.

2005-01-25 Thread Todd Nine
Hi all,
I am having an issue with marshalling a page's collection indexes
back into the form object.

I have a BillingForm object with multiple BlllingListItem beans.  Here
is an excerpt of my BillingForm object


public class BillingForm extends AnnuityForm {

private List billingList;

public List getBillingList() {
return billingList;
}

public void setBillingList(List list) {
billingList = list;
}

...
}

my BillingListItem bean object

public class BillingListItem extends EntityRoleListItem{

private long billToID;
private long entityID;
private long appEntityRoleID;
private boolean billTo;
private String entityRoleType;
private String startDate;
private String stopDate;
private String name;
private AddressForm address;
... setters and getters 
}



And my JSP snippet










 







 
 


 
 

,
 
 
- 

 
 






As you can see, I've added the index generation, and the html is
correct.  If I fill in dates and check the checkboxes, the collection
is not populated with BillingListItems.  Is there a way that I can do
this without using 3 String arrays?

Thanks,
Todd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem when using Websphere on windows 2000 server machine

2005-01-25 Thread SZhu
Hi, I have a web application that is deployed fine in Websphere 5.0.2 
(with FixPatch 6) on a windows XP machine. But when I try the same war 
file, same version of the websphere on a windows 2000 server machine, I 
will get the following error:

Cannot find message resources under key org.apache.struts.action.MESSAGE

 

Here is a portion of my web.xml file:

 
   
  action
 org.apache.struts.action.ActionServlet
  
 config
 /WEB-INF/struts-config.xml
  
  1
   

and struts-config.xml:


   
   



I tried researching for this for quite a while now. Can someone shed some 
light on this? This Struts 1.1 btw. Thanks

-Scott


RE: Been a while sinced used Tiles... can someone help?

2005-01-25 Thread Hollaway, Shedrick L CIV TRIREFFAC
Rick, this is probably not the cleanest solution but it works for me.

tiles-def.xml:







  
  

 
  
  



layout.jsp:

















ApplicationResources.properties:
title.loginpage= System LOGIN PAGE
title.loginpage.header=LOGIN PAGE


Hopefully this help.

Shed.



-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 12:27
To: Struts Users Mailing List
Subject: Been a while sinced used Tiles... can someone help?


Ok, the recent Tiles questions posts I had were in relation to how I can

create dynamic titles/labels. For example I might have a layout 
definition that has a header.jsp and in that header I need provide a 
label for the user to view that could look like...

"Welcome John Doe, we love your company Acme Incorporated"

What I want to be able to do is set up in header.jsp a way to use the 
label that comes from the tiles definition, but also then can use the 
custom stuff I set up in the Action such as "John Doe" and "Acme Inc." 
What I was planning on doing is setting up generic vars to represent 
what could be substituted such as labelVarA = "JohnDoe", labelVarB = 
"Acme Incorporated" then I'd stuff them into Request scope as labelVarA,

and labelVarB.

greeting.message=Welcome {0}, we love your company {1}

Then if I have in my definition:




...


Can I just do in my header.jsp?:








Overall, I'm having a difficult time grasping how you can create dynamic

labels/titles. For example a main layout might look like...



???tiles insert so that this title might be partially dynamic
so I can't just use 



*** this header needs the dynamic capabilities as described above
***












I don't want to hard code the label/titles in my Action class (except 
for the relevant params needed.. ie in example above user name, comp 
name). I have to problem creating extra tiles definitions with label 
definitions but I'm not sure how to set the defintions up so that they 
can handle dynamic parameters?

thanks

-- 
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



smime.p7s
Description: S/MIME cryptographic signature


Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Niall Pemberton
Good points Kris,

hope you don't mind, but I added your comments to the page I set up
(although I slightly modified the whitespace *hack*).

http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html

Niall

- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 4:32 PM
Subject: Re: OT - Evaulating JSP as internal template?


> For the paranoid, you probably want to be sure that the email template
> ("EmailTestTemplate.jsp") doesn't actually produce any output. Because
you're
> doing an include followed by a forward, there's a *possibility* that the
> forward will throw an IllegalStateException if the include causes the
response
> to be committed. You can use one of the various JSP whitespace "hacks" to
> help:
>
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %><%--
>
> --%>
>   ...
> 
>
> Obviously, the example is unlikely to cause a problem, but a more involved
page
> might.
>
> Another approach might be to pass an HttpServletResponseWrapper to the
include
> method whose output stream (or writer) just buffers the entire response
for
> later retrieval.
>
> Quoting Niall Pemberton <[EMAIL PROTECTED]>:
>
> > You can do this easily using the  tag and the
> > RequestDispatcher. I've put a page up on my web site showing how:
> >
> > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> >
> > I believe the RequestDispatcher is the "magic" JSP processor you're
looking
> > for.
> >
> > Niall
> >
> > - Original Message - 
> > From: "William Stranathan" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, January 25, 2005 11:00 AM
> > Subject: OT - Evaulating JSP as internal template?
> >
> >
> > > The subject is prolly a poor way to say what I'm trying to say
> > >
> > > Does anybody know of a simple way to use JSP as an INTERNAL templating
> > > engine.  For example, if I have a struts application where I'm
> > > generating an email to send, I currently have to use Velocity on the
> > > server side to put the values into the template, then send that.
> > >
> > > Is there a simple way to do the same with JSP?  Would I be best served
> > > by on the server side, constructing an HTTP request to a JSP that
simply
> > > pops in the request attributes into the correc place?
> > >
> > > High-level of what I want to do:
> > >
> > > ActionForward execute(mapping, form, request, response) {
> > >MyForm myform = (MyForm)form;
> > >
> > >Hashtable vals = new Hashtable();
> > >vals.put("user",form.getUser());
> > >vals.put("car",form.getCar());
> > >
> > >JSPProcessor proc = new JSPProcessor();
> > >proc.getRequestScope().put("values",vals);
> > >StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");
> > >
> > >MailUtils.mail("[EMAIL PROTECTED]",buff);
> > > }
> > >
> > > Where JSPProcessor is the kind of magic I'm looking for.  I don't
really
> > > see anything built into the API spec, so I SUSPECT if there were
> > > anything available in Tomcat, for instance, it would be implementation
> > > specific.
> > >
> > > Not a HUGE deal, but it's kinda' a pain to have to train new folks on
> > > how to put together the JSP's AND how to put together the velocity
> > > templates.
> > >
> > > Thanks,
> > > Will
>
> -- 
> Kris Schneider 
> D.O.Tech   
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DisplayTag

2005-01-25 Thread Metin Erksan
hi
 
i tried to signup for list.but i could not.i could review my messages but ý 
could not get singup confirmation ):
 
sincerely

Martin Wegner <[EMAIL PROTECTED]> wrote:

Check out the displaytag mailing list. It has an excellent community
which is very quick to help.


--Marty

--- Flávio Maldonado wrote:

> Hello people!
> 
> Has anybody here used DisplayTag lib?
> I'm trying to use here but I'm having some problems with Locale...
> 
> 115609 [http8080-Processor23] INFO properties.TableProperties - No 
> LocaleResolver configured.
> 
> 115875 [http8080-Processor23] WARN properties.TableProperties - Unable
> to 
> instantiate the configured I18nResourceProvider due to a 
> java.lang.NoClassDefFoundError exception: 
> org.apache.taglibs.standard.tag.common.fmt.BundleSupport. Falling back
> to 
> default implementation.
> 
> How can I configure the LocaleResolver ???
> 
> Thanks!!
> 
> 
> Flávio Vilasboas Maldonado
> Diretor de Desenvolvimento
> SedNet Soluções em TI
> (35)3471-9381 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: newbie problem

2005-01-25 Thread Rick Reumann
Tim wrote the following on 1/25/2005 12:55 PM:
Rick,
While you are at it, I suggest you may consider dynamic Forms, 
DynaActionForm, or Map backed forms, they give you ways to handle form's 
properties without even knowing the the property names at development time.
Its worth trying.
You mean Robin I think:) since she posted the original question, but 
since you brought it up, I really don't like any of the Dyna stuff. Not 
that it isn't sort of cool, but I like to have compile-time checks of my 
code and ease in refactoring. For example when you use Dyna stuff 
nothing stops you from doing... myDynaForm.set("firrstName", "Joe") 
(notice the spelling mistake?) So you'll say use constants like 
myDynaForm.set(Constants.FIRST_NAME, "Joe") and sure that will help but 
what does all of this gain you? All of this to simply avoid a few 
get/set methods which could automatically be generated for you by any 
average IDE. I'm yet to see the beneift that the Dyna flavors give me. 
Often times you also end up having to extend the Dyna class for example 
with DynaForms because you need to implement a reset method.

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Tim
Rick,
While you are at it, I suggest you may consider dynamic Forms, 
DynaActionForm, or Map backed forms, they give you ways to handle form's 
properties without even knowing the the property names at development time.
Its worth trying.

Hatem.
- Original Message - 
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 9:41 AM
Subject: Re: newbie problem


Robin Ericsson wrote the following on 1/25/2005 12:18 PM:
Ok, sounds like a good idea, my next question would be how do I get the 
data set in the first form from the execute method of my action?
Various ways. You can set all the properties individually or use BeanUtils 
to copy them from some other object into your form. In execute...

FormBeanName myForm = (FormBeanName )form;
myForm.setWhatever()
or simply if you need to copy the data from a value object into your form
FormBeanName myForm = (FormBeanName )form;
BeanUtils.copyProperties( myForm, myValueObject);
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Rick Reumann
Robin Ericsson wrote the following on 1/25/2005 12:18 PM:
Ok, sounds like a good idea, my next question would be how do I get the 
data set in the first form from the execute method of my action?
Various ways. You can set all the properties individually or use 
BeanUtils to copy them from some other object into your form. In execute...

FormBeanName myForm = (FormBeanName )form;
myForm.setWhatever()
or simply if you need to copy the data from a value object into your form
FormBeanName myForm = (FormBeanName )form;
BeanUtils.copyProperties( myForm, myValueObject);
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Been a while sinced used Tiles... can someone help?

2005-01-25 Thread Rick Reumann
Ok, the recent Tiles questions posts I had were in relation to how I can 
create dynamic titles/labels. For example I might have a layout 
definition that has a header.jsp and in that header I need provide a 
label for the user to view that could look like...

"Welcome John Doe, we love your company Acme Incorporated"
What I want to be able to do is set up in header.jsp a way to use the 
label that comes from the tiles definition, but also then can use the 
custom stuff I set up in the Action such as "John Doe" and "Acme Inc." 
What I was planning on doing is setting up generic vars to represent 
what could be substituted such as labelVarA = "JohnDoe", labelVarB = 
"Acme Incorporated" then I'd stuff them into Request scope as labelVarA, 
and labelVarB.

greeting.message=Welcome {0}, we love your company {1}
Then if I have in my definition:

   
   
   ...

Can I just do in my header.jsp?:






Overall, I'm having a difficult time grasping how you can create dynamic 
labels/titles. For example a main layout might look like...


   
   ???tiles insert so that this title might be partially dynamic
   so I can't just use 
   
   
   *** this header needs the dynamic capabilities as described above ***
   
   
   
   
   
   

I don't want to hard code the label/titles in my Action class (except 
for the relevant params needed.. ie in example above user name, comp 
name). I have to problem creating extra tiles definitions with label 
definitions but I'm not sure how to set the defintions up so that they 
can handle dynamic parameters?

thanks
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Robin Ericsson
Rick Reumann wrote:
Robin Ericsson wrote the following on 1/25/2005 10:52 AM:
The select is only there to figure how to populate the next page, 
however I would like the have the selectlist on the next page aswell 
so the client may jump between different months, as it will be in this 
case.

For this stuff, all my actions usually have a prep(...) method that I 
can call from any of my Action dispatch methods. The prep will set up 
the request with any of those things such as Lists that are needed for 
drop downs. So whatever action method you go to.. just make sure to call 
prep(..) before you leave it and everything will be there. (You could 
also use the Session to store the List so it will be there without you 
having to worry about it, but I'd advise against that approach if you 
can help it.)
Ok, sounds like a good idea, my next question would be how do I get the 
data set in the first form from the execute method of my action?

regards,
Robin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: A table on a form from a List of Lists

2005-01-25 Thread Olasoji Ajayi
i thought the property attribute is required in the html:text tag.
- Original Message - 
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 6:02 PM
Subject: Re: A table on a form from a List of Lists


So if row is a list try this



  
  
  
  
  
  
  



directly
- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:37 PM
Subject: Re: A table on a form from a List of Lists


the second iterate will treat row like a bean and will try to retrieve 
the
value of property called list of fields and it will result in an erroe
because the row is actually a List and not a bean and it does not have a
property called listofFields. and i dont think html:text works without a
property attribute

- Original Message - 
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:27 PM
Subject: Re: A table on a form from a List of Lists

> And by this way ?
>
> 
> 
> 
>
>
>
>
>
>
>
> 
> 
> 
>
> but the problem is that you didn't know which row is the parent of a
field
>
> - Original Message - 
> From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 5:02 PM
> Subject: Re: A table on a form from a List of Lists
>
>
>> if this works, it will take care of writing the table to the jsp but i
> need
>> an html input type of field so i can also set the properties of the
>> ActionForm by editing the fields and submiting the form.
>> - Original Message - 
>> From: "Cedric Levieux" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" ; "Hubert
Rabago"
>> <[EMAIL PROTECTED]>
>> Sent: Tuesday, January 25, 2005 3:36 PM
>> Subject: Re: A table on a form from a List of Lists
>>
>>
>> > Hi,
>> >
>> > There is a way :
>> >
>> > 
>> > 
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > 
>> > 
>> >
>> > Regards,
>> >
>> > Cedric
>> >
>> > - Original Message - 
>> > From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
>> > To: "Struts Users Mailing List" ; "Hubert
> Rabago"
>> > <[EMAIL PROTECTED]>
>> > Sent: Tuesday, January 25, 2005 3:25 PM
>> > Subject: Re: A table on a form from a List of Lists
>> >
>> >
>> >> the method did not work, i think its because the nested tags deal
with
>> > beans
>> >> nested in beans but this deals with lists in a list in a bean (like
a
>> >> 2
>> >> dimensional array), i was hoping if i code the property like
>> >> property[row][col], if will call my getter method String
> getProperty(int
>> >> row, int col) since it calls String getProperty(int index) for
>> >> property
>> >> specified as property[index].
>> >> all the methods i have used either comes up with the erron no
gettter
>> > method
>> >> for this or that or null attribute.
>> >>
>> >> i am begining to think there is no way to get/set a two dimentional
> array
>> >> type of data in a form bean other than to make the property also
>> >> beans.
>> >>
>> >> i would really appreciate any help because i want to keep my
property
> as
>> >> a
>> >> list of lists. the form bean is like:
>> >>
>> >> public class myBean extends ActionForm{
>> >>   private List table = new ArrayList();
>> >> /// other propeties that are of type string
>> >>
>> >> public List getTable(){
>> >>   return table;
>> >> }
>> >>
>> >> public List getRow(int row){
>> >>   return (List)table.get(row);
>> >> }
>> >>
>> >> public String getField(int row, int col){
>> >>   return (String)((List)table.get(row)).get(col);
>> >> }
>> >>
>> >>  and corresponding setter methods
>> >>
>> >> i wrote the acessor methods this way so i can specify different
> property
>> > to
>> >> get different componentof the bean's property.
>> >>
>> >> the problem i have is how to code a jsp to call the getter/setter
> methods
>> >
>> >> with two int arguments, i dont know very much about the bean
>> > specification.
>> >> can anyone tell me how to code my jsp or ActionForm to get the 
>> >> third
>> >> accessor methods called, to populate an html:text or set the
>> >> ActionForm
>> >> property from html:text
>> >>
>> >>
>> >>
>> >> - Original Message - 
>> >> From: "Hubert Rabago" <[EMAIL PROTECTED]>
>> >> To: "Struts Users Mailing List" 
>> >> Sent: Monday, January 24, 2005 4:18 PM
>> >> Subject: Re: A table on a form from a List of Lists
>> >>
>> >>
>> >> > Take a look at the nested tags.
>> >> > In your case, your code may end up looking like:
>> >> >
>> >> > 
>> >> > 
>> >> >  
>> >> >  
>> >> > 
>> >> > 
>> >> >
>> >> > 
>> >> > 
>> >> >  
>> >> >  
>> >> > 
>> >> > 
>> >> >
>> >> > Hubert
>> >> >
>> >> > On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
>> > <[EMAIL PROTECTED]>
>> >> > wrote:
>> >> >> Hi,
>> >> >> i have been trying to create a table on my form from a single
> property
>> > in
>> >> >>

Re: A table on a form from a List of Lists

2005-01-25 Thread Cedric Levieux
So if row is a list try this




   
   
   
   
   
   
   




directly

- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:37 PM
Subject: Re: A table on a form from a List of Lists


> the second iterate will treat row like a bean and will try to retrieve the
> value of property called list of fields and it will result in an erroe
> because the row is actually a List and not a bean and it does not have a
> property called listofFields. and i dont think html:text works without a
> property attribute
>
> - Original Message - 
> From: "Cedric Levieux" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 5:27 PM
> Subject: Re: A table on a form from a List of Lists
>
>
> > And by this way ?
> >
> > 
> > 
> > 
> >
> >
> >
> >
> >
> >
> >
> > 
> > 
> > 
> >
> > but the problem is that you didn't know which row is the parent of a
field
> >
> > - Original Message - 
> > From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, January 25, 2005 5:02 PM
> > Subject: Re: A table on a form from a List of Lists
> >
> >
> >> if this works, it will take care of writing the table to the jsp but i
> > need
> >> an html input type of field so i can also set the properties of the
> >> ActionForm by editing the fields and submiting the form.
> >> - Original Message - 
> >> From: "Cedric Levieux" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" ; "Hubert
Rabago"
> >> <[EMAIL PROTECTED]>
> >> Sent: Tuesday, January 25, 2005 3:36 PM
> >> Subject: Re: A table on a form from a List of Lists
> >>
> >>
> >> > Hi,
> >> >
> >> > There is a way :
> >> >
> >> > 
> >> > 
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > 
> >> > 
> >> >
> >> > Regards,
> >> >
> >> > Cedric
> >> >
> >> > - Original Message - 
> >> > From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> >> > To: "Struts Users Mailing List" ; "Hubert
> > Rabago"
> >> > <[EMAIL PROTECTED]>
> >> > Sent: Tuesday, January 25, 2005 3:25 PM
> >> > Subject: Re: A table on a form from a List of Lists
> >> >
> >> >
> >> >> the method did not work, i think its because the nested tags deal
with
> >> > beans
> >> >> nested in beans but this deals with lists in a list in a bean (like
a
> >> >> 2
> >> >> dimensional array), i was hoping if i code the property like
> >> >> property[row][col], if will call my getter method String
> > getProperty(int
> >> >> row, int col) since it calls String getProperty(int index) for
> >> >> property
> >> >> specified as property[index].
> >> >> all the methods i have used either comes up with the erron no
gettter
> >> > method
> >> >> for this or that or null attribute.
> >> >>
> >> >> i am begining to think there is no way to get/set a two dimentional
> > array
> >> >> type of data in a form bean other than to make the property also
> >> >> beans.
> >> >>
> >> >> i would really appreciate any help because i want to keep my
property
> > as
> >> >> a
> >> >> list of lists. the form bean is like:
> >> >>
> >> >> public class myBean extends ActionForm{
> >> >>   private List table = new ArrayList();
> >> >> /// other propeties that are of type string
> >> >>
> >> >> public List getTable(){
> >> >>   return table;
> >> >> }
> >> >>
> >> >> public List getRow(int row){
> >> >>   return (List)table.get(row);
> >> >> }
> >> >>
> >> >> public String getField(int row, int col){
> >> >>   return (String)((List)table.get(row)).get(col);
> >> >> }
> >> >>
> >> >>  and corresponding setter methods
> >> >>
> >> >> i wrote the acessor methods this way so i can specify different
> > property
> >> > to
> >> >> get different componentof the bean's property.
> >> >>
> >> >> the problem i have is how to code a jsp to call the getter/setter
> > methods
> >> >
> >> >> with two int arguments, i dont know very much about the bean
> >> > specification.
> >> >> can anyone tell me how to code my jsp or ActionForm to get the third
> >> >> accessor methods called, to populate an html:text or set the
> >> >> ActionForm
> >> >> property from html:text
> >> >>
> >> >>
> >> >>
> >> >> - Original Message - 
> >> >> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> >> >> To: "Struts Users Mailing List" 
> >> >> Sent: Monday, January 24, 2005 4:18 PM
> >> >> Subject: Re: A table on a form from a List of Lists
> >> >>
> >> >>
> >> >> > Take a look at the nested tags.
> >> >> > In your case, your code may end up looking like:
> >> >> >
> >> >> > 
> >> >> > 
> >> >> >  
> >> >> >  
> >> >> > 
> >> >> > 
> >> >> >
> >> >> > 
> >> >> > 
> >> >> >  
> >> >> >  
> >> >> > 
> >> >> > 
> >> >> >
> >> >> > Hubert
> >> >> >
> >> >> > On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
> >> > <[EMAIL PROTECTED]>
> >> >> > wrote:
> >> >> >> Hi,
> >> >> >> i have been trying

Re: How to add your own validation + make use of existing validator

2005-01-25 Thread Jim Barrows
On Mon, 24 Jan 2005 23:49:47 -0800 (PST), Manisha Sathe
<[EMAIL PROTECTED]> wrote:
> finally i could figure it out as
> 
> ActionErrors errors = super.validate(...) ( i am new to java too)
> 
> With this i could get the server side validation + my own validation.
> 
> The same thing i want to do it for Javascript validation. I want to make use 
> of JavaScript validation created by validator +   i want to add my own 
> javascript validation any idea ?

Now you have to write your validator, which is easy that generates the
appropriate javascript.

> 
> regards
> Manisha
> 
> 
> Manisha Sathe <[EMAIL PROTECTED]> wrote:
> 
> I am using validator framework. But for some business logic - i need to some 
> other validation depending on some conditions.
> 
> I want to keep validation of validator framework as it is + after that i want 
> to add my own.
> 
> First of all is it possible If yes, then how ?
> 
> regards
> Manisha
> 
> -
> Do you Yahoo!?
> Yahoo! Search presents - Jib Jab's 'Second Term'
> 
> -
> Do you Yahoo!?
>  Yahoo! Search presents - Jib Jab's 'Second Term'
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: struts and java script and jsp

2005-01-25 Thread Nadia Kunkov
Thank you, you are right...
Silly of me to not have noticed that.
Appreciate your help.
NK

-Original Message-
From: Will Stranathan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 11:46 AM
To: Struts Users Mailing List
Subject: Re: struts and java script and jsp


That code is being put in because you set the focus attribute of the 
html:form tag, but there is no attribute called username.

w
On Tue, 25 Jan 2005 11:20:36 -0500
  "Nadia Kunkov" <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I'm not sure if this question is really about struts even though it 
>occures in my struts application.  My apologies if this is a bit off 
>topic.
>I have a jsp logon page with two input fields "userId' and "password"
>I of course have a corresponding ActionForm with the same attributes.
>When I open my Logon page in Mozilla I have no problem whatosever.
>When I open it in IE it's done with errors on page and  I have the 
>following message:
>document.forms["logonForm"].elements["username"].type is null or not 
>an object
>
>When I looked at the page source I saw the following javascript 
>added:
>
>
>
>
>I'm wondering why this javascript is being added and does it have 
>anything to do with struts?
>Also, could the problem be that it refers to element["username"] that 
>does not exist in my jsp, since I have "userId"?
>Then, where does it come up with "username"?
>How do I get around it?
>Should I change my form to have "username"?
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: updating lists on the server

2005-01-25 Thread Simon Pett
thanks - i am coming round to the idea of dropping
lookupdispatchaction, there really isnt enough to be gained.


On Tue, 25 Jan 2005 14:03:44 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> Firstly client side validation isn't dependant on the "validate" attribute
> in the struts-config - so you won't miss client validation with the approach
> you've taken.
> 
> One possible alternative approach would be to create your own custom
> DynaValidatorForm class and put the logic whether to validate or not in the
> form's validate method.
> 
> public class CustomDynaForm extends DynaValidatorForm {
> 
>public ActionErrors validate(ActionMapping mapping,
>  HttpServletRequest request) {
> 
>if ( doing the update -) {
>return super.validate(mapping, request);
>} else {
>return null;
>}
> 
>}
> }
> 
> However you're using LookupDispatchAction and that would mean duplicating
> the logic in that class which determines which method is being called - i.e.
> either the refresh or the update. I don't use any of the flavours of
> DispatchAction and LookupDispatchAction IMO is horribly complicated and you
> probably won't want to do this.
> 
> Niall
> 
> - Original Message -
> From: "Simon Pett" <[EMAIL PROTECTED]>
> To: "Stuts User" 
> Sent: Tuesday, January 25, 2005 1:30 PM
> Subject: updating lists on the server
> 
> > Hi
> >
> > I have some doubts about my implementation and am wondering if anyone
> > has better solutions. I have done a bit of googling and thought about
> > it without finding any great answers which probably means im missing
> > something obvious.
> >
> > I am using a series of drop down lists at the top of my form. When the
> > user makes a selection in the first list the dependant subsequent
> > lists need to be updated.
> >
> > pretty standard i guess. However i do not wish to load all
> > combinations of the lists into the request and use javascript to make
> > the updates. I want the update or refresh to be done as a server
> > request, probably in the tiles controller as its still presenation
> > logic.
> >
> > I am using dynaValidatorForms to take advantage of struts validation - dah
> >
> > When the list is changed I use javascript in the html:select to submit the
> form
> >
> > I figured i can use a lookupDispatchAction with at least two methods
> > One, an update method which is invoked from the html:submit
> > Two a refreshPresentation method that is executed when the list is
> > changed via the javascript.
> >
> > The refreshPresentation method actually does nothing but forward back
> > to the input, which eventually triggers the tile controller. The
> > controller then looks at the current form and loads the appropriate
> > lists.
> >
> > The update method populates the model class(es) from the actionForm
> > with beanutils etc and then hands on to appropriate command classes
> > then finally moves on.
> >
> > This all works ok, except as the refreshPresentation method does not
> > require a validated actionForm in the case where the user has not
> > completed later fields, i have to set that action to validate="false".
> >
> > Then in the update method i have to enact the validation myself. This
> > is dumb as i have to duplicate the sturts code at least in a common
> > super class and i think i will miss client validation.
> >
> > So what am i missing
> >
> > any help appreciated
> > Simon
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Will Stranathan
Which was one thing I had already done - didn't use comments, but did 
all my up-front work in one line.

w
On Tue, 25 Jan 2005 11:32:41 -0500
 Kris Schneider <[EMAIL PROTECTED]> wrote:
For the paranoid, you probably want to be sure that the email 
template
("EmailTestTemplate.jsp") doesn't actually produce any output. 
Because you're
doing an include followed by a forward, there's a *possibility* that 
the
forward will throw an IllegalStateException if the include causes the 
response
to be committed. You can use one of the various JSP whitespace 
"hacks" to
help:

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" 
%><%--

--%>
 ...

Obviously, the example is unlikely to cause a problem, but a more 
involved page
might.

Another approach might be to pass an HttpServletResponseWrapper to 
the include
method whose output stream (or writer) just buffers the entire 
response for
later retrieval.

Quoting Niall Pemberton <[EMAIL PROTECTED]>:
You can do this easily using the  tag and the
RequestDispatcher. I've put a page up on my web site showing how:
http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
I believe the RequestDispatcher is the "magic" JSP processor you're 
looking
for.

Niall
- Original Message - 
From: "William Stranathan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 11:00 AM
Subject: OT - Evaulating JSP as internal template?

> The subject is prolly a poor way to say what I'm trying to say
>
> Does anybody know of a simple way to use JSP as an INTERNAL 
templating
> engine.  For example, if I have a struts application where I'm
> generating an email to send, I currently have to use Velocity on 
the
> server side to put the values into the template, then send that.
>
> Is there a simple way to do the same with JSP?  Would I be best 
served
> by on the server side, constructing an HTTP request to a JSP that 
simply
> pops in the request attributes into the correc place?
>
> High-level of what I want to do:
>
> ActionForward execute(mapping, form, request, response) {
>MyForm myform = (MyForm)form;
>
>Hashtable vals = new Hashtable();
>vals.put("user",form.getUser());
>vals.put("car",form.getCar());
>
>JSPProcessor proc = new JSPProcessor();
>proc.getRequestScope().put("values",vals);
>StringBuffer buff = 
proc.evaluate("WEB-INF/templates/email.jsp");
>
>MailUtils.mail("[EMAIL PROTECTED]",buff);
> }
>
> Where JSPProcessor is the kind of magic I'm looking for.  I don't 
really
> see anything built into the API spec, so I SUSPECT if there were
> anything available in Tomcat, for instance, it would be 
implementation
> specific.
>
> Not a HUGE deal, but it's kinda' a pain to have to train new folks 
on
> how to put together the JSP's AND how to put together the velocity
> templates.
>
> Thanks,
> Will
--
Kris Schneider 
D.O.Tech   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts and java script and jsp

2005-01-25 Thread Will Stranathan
That code is being put in because you set the focus attribute of the 
html:form tag, but there is no attribute called username.

w
On Tue, 25 Jan 2005 11:20:36 -0500
 "Nadia Kunkov" <[EMAIL PROTECTED]> wrote:
Hi,
I'm not sure if this question is really about struts even though it 
occures in my struts application.  My apologies if this is a bit off 
topic.
I have a jsp logon page with two input fields "userId' and "password"
I of course have a corresponding ActionForm with the same attributes.
When I open my Logon page in Mozilla I have no problem whatosever.
When I open it in IE it's done with errors on page and  I have the 
following message:
document.forms["logonForm"].elements["username"].type is null or not 
an object

When I looked at the page source I saw the following javascript 
added:


I'm wondering why this javascript is being added and does it have anything to do with struts? Also, could the problem be that it refers to element["username"] that does not exist in my jsp, since I have "userId"? Then, where does it come up with "username"? How do I get around it? Should I change my form to have "username"? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: A table on a form from a List of Lists

2005-01-25 Thread Olasoji Ajayi
Wow, i never thought of that, i will definitly give that a try, i think it 
should work
- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:34 PM
Subject: Re: A table on a form from a List of Lists


Well, lists of lists work, but the property to display or set itself
must be a bean with accessors.  It doesn't have to be a standalone
class - it can be an inner class, or a dyna bean.
On Tue, 25 Jan 2005 17:02:11 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> 
wrote:
if this works, it will take care of writing the table to the jsp but i 
need
an html input type of field so i can also set the properties of the
ActionForm by editing the fields and submiting the form.
- Original Message -
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "Hubert Rabago"
<[EMAIL PROTECTED]>

Sent: Tuesday, January 25, 2005 3:36 PM
Subject: Re: A table on a form from a List of Lists
> Hi,
>
> There is a way :
>
> 
> 
>
>
>
>
>
>
>
> 
> 
>
> Regards,
>
> Cedric
>
> - Original Message -
> From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" ; "Hubert 
> Rabago"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, January 25, 2005 3:25 PM
> Subject: Re: A table on a form from a List of Lists
>
>
>> the method did not work, i think its because the nested tags deal with
> beans
>> nested in beans but this deals with lists in a list in a bean (like a 
>> 2
>> dimensional array), i was hoping if i code the property like
>> property[row][col], if will call my getter method String 
>> getProperty(int
>> row, int col) since it calls String getProperty(int index) for 
>> property
>> specified as property[index].
>> all the methods i have used either comes up with the erron no gettter
> method
>> for this or that or null attribute.
>>
>> i am begining to think there is no way to get/set a two dimentional 
>> array
>> type of data in a form bean other than to make the property also 
>> beans.
>>
>> i would really appreciate any help because i want to keep my property 
>> as
>> a
>> list of lists. the form bean is like:
>>
>> public class myBean extends ActionForm{
>>   private List table = new ArrayList();
>> /// other propeties that are of type string
>>
>> public List getTable(){
>>   return table;
>> }
>>
>> public List getRow(int row){
>>   return (List)table.get(row);
>> }
>>
>> public String getField(int row, int col){
>>   return (String)((List)table.get(row)).get(col);
>> }
>>
>>  and corresponding setter methods
>>
>> i wrote the acessor methods this way so i can specify different 
>> property
> to
>> get different componentof the bean's property.
>>
>> the problem i have is how to code a jsp to call the getter/setter 
>> methods
>
>> with two int arguments, i dont know very much about the bean
> specification.
>> can anyone tell me how to code my jsp or ActionForm to get the third
>> accessor methods called, to populate an html:text or set the 
>> ActionForm
>> property from html:text
>>
>>
>>
>> - Original Message -
>> From: "Hubert Rabago" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" 
>> Sent: Monday, January 24, 2005 4:18 PM
>> Subject: Re: A table on a form from a List of Lists
>>
>>
>> > Take a look at the nested tags.
>> > In your case, your code may end up looking like:
>> >
>> > 
>> > 
>> >  
>> >  
>> > 
>> > 
>> >
>> > 
>> > 
>> >  
>> >  
>> > 
>> > 
>> >
>> > Hubert
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: A table on a form from a List of Lists

2005-01-25 Thread Olasoji Ajayi
the second iterate will treat row like a bean and will try to retrieve the 
value of property called list of fields and it will result in an erroe 
because the row is actually a List and not a bean and it does not have a 
property called listofFields. and i dont think html:text works without a 
property attribute

- Original Message - 
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:27 PM
Subject: Re: A table on a form from a List of Lists


And by this way ?



   
   
   
   
   
   
   



but the problem is that you didn't know which row is the parent of a field
- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:02 PM
Subject: Re: A table on a form from a List of Lists


if this works, it will take care of writing the table to the jsp but i
need
an html input type of field so i can also set the properties of the
ActionForm by editing the fields and submiting the form.
- Original Message - 
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "Hubert Rabago"
<[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2005 3:36 PM
Subject: Re: A table on a form from a List of Lists

> Hi,
>
> There is a way :
>
> 
> 
>
>
>
>
>
>
>
> 
> 
>
> Regards,
>
> Cedric
>
> - Original Message - 
> From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" ; "Hubert
Rabago"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, January 25, 2005 3:25 PM
> Subject: Re: A table on a form from a List of Lists
>
>
>> the method did not work, i think its because the nested tags deal with
> beans
>> nested in beans but this deals with lists in a list in a bean (like a 
>> 2
>> dimensional array), i was hoping if i code the property like
>> property[row][col], if will call my getter method String
getProperty(int
>> row, int col) since it calls String getProperty(int index) for 
>> property
>> specified as property[index].
>> all the methods i have used either comes up with the erron no gettter
> method
>> for this or that or null attribute.
>>
>> i am begining to think there is no way to get/set a two dimentional
array
>> type of data in a form bean other than to make the property also 
>> beans.
>>
>> i would really appreciate any help because i want to keep my property
as
>> a
>> list of lists. the form bean is like:
>>
>> public class myBean extends ActionForm{
>>   private List table = new ArrayList();
>> /// other propeties that are of type string
>>
>> public List getTable(){
>>   return table;
>> }
>>
>> public List getRow(int row){
>>   return (List)table.get(row);
>> }
>>
>> public String getField(int row, int col){
>>   return (String)((List)table.get(row)).get(col);
>> }
>>
>>  and corresponding setter methods
>>
>> i wrote the acessor methods this way so i can specify different
property
> to
>> get different componentof the bean's property.
>>
>> the problem i have is how to code a jsp to call the getter/setter
methods
>
>> with two int arguments, i dont know very much about the bean
> specification.
>> can anyone tell me how to code my jsp or ActionForm to get the third
>> accessor methods called, to populate an html:text or set the 
>> ActionForm
>> property from html:text
>>
>>
>>
>> - Original Message - 
>> From: "Hubert Rabago" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" 
>> Sent: Monday, January 24, 2005 4:18 PM
>> Subject: Re: A table on a form from a List of Lists
>>
>>
>> > Take a look at the nested tags.
>> > In your case, your code may end up looking like:
>> >
>> > 
>> > 
>> >  
>> >  
>> > 
>> > 
>> >
>> > 
>> > 
>> >  
>> >  
>> > 
>> > 
>> >
>> > Hubert
>> >
>> > On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
> <[EMAIL PROTECTED]>
>> > wrote:
>> >> Hi,
>> >> i have been trying to create a table on my form from a single
property
> in
>> >> my actionForm. the property is a List (actually an ArrayList)
containg
>> >> the rows of the table, each element (i.e row on the table) is
> represented
>> >> by a List of Strings representing the fields of the list. i can 
>> >> code
>> >> my
>> >> JSP page to display the contents of the proprety in a table but i
cant
>> >> get it to set the values of the property from the page on submit.
all
> the
>> >> efforts has failed, i my latest effort, i coded the property as
>> >> property[row][col] but i get an error that dia is no getter method
for
>> >> property[0][0]. i wrote the access methods like
>> >> String getProperty(int row, int col){
>> >> return  (String)((List)property.get(row)).get(col);
>> >> }
>> >>
>> >> it did not work, any ideas will be apreciated.
>> >>
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>>
>> --

Re: [OT] PropertyUtils internals (Re: Select Multiple Issues)

2005-01-25 Thread Joe Germuska
Yeah, I wonder about that bug: we've recently been moving some 
application servers from Solaris to Linux, and I think this is a JVM 
level issue.  Just before we started, someone had posted about this 
to the Struts users' list (although I can't seem to find it in the 
archives right now.)  Basically, it seemed that the introspection 
behaved differently on Linux than on some other OS.  Odd as it seems, 
we experienced the same problem moving from Solaris to Linux, even 
using the same version of the Hotspot JVM.  It seemed to go back to a 
property which was actually a List and not an array, and I assumed it 
had to do with some subtle variation in the interpretation of the 
javabeans naming conventions.

This may or may not be exactly the same thing as in Bug 28358, but it 
was peculiar.  In this case, we were able to simply move a few things 
around, but it was disconcerting to think that we might be bitten by 
issues like this in migrating 100% pure java.

Joe
At 9:05 AM -0700 1/25/05, Wendy Smoak wrote:
From: "Joe Germuska" <[EMAIL PROTECTED]>
 I haven't actually looked at this in a running debugger, or with log
 output, but the code which governs this ultimately is
 PropertyUtilsbean.setIndexedProperty(...)
I found what I think is an open bug about the original issue that was
raised-- BeanUtils being unable to set a property when both setProp(int,
String) and setProp( String[]).  (Actually the bug is about the 'get' side
of the problem, but I'm betting it's the same issue.)
http://issues.apache.org/bugzilla/show_bug.cgi?id=28358
I added the beginnings of a test case to demonstrate the problem with
setting an indexed property when the bean has both setProp(String[]) and
setProp(int, String) methods.  It fails with the same 'argument type
mismatch' that Will Stranathan was getting.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


R: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Amleto Di Salle
Hi,
I solved the problem implementing a tiles controller and using the
"extend" definition attribute in tiles-defs.xml. 
This solution requires two tiles definition but the jsp body is the
same. I used two tiles in order to set the correct action, formName and
some other parameter. Maybe this solution can be improved. Any
suggestion is welcome.

Inside tiles-def.xml

   
   
   


   
   






For example: 


  
  
  
  







































TilesControllerImpl:

import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;

public class TilesControllerImpl implements Controller {

public void perform( ComponentContext componentContext,
HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse, ServletContext servletContext ) throws
ServletException, IOException {
String subtitle = (String) componentContext.getAttribute(
Constants.SUB_TITLE);
if (!subtitle.equals( Constants.DEFAULT )) {
httpServletRequest.setAttribute( Constants.SUB_TITLE,
subtitle );
}

String action = (String) componentContext.getAttribute(
Constants.ACTION );
if (!action.equals( Constants.DEFAULT )) {
httpServletRequest.setAttribute( Constants.ACTION,  "/" +
action + ".do");
}

String formName = (String) componentContext.getAttribute(
Constants.FORM_NAME);
if (!formName.equals( Constants.DEFAULT )) {
httpServletRequest.setAttribute( Constants.FORM_NAME,
formName);
char firstChar = formName.charAt( 0 );
String onsubmitName = "validate" + Character.toUpperCase(
firstChar ) + formName.substring( 1, formName.length());
String onsubmit = "return " + onsubmitName + "(this);";
httpServletRequest.setAttribute( Constants.ON_SUBMIT,
onsubmit);
httpServletRequest.setAttribute( Constants.ON_SUBMIT_NAME,
onsubmitName);

}

List otherValues = (List) componentContext.getAttribute(
Constants.OTHER_VALUES );
for ( Iterator iterator = otherValues.iterator();
iterator.hasNext(); ) {
ListItem listItem = ( ListItem ) iterator.next();
httpServletRequest.setAttribute( listItem.getNome(),
listItem.getValore() );
}
}
}

And inside the ".jsp" you can use the parameters defined inside tiles
For Example:




.


BR
/Amleto


> -Messaggio originale-
> Da: Rick Reumann [mailto:[EMAIL PROTECTED] 
> Inviato: lunedì 24 gennaio 2005 23.18
> A: Struts Users Mailing List
> Oggetto: Best practice for dynamic Title values using Tiles?
> 
> 
> I'm switching back to using Tiles instead of Sitemesh and I 
> remember one 
> issue that I found annoying with Tiles and I'd be curious how 
> you guys 
> handle it. Say I have a form that is going to be reused for 
> both "Edit" 
> and "Add." I want the  attribute to read something like "Add 
> Employee" or "Edit Employee," depending on what I'm doing. It seems 
> silly to have to create multiple definitions in my tiles-definitions 
> that are essentially the same exact definition except that 
> the title has 
> changed (potentially you might want a definition to be used for more 
> than just the two that I mentioned). This also requires that 
> my struts 
> config has to be set up to forward to multiple tiles definitions when 
> its really the same page layout but with a different title and could 
> really just require one definition to use.
> 
> I've thought of different ways I might want to handle this (ie set a 
> title in request scope before leaving action and have the header.jsp 
> look for this, or maybe use a filter or over-ride 
> RequestProcessor?) I'm 
> curious if others have run into this. Maybe the latest 
> Struts/Tiles has 
> a solution that I have not looked into.
> 
> Thanks
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
>  
> 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
 



Re: A table on a form from a List of Lists

2005-01-25 Thread Hubert Rabago
Well, lists of lists work, but the property to display or set itself
must be a bean with accessors.  It doesn't have to be a standalone
class - it can be an inner class, or a dyna bean.

On Tue, 25 Jan 2005 17:02:11 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> wrote:
> if this works, it will take care of writing the table to the jsp but i need
> an html input type of field so i can also set the properties of the
> ActionForm by editing the fields and submiting the form.
> - Original Message -
> From: "Cedric Levieux" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" ; "Hubert Rabago"
> <[EMAIL PROTECTED]>
> 
> Sent: Tuesday, January 25, 2005 3:36 PM
> Subject: Re: A table on a form from a List of Lists
> 
> > Hi,
> >
> > There is a way :
> >
> > 
> > 
> >
> >
> >
> >
> >
> >
> >
> > 
> > 
> >
> > Regards,
> >
> > Cedric
> >
> > - Original Message -
> > From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" ; "Hubert Rabago"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 25, 2005 3:25 PM
> > Subject: Re: A table on a form from a List of Lists
> >
> >
> >> the method did not work, i think its because the nested tags deal with
> > beans
> >> nested in beans but this deals with lists in a list in a bean (like a 2
> >> dimensional array), i was hoping if i code the property like
> >> property[row][col], if will call my getter method String getProperty(int
> >> row, int col) since it calls String getProperty(int index) for property
> >> specified as property[index].
> >> all the methods i have used either comes up with the erron no gettter
> > method
> >> for this or that or null attribute.
> >>
> >> i am begining to think there is no way to get/set a two dimentional array
> >> type of data in a form bean other than to make the property also beans.
> >>
> >> i would really appreciate any help because i want to keep my property as
> >> a
> >> list of lists. the form bean is like:
> >>
> >> public class myBean extends ActionForm{
> >>   private List table = new ArrayList();
> >> /// other propeties that are of type string
> >>
> >> public List getTable(){
> >>   return table;
> >> }
> >>
> >> public List getRow(int row){
> >>   return (List)table.get(row);
> >> }
> >>
> >> public String getField(int row, int col){
> >>   return (String)((List)table.get(row)).get(col);
> >> }
> >>
> >>  and corresponding setter methods
> >>
> >> i wrote the acessor methods this way so i can specify different property
> > to
> >> get different componentof the bean's property.
> >>
> >> the problem i have is how to code a jsp to call the getter/setter methods
> >
> >> with two int arguments, i dont know very much about the bean
> > specification.
> >> can anyone tell me how to code my jsp or ActionForm to get the third
> >> accessor methods called, to populate an html:text or set the ActionForm
> >> property from html:text
> >>
> >>
> >>
> >> - Original Message -
> >> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" 
> >> Sent: Monday, January 24, 2005 4:18 PM
> >> Subject: Re: A table on a form from a List of Lists
> >>
> >>
> >> > Take a look at the nested tags.
> >> > In your case, your code may end up looking like:
> >> >
> >> > 
> >> > 
> >> >  
> >> >  
> >> > 
> >> > 
> >> >
> >> > 
> >> > 
> >> >  
> >> >  
> >> > 
> >> > 
> >> >
> >> > Hubert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Kris Schneider
For the paranoid, you probably want to be sure that the email template
("EmailTestTemplate.jsp") doesn't actually produce any output. Because you're
doing an include followed by a forward, there's a *possibility* that the
forward will throw an IllegalStateException if the include causes the response
to be committed. You can use one of the various JSP whitespace "hacks" to
help:

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %><%--

--%>
  ...


Obviously, the example is unlikely to cause a problem, but a more involved page
might.

Another approach might be to pass an HttpServletResponseWrapper to the include
method whose output stream (or writer) just buffers the entire response for
later retrieval.

Quoting Niall Pemberton <[EMAIL PROTECTED]>:

> You can do this easily using the  tag and the
> RequestDispatcher. I've put a page up on my web site showing how:
> 
> http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
> 
> I believe the RequestDispatcher is the "magic" JSP processor you're looking
> for.
> 
> Niall
> 
> - Original Message - 
> From: "William Stranathan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 11:00 AM
> Subject: OT - Evaulating JSP as internal template?
> 
> 
> > The subject is prolly a poor way to say what I'm trying to say
> >
> > Does anybody know of a simple way to use JSP as an INTERNAL templating
> > engine.  For example, if I have a struts application where I'm
> > generating an email to send, I currently have to use Velocity on the
> > server side to put the values into the template, then send that.
> >
> > Is there a simple way to do the same with JSP?  Would I be best served
> > by on the server side, constructing an HTTP request to a JSP that simply
> > pops in the request attributes into the correc place?
> >
> > High-level of what I want to do:
> >
> > ActionForward execute(mapping, form, request, response) {
> >MyForm myform = (MyForm)form;
> >
> >Hashtable vals = new Hashtable();
> >vals.put("user",form.getUser());
> >vals.put("car",form.getCar());
> >
> >JSPProcessor proc = new JSPProcessor();
> >proc.getRequestScope().put("values",vals);
> >StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");
> >
> >MailUtils.mail("[EMAIL PROTECTED]",buff);
> > }
> >
> > Where JSPProcessor is the kind of magic I'm looking for.  I don't really
> > see anything built into the API spec, so I SUSPECT if there were
> > anything available in Tomcat, for instance, it would be implementation
> > specific.
> >
> > Not a HUGE deal, but it's kinda' a pain to have to train new folks on
> > how to put together the JSP's AND how to put together the velocity
> > templates.
> >
> > Thanks,
> > Will

-- 
Kris Schneider 
D.O.Tech   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A table on a form from a List of Lists

2005-01-25 Thread Cedric Levieux
And by this way ?















but the problem is that you didn't know which row is the parent of a field

- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 5:02 PM
Subject: Re: A table on a form from a List of Lists


> if this works, it will take care of writing the table to the jsp but i
need
> an html input type of field so i can also set the properties of the
> ActionForm by editing the fields and submiting the form.
> - Original Message - 
> From: "Cedric Levieux" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" ; "Hubert Rabago"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, January 25, 2005 3:36 PM
> Subject: Re: A table on a form from a List of Lists
>
>
> > Hi,
> >
> > There is a way :
> >
> > 
> > 
> >
> >
> >
> >
> >
> >
> >
> > 
> > 
> >
> > Regards,
> >
> > Cedric
> >
> > - Original Message - 
> > From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" ; "Hubert
Rabago"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 25, 2005 3:25 PM
> > Subject: Re: A table on a form from a List of Lists
> >
> >
> >> the method did not work, i think its because the nested tags deal with
> > beans
> >> nested in beans but this deals with lists in a list in a bean (like a 2
> >> dimensional array), i was hoping if i code the property like
> >> property[row][col], if will call my getter method String
getProperty(int
> >> row, int col) since it calls String getProperty(int index) for property
> >> specified as property[index].
> >> all the methods i have used either comes up with the erron no gettter
> > method
> >> for this or that or null attribute.
> >>
> >> i am begining to think there is no way to get/set a two dimentional
array
> >> type of data in a form bean other than to make the property also beans.
> >>
> >> i would really appreciate any help because i want to keep my property
as
> >> a
> >> list of lists. the form bean is like:
> >>
> >> public class myBean extends ActionForm{
> >>   private List table = new ArrayList();
> >> /// other propeties that are of type string
> >>
> >> public List getTable(){
> >>   return table;
> >> }
> >>
> >> public List getRow(int row){
> >>   return (List)table.get(row);
> >> }
> >>
> >> public String getField(int row, int col){
> >>   return (String)((List)table.get(row)).get(col);
> >> }
> >>
> >>  and corresponding setter methods
> >>
> >> i wrote the acessor methods this way so i can specify different
property
> > to
> >> get different componentof the bean's property.
> >>
> >> the problem i have is how to code a jsp to call the getter/setter
methods
> >
> >> with two int arguments, i dont know very much about the bean
> > specification.
> >> can anyone tell me how to code my jsp or ActionForm to get the third
> >> accessor methods called, to populate an html:text or set the ActionForm
> >> property from html:text
> >>
> >>
> >>
> >> - Original Message - 
> >> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> >> To: "Struts Users Mailing List" 
> >> Sent: Monday, January 24, 2005 4:18 PM
> >> Subject: Re: A table on a form from a List of Lists
> >>
> >>
> >> > Take a look at the nested tags.
> >> > In your case, your code may end up looking like:
> >> >
> >> > 
> >> > 
> >> >  
> >> >  
> >> > 
> >> > 
> >> >
> >> > 
> >> > 
> >> >  
> >> >  
> >> > 
> >> > 
> >> >
> >> > Hubert
> >> >
> >> > On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
> > <[EMAIL PROTECTED]>
> >> > wrote:
> >> >> Hi,
> >> >> i have been trying to create a table on my form from a single
property
> > in
> >> >> my actionForm. the property is a List (actually an ArrayList)
containg
> >> >> the rows of the table, each element (i.e row on the table) is
> > represented
> >> >> by a List of Strings representing the fields of the list. i can code
> >> >> my
> >> >> JSP page to display the contents of the proprety in a table but i
cant
> >> >> get it to set the values of the property from the page on submit.
all
> > the
> >> >> efforts has failed, i my latest effort, i coded the property as
> >> >> property[row][col] but i get an error that dia is no getter method
for
> >> >> property[0][0]. i wrote the access methods like
> >> >> String getProperty(int row, int col){
> >> >> return  (String)((List)property.get(row)).get(col);
> >> >> }
> >> >>
> >> >> it did not work, any ideas will be apreciated.
> >> >>
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> > --

Re: DisplayTag

2005-01-25 Thread Daniel H. F. e Silva
Hi Flávio,

  If you are using Tomcat 5 or any other JSTL-enabled container you don't need 
displaytag. Just
use JSTL tags like 
and .
  And yes, you can alter locale being used.
  Look for details on JSTL documentation.
  It is easier imho to use and, well, it is standard-compliant :-)

Cheers,
 Daniel Silva. 
--- Flávio Maldonado <[EMAIL PROTECTED]> wrote:

> Hello people!
> 
> Has anybody here used DisplayTag lib?
> I'm trying to use here but I'm having some problems with Locale...
> 
> 115609 [http8080-Processor23] INFO properties.TableProperties - No 
> LocaleResolver configured.
> 
> 115875 [http8080-Processor23] WARN properties.TableProperties - Unable to 
> instantiate the configured I18nResourceProvider due to a 
> java.lang.NoClassDefFoundError exception: 
> org.apache.taglibs.standard.tag.common.fmt.BundleSupport. Falling back to 
> default implementation.
> 
> How can I configure the LocaleResolver ???
> 
> Thanks!!
> 
> 
> Flávio Vilasboas Maldonado
> Diretor de Desenvolvimento
> SedNet Soluções em TI
> (35)3471-9381 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upgrading from 1.1 to 1.2.6 -- any guides?

2005-01-25 Thread Niall Pemberton
The EL taglib had not been updated to include new attributes added to the
"standard" taglib and it was decided to leave this as "beta" quality - there
should be a 1.2.7 version with this resolved soon.

Niall

- Original Message - 
From: "Benedict, Paul C" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" ; "Dakota Jack"
<[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2005 3:42 PM
Subject: RE: upgrading from 1.1 to 1.2.6 -- any guides?


> Speaking of 1.2.6, does anyone know what is holding up its release at beta
> quality? Are we going to see a GA on this version or in 1.2.7+?
>
> Thanks,
> Paul
>
> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 24, 2005 8:46 PM
> To: Struts Users Mailing List; Dakota Jack
> Subject: Re: upgrading from 1.1 to 1.2.6 -- any guides?
>
>
> There are 1.1 to 1.2.4 Upgrade notes which should also work for 1.1 to
> 1.2.6:
>
>http://wiki.apache.org/struts/StrutsUpgradeNotes11to124
>
> The only additional things for 1.2.6 (as far as I know) is that the
> dependencies for Struts changed - so make sure you also upgrade to
BeanUtils
> 1.7.0 and Digester 1.6. I put some notes on 1.2.6 here:
>
>http://www.niallp.pwp.blueyonder.co.uk/strutsversion.html
>
>
> Niall
>
> - Original Message - 
> From: "Dakota Jack" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Sunday, January 23, 2005 6:18 AM
> Subject: upgrading from 1.1 to 1.2.6 -- any guides?
>
>
> > Are there any guides for upgrading from 1.1 to 1.2.6?  I did what
> > should be obvious and had no success.
> >
> > Jack
> >
> >
> > -- 
> > --
> >
> > "You can lead a horse to water but you cannot make it float on its
back."
> >
> > ~Dakota Jack~
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
> crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > ---
> >
> > "This message may contain confidential and/or privileged information.
> > If you are not the addressee or authorized to receive this for the
> > addressee, you must not use, copy, disclose, or take any action based
> > on this message or any information herein. If you have received this
> > message in error, please advise the sender immediately by reply e-mail
> > and delete this message. Thank you for your cooperation."
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --

> Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.
> --

>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: LookupDispatchAction : Cancel Button : html:cancel

2005-01-25 Thread Deb, Sujan
Hi Toll,

Your observation is correct. If you use LookupDispatchAction for creating
your own action class, and if you specify validate="true" in your
struts-config.xml then Struts will always validate the input regardless
which method in your action class is invoked.

One of the solution is to set validate="true" in the struts-config.xml and
ask Struts to perform or bypass the validation in your corresponding execute
methods in the action class. Like:

errors = form.validate(mapping, request);
if (!errors.isEmpty()) {
saveMessages(request, errors);
return new ActionForward(mapping.getInput());
}

I hope this will help you.

Moreover, try to avoid LookupDispatchAction because of the performance
issues in it because it creates a reverse map to lookup the method to
execute. Rather try to use the plain DispatchAction. It is just a suggestion
from my own experience.

Regards
Sujan

Sujan Deb
[EMAIL PROTECTED]

20 Dundas Street W, 6th Floor
Toronto, ON, Canada

416-861-5242
2-5242




-Original Message-
From: Toll, Marvin (M.) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 11:01 AM
To: user@struts.apache.org
Subject: LookupDispatchAction : Cancel Button : html:cancel



It appears that extending LookupDispatchAction does *not* cause
validation to be bypassed when the following tag is used in a JSP:






Two Questions

1) Are we incorrect in our observation?

2) Does anyone have a better solution than the attached?

// Message for cancel button.
public static final String CANCEL_BUTTON_RESOURCE =
"common.button.cancel";
public static final String BACK_BUTTON_RESOURCE =
"common.button.back";
// LookupDispatchAction parameter name.
public static final String LOOKUP_DISPATCH_ACTION_PARAMETER =
"method";
 

/**
 *  This method is overridden to support page
 * submission without validating in three specific contexts
 * when the action class extends LookupDispatchAction.
 * (1) A drop-down list box submitted via JavaScript
 * whose selection is used to trigger initialization of other
attributes.
 * (2) A cancel button was used for submission.  (3) A back button
was
 * used for submission.
 *
 * @param request The servlet request we are processing
 * @param response The servlet response we are creating
 * @param form The ActionForm instance we are populating
 * @param mapping The ActionMapping we are using
 *
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet exception occurs
 */
protected boolean processValidate(
HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
throws IOException, ServletException {

String METHOD_NAME = "processValidate";
log.entering(CLASS_NAME, METHOD_NAME);

// Declaration.
boolean valid;

// Determine if LookupDispatchAction is being extended for this
request. 
if (mapping.getParameter() != null
&& mapping.getParameter().equals(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER)) {

// Obtain the message resource bundle.
MessageResources messageResources =
this.getResources(request);

// Determine if a value has not been established in the
request object.
if (request
 
.getParameter(Constants.LOOKUP_DISPATCH_ACTION_PARAMETER)
== null) {

// Initialize the method name to be supported in a
LookupDispatchAction.
String[] methodName = { Constants.METHOD_RETURN_TO_PAGE
};

// Establish the default - supportable as a base class
method.
request.getParameterMap().put(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER,
methodName);

// Return without validating.
valid = true;

// Determine if the cancel or back button was selected.

} else if (
request.getParameter(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER).equals(
messageResources.getMessage(
Constants.CANCEL_BUTTON_RESOURCE))
|| request.getParameter(
 
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER).equals(
messageResources.getMessage(
Constants.BACK_BUTTON_RESOURCE))) {

// Return without validating.
valid = true;

} else {
// Process validations.
valid = super.processValidate(request, response, form,
mapping);
}
} else {
// Process validations.
valid = super.processValidate(request, response, form,
mapping);
}

log.exiting(CLASS_NAME, METHOD_NAME);
return valid;
}


struts and java script and jsp

2005-01-25 Thread Nadia Kunkov
Hi,

I'm not sure if this question is really about struts even though it occures in 
my struts application.  My apologies if this is a bit off topic.
I have a jsp logon page with two input fields "userId' and "password"
I of course have a corresponding ActionForm with the same attributes.
When I open my Logon page in Mozilla I have no problem whatosever.
When I open it in IE it's done with errors on page and  I have the following 
message:
document.forms["logonForm"].elements["username"].type is null or not an object

When I looked at the page source I saw the following javascript added:




I'm wondering why this javascript is being added and does it have anything to 
do with struts?
Also, could the problem be that it refers to element["username"] that does not 
exist in my jsp, since I have "userId"?
Then, where does it come up with "username"?
How do I get around it?
Should I change my form to have "username"?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] PropertyUtils internals (Re: Select Multiple Issues)

2005-01-25 Thread Wendy Smoak
From: "Joe Germuska" <[EMAIL PROTECTED]>

> I haven't actually looked at this in a running debugger, or with log
> output, but the code which governs this ultimately is
> PropertyUtilsbean.setIndexedProperty(...)

I found what I think is an open bug about the original issue that was
raised-- BeanUtils being unable to set a property when both setProp(int,
String) and setProp( String[]).  (Actually the bug is about the 'get' side
of the problem, but I'm betting it's the same issue.)

http://issues.apache.org/bugzilla/show_bug.cgi?id=28358

I added the beginnings of a test case to demonstrate the problem with
setting an indexed property when the bean has both setProp(String[]) and
setProp(int, String) methods.  It fails with the same 'argument type
mismatch' that Will Stranathan was getting.

-- 
Wendy Smoak


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



LookupDispatchAction : Cancel Button : html:cancel

2005-01-25 Thread Toll, Marvin \(M.\)

It appears that extending LookupDispatchAction does *not* cause
validation to be bypassed when the following tag is used in a JSP:






Two Questions

1) Are we incorrect in our observation?

2) Does anyone have a better solution than the attached?

// Message for cancel button.
public static final String CANCEL_BUTTON_RESOURCE =
"common.button.cancel";
public static final String BACK_BUTTON_RESOURCE =
"common.button.back";
// LookupDispatchAction parameter name.
public static final String LOOKUP_DISPATCH_ACTION_PARAMETER =
"method";
 

/**
 *  This method is overridden to support page
 * submission without validating in three specific contexts
 * when the action class extends LookupDispatchAction.
 * (1) A drop-down list box submitted via JavaScript
 * whose selection is used to trigger initialization of other
attributes.
 * (2) A cancel button was used for submission.  (3) A back button
was
 * used for submission.
 *
 * @param request The servlet request we are processing
 * @param response The servlet response we are creating
 * @param form The ActionForm instance we are populating
 * @param mapping The ActionMapping we are using
 *
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet exception occurs
 */
protected boolean processValidate(
HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
throws IOException, ServletException {

String METHOD_NAME = "processValidate";
log.entering(CLASS_NAME, METHOD_NAME);

// Declaration.
boolean valid;

// Determine if LookupDispatchAction is being extended for this
request. 
if (mapping.getParameter() != null
&& mapping.getParameter().equals(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER)) {

// Obtain the message resource bundle.
MessageResources messageResources =
this.getResources(request);

// Determine if a value has not been established in the
request object.
if (request
 
.getParameter(Constants.LOOKUP_DISPATCH_ACTION_PARAMETER)
== null) {

// Initialize the method name to be supported in a
LookupDispatchAction.
String[] methodName = { Constants.METHOD_RETURN_TO_PAGE
};

// Establish the default - supportable as a base class
method.
request.getParameterMap().put(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER,
methodName);

// Return without validating.
valid = true;

// Determine if the cancel or back button was selected.

} else if (
request.getParameter(
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER).equals(
messageResources.getMessage(
Constants.CANCEL_BUTTON_RESOURCE))
|| request.getParameter(
 
Constants.LOOKUP_DISPATCH_ACTION_PARAMETER).equals(
messageResources.getMessage(
Constants.BACK_BUTTON_RESOURCE))) {

// Return without validating.
valid = true;

} else {
// Process validations.
valid = super.processValidate(request, response, form,
mapping);
}
} else {
// Process validations.
valid = super.processValidate(request, response, form,
mapping);
}

log.exiting(CLASS_NAME, METHOD_NAME);
return valid;
}


*  Cell Phone: 248.866.4897 (free incoming calls)




Re: A table on a form from a List of Lists

2005-01-25 Thread Olasoji Ajayi
if this works, it will take care of writing the table to the jsp but i need 
an html input type of field so i can also set the properties of the 
ActionForm by editing the fields and submiting the form.
- Original Message - 
From: "Cedric Levieux" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "Hubert Rabago" 
<[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2005 3:36 PM
Subject: Re: A table on a form from a List of Lists


Hi,
There is a way :


   
   
   
   
   
   
   


Regards,
Cedric
- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "Hubert Rabago"
<[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2005 3:25 PM
Subject: Re: A table on a form from a List of Lists


the method did not work, i think its because the nested tags deal with
beans
nested in beans but this deals with lists in a list in a bean (like a 2
dimensional array), i was hoping if i code the property like
property[row][col], if will call my getter method String getProperty(int
row, int col) since it calls String getProperty(int index) for property
specified as property[index].
all the methods i have used either comes up with the erron no gettter
method
for this or that or null attribute.
i am begining to think there is no way to get/set a two dimentional array
type of data in a form bean other than to make the property also beans.
i would really appreciate any help because i want to keep my property as 
a
list of lists. the form bean is like:

public class myBean extends ActionForm{
  private List table = new ArrayList();
/// other propeties that are of type string
public List getTable(){
  return table;
}
public List getRow(int row){
  return (List)table.get(row);
}
public String getField(int row, int col){
  return (String)((List)table.get(row)).get(col);
}
 and corresponding setter methods
i wrote the acessor methods this way so i can specify different property
to
get different componentof the bean's property.
the problem i have is how to code a jsp to call the getter/setter methods

with two int arguments, i dont know very much about the bean
specification.
can anyone tell me how to code my jsp or ActionForm to get the third
accessor methods called, to populate an html:text or set the ActionForm
property from html:text

- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, January 24, 2005 4:18 PM
Subject: Re: A table on a form from a List of Lists

> Take a look at the nested tags.
> In your case, your code may end up looking like:
>
> 
> 
>  
>  
> 
> 
>
> 
> 
>  
>  
> 
> 
>
> Hubert
>
> On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
<[EMAIL PROTECTED]>
> wrote:
>> Hi,
>> i have been trying to create a table on my form from a single property
in
>> my actionForm. the property is a List (actually an ArrayList) containg
>> the rows of the table, each element (i.e row on the table) is
represented
>> by a List of Strings representing the fields of the list. i can code 
>> my
>> JSP page to display the contents of the proprety in a table but i cant
>> get it to set the values of the property from the page on submit. all
the
>> efforts has failed, i my latest effort, i coded the property as
>> property[row][col] but i get an error that dia is no getter method for
>> property[0][0]. i wrote the access methods like
>> String getProperty(int row, int col){
>> return  (String)((List)property.get(row)).get(col);
>> }
>>
>> it did not work, any ideas will be apreciated.
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Sebastian Hennebrueder
Yes and No.
I think that there is a risk to fill the session with a lot of formBeans 
which rest as trash.

At least you should keep it in mind, that
1)
you empty the session when the user follows the normal dialog path.
2)
when you have a large application with lots of users and long sessions, 
you should think about a strategy to clean up the session.

Regards
Sebastian Hennebrueder

http://www.laliluna.de
Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB

Rick Reumann wrote:
Sebastian Hennebrueder wrote the following on 1/25/2005 10:37 AM:
If you have to save the data at the end of both forms, I prefered one 
form and hidden fields.

Yuk, just give the form bean Session scope. Much cleaner in my 
opinion. Way too much of a headache to keep track of which hidden 
fields you need to have on the page as requirements change as the 
application develops. Session scoped forms make sense for situations 
when the user is going to have to move from page to page populating 
data that needs to later be handled.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT]Applet question, open in new JVM

2005-01-25 Thread Ashish Kulkarni
Hi
i know the it was a very very OFF TOPIC question
yes i have started changing my code and do some thing
like DAO in applet :-) where in the display screen
will have no knowledge of data and will use a DAO
fatory to get data object at the time of painting

Ashish
--- Duncan Mills <[EMAIL PROTECTED]> wrote:

> Very Very Off Topic :-)
> 
> Generally the answer to this is you can't.  If you
> use IE you can 
> configure it to start multiple IE processes, in
> which case both can have 
> their own JVM's but that assumes control over the
> User's configuration 
> which is not very sensible, and that the applets
> will be run in separate 
> windows.  The other option is to cheat and use one
> JVM native, and the 
> other as a plug-in - again not very satisfactory,
> and I've seen browsers 
> crash doing that so probably not recommended.
> 
> So I think the solution is to revise the way you
> store the information 
> don't you?
> 
> Regards
> 
> Duncan Mills
> Senior Principal Product Manager
> Oracle Application Development Tools
> 
> [EMAIL PROTECTED]
> 
> 
> 
> Ashish Kulkarni wrote:
> 
> >Hi
> >I was working on a Applet in which i had some
> static
> >methods in a class with some applet data, it was
> >working great untill i had to develop another
> applet
> >which uses these static methods, now the problem is
> >the data is getting mixed when i open both the
> >applets.
> >i want to know if i can open the second applet in
> new
> >JVM so it will be a different applet JVM, as if the
> >applet is from 2 different web sites
> >
> >=
> >A$HI$H
> >
> >
> > 
> >__ 
> >Do you Yahoo!? 
> >Yahoo! Mail - Find what you need with new enhanced
> search.
> >http://info.mail.yahoo.com/mail_250
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >  
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie problem

2005-01-25 Thread Rick Reumann
Robin Ericsson wrote the following on 1/25/2005 10:52 AM:
The select is only there to figure how to populate the next page, 
however I would like the have the selectlist on the next page aswell so 
the client may jump between different months, as it will be in this case.
For this stuff, all my actions usually have a prep(...) method that I 
can call from any of my Action dispatch methods. The prep will set up 
the request with any of those things such as Lists that are needed for 
drop downs. So whatever action method you go to.. just make sure to call 
prep(..) before you leave it and everything will be there. (You could 
also use the Session to store the List so it will be there without you 
having to worry about it, but I'd advise against that approach if you 
can help it.)

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Robin Ericsson
Rick Reumann wrote:
So, If the first page is to be used only to figure out how to populate 
the next page based on a parameter selected from the select list, just 
have the form submit to your Action (assuming a dispatch action it might 
go to "setUpForm" and in that method you pull out from the Request what 
the user selected and then use that for whatever you need in oder to 
populate your action form and then forward on to the form.jsp.

If the first form is used for more than just getting a parameter (you 
collected data that you need to retain) than I would make the form 
session scoped in your struts-config and anything entered on that first 
form will also remain in the form that I'm assuming you are then going 
to foward to again after you do what you need to do when you get the 
parameter you want from the select list.
The select is only there to figure how to populate the next page, 
however I would like the have the selectlist on the next page aswell so 
the client may jump between different months, as it will be in this case.

regards,
Robin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie problem

2005-01-25 Thread Rick Reumann
Sebastian Hennebrueder wrote the following on 1/25/2005 10:37 AM:
If you have to save the data at the end of both forms, I prefered one 
form and hidden fields.
Yuk, just give the form bean Session scope. Much cleaner in my opinion. 
Way too much of a headache to keep track of which hidden fields you need 
to have on the page as requirements change as the application develops. 
Session scoped forms make sense for situations when the user is going to 
have to move from page to page populating data that needs to later be 
handled.

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] PropertyUtils internals (Re: Select Multiple Issues)

2005-01-25 Thread Joe Germuska
At 7:58 AM -0700 1/25/05, Larry Meadors wrote:
There are two things about BU that irritate me (and that is the level
- irritation, not a show stopper by any stretch of the imagination).
1) If I have an Integer (or any Number subclass) property, and someone
keys in "joe", BU turns it into 0 by default. That is the last thing I
want it to do. Zero is a number, "joe" is not - BU should not try to
make it one, it should be null.
2) The static nature of BU makes it a bit funky to customize. I have
not tried to do this myself, but several developers who I know have,
and cuss about it. It would be cool to be able to specify property
conversions at a more granular level - not at the classloader (i.e.,
static) level.
Actually, for quite a while now, the important parts of BeanUtils 
have been performed by instances: BeanUtilsBean, PropertyUtilsBean, 
ConvertUtilsBean etc.  The static methods just do this against a 
singleton instance.  A lot of legacy code continues to use the static 
methods, but you're not stuck with it.

Given this, (1) is manageable also; you can register an 
IntegerConverter with a default value of null.  I'm not sure what it 
would do if you registered it against Integer.TYPE, but it should 
work against Integer.class.

Now, Struts is one of the places with legacy code which uses the 
static methods.  If you decide to get into this, your suggestions on 
how Struts might make it easier for you to configure these things 
would be welcomed.  It might be as simple as creating a chain command 
which could be used in place of the current PopulateForm step, or 
pursuing an idea Ted mentioned once about putting a populate method 
on ActionForm (although I would want to do this in a way which didn't 
depend directly on HttpServletRequest.)

Joe

Larry
On Tue, 25 Jan 2005 08:21:27 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
 At 9:14 PM -0700 1/24/05, Larry Meadors wrote:
 >Nope, actually, it is bean-utils that is at fault here (something all
 >struts developers should be accustomed to saying - IMO, bean-utils is
 >the single weakest component in struts).
 >
 >According to the javabeans specification
 >(http://java.sun.com/products/javabeans/docs/spec.html), indexed
 >properties should look like this:
 >
 >1) void setter(int index, PropertyType value); // indexed setter
 >2) PropertyType getter(int index); // indexed getter
 >3) void setter(PropertyType values[]); // array setter
 >4) PropertyType[] getter(); // array getter
 >
 >But the last time I looked, bean-utils never used the indexed
 >getter/setter methods (#1 or #2) - in fact, it never even called the
 >array setter (#3). Instead, it got a reference to the array by calling
 >method #4, and set the elements in it directly.
 I haven't actually looked at this in a running debugger, or with log
 output, but the code which governs this ultimately is
 PropertyUtilsbean.setIndexedProperty(...)  If you look at the code,
 you'll see that it uses an IndexedPropertyDescriptor if that's what
 the Java introspector returns when asked for the write method for the
 given property.  The "#4" option is only used when the Introspector
 returns a PropertyDescriptor which is not also an
 IndexedPropertyDescriptor.
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java?view=markup
 So, I'm wondering what has you so bothered about beanutils?  There
 was some discussion about a year ago about trying to apply some of
 the strengths of the cglib project to make beanutils better, but that
 hasn't seemed to go anywhere (http://cglib.sourceforge.net).  My
 understanding is that cglib is a much higher performing way of doing
 introspection, but I haven't spent much time looking at it, or how it
 might fit in with (or replace) beanutils.
 Joe
 >Larry
 >
 >On Mon, 24 Jan 2005 15:39:44 -0700, Wendy Smoak 
<[EMAIL PROTECTED]> wrote:
 > >>  From: "Will Stranathan" <[EMAIL PROTECTED]>
 >>
 >>  > Well, I understand the way HTTP is working there, it just SEEMS to be
 >>  > that having the additional method (setBar(int, String)) confused
 >>  > BeanUtils or something - because removing those methods (making no
 >>  > other changes) cleared the problem up.
 >>
 >>  Your original code violated the JavaBeans specification-- you're only
 >>  allowed one pair of get/set methods, and the types have to 
match. (Boolean
 >>  properties have slightly different rules.)  Any additional 
methods will, as
 >>  you found out, confuse the introspection process.
 >
 >-
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]

 --
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
 "Narrow minds are weapons made for mass destruction"  -The Ex
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

--

Re: a plus for sitemesh [was] Re: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Rick Reumann
Benedict, Paul C wrote the following on 1/25/2005 10:38 AM:
When your user edits your page and validation fails, will your request-scope
title still be available? Obviously, not. How do you generally handle the
case when you require some request-scope variables to stick around -- save
them in the form as hidden inputs?
arrghh. Darn good point. I knew there was a reason why I used the 
Session for this in an app I coded a long time ago:) It's only one 
String label that will keep getting over-ridden so it's not going to 
break the bank as far as memory is considered. For those purists that 
say don't you use the Session to store this label - have fun with your 
hidden inputs:)

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: upgrading from 1.1 to 1.2.6 -- any guides?

2005-01-25 Thread Benedict, Paul C
Speaking of 1.2.6, does anyone know what is holding up its release at beta
quality? Are we going to see a GA on this version or in 1.2.7+?

Thanks,
Paul

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 8:46 PM
To: Struts Users Mailing List; Dakota Jack
Subject: Re: upgrading from 1.1 to 1.2.6 -- any guides?


There are 1.1 to 1.2.4 Upgrade notes which should also work for 1.1 to
1.2.6:

   http://wiki.apache.org/struts/StrutsUpgradeNotes11to124

The only additional things for 1.2.6 (as far as I know) is that the
dependencies for Struts changed - so make sure you also upgrade to BeanUtils
1.7.0 and Digester 1.6. I put some notes on 1.2.6 here:

   http://www.niallp.pwp.blueyonder.co.uk/strutsversion.html


Niall

- Original Message - 
From: "Dakota Jack" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Sunday, January 23, 2005 6:18 AM
Subject: upgrading from 1.1 to 1.2.6 -- any guides?


> Are there any guides for upgrading from 1.1 to 1.2.6?  I did what
> should be obvious and had no success.
>
> Jack
>
>
> -- 
> --
>
> "You can lead a horse to water but you cannot make it float on its back."
>
> ~Dakota Jack~
>
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be
crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> ---
>
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based
> on this message or any information herein. If you have received this
> message in error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie problem

2005-01-25 Thread Rick Reumann
Robin Ericsson wrote the following on 1/25/2005 10:29 AM:
I'm new to struts and trying to understand all the new things, but this 
is my problem right now.

I have two forms, one form used for a select-list, and another form that 
 will be dynamically build based on the value selected in the first list.

So, how would I go on doing this? I've come so far that the first form 
is working through an action-class, but how should I request information 
from the form in the action and how should I save the dynamic data so it 
can be used by the view (jsp-page)?

One idea might be to save the data from the first form on http-session, 
and then in the "viewprepareaction" I store the dynamic generated data 
on the request as a Collection ?
Well there a few things I guess to ask first. Is the first form 'only' 
used to get an item from the select list? or does it have other 
information that needs to be saved (ie like a wizard where you go from 
page to page).

So, If the first page is to be used only to figure out how to populate 
the next page based on a parameter selected from the select list, just 
have the form submit to your Action (assuming a dispatch action it might 
go to "setUpForm" and in that method you pull out from the Request what 
the user selected and then use that for whatever you need in oder to 
populate your action form and then forward on to the form.jsp.

If the first form is used for more than just getting a parameter (you 
collected data that you need to retain) than I would make the form 
session scoped in your struts-config and anything entered on that first 
form will also remain in the form that I'm assuming you are then going 
to foward to again after you do what you need to do when you get the 
parameter you want from the select list.

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: a plus for sitemesh [was] Re: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Benedict, Paul C
Rick,

When your user edits your page and validation fails, will your request-scope
title still be available? Obviously, not. How do you generally handle the
case when you require some request-scope variables to stick around -- save
them in the form as hidden inputs?

Thanks,
Paul

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 10:26 AM
To: Struts Users Mailing List
Subject: a plus for sitemesh [was] Re: Best practice for dynamic Title
values using Tiles?


Benedict, Paul C wrote the following on 1/25/2005 10:12 AM:

> I wouldn't worry too much about having a different definition just to
switch
> title. In essence, it is a different view and so it's deserving of a
unique
> entry. Besides, the amount of typing is trivial because Tiles allows
> overriding of definitions, so it is simply a matter of listing out one
> attribute :)

Don't forget though that it's not just a unique tiles def entry, but 
also involves more config for your action mappings definitions and your 
controller forwards. You can't just forward to "my.form.page" you know 
have to make sure you have forwards set up so that they can call a 
unique "my.edit.form.page" and "my.add.form.page," which is ok I guess.

I'm now leaning towards just simply always putting the title and/or page 
header label into the request before leaving an Action. Sure there are 
some drawbacks to this but one of the nice things is it also allows for 
easy creation of some very nice custom labels. For example say you want 
the header to say "Edit the user record for John Doe." In a sense it's 
pretty clean to set up this label in the action vs using el on the page 
to pull out the user name. There seems to be too many times when the 
title needs to be dynamic so constantly adding logic to the header to 
handle this would be a pain.

I know I'm not using Sitemesh now (see previous post about why - 
concerning buffering of large pages can cause problem), but this is 
where Sitemesh really shines. Using Sitemesh, you create your standard 
JSPs(velocity whatever) with titles on them and Sitemesh rips out the 
titles and decorates the whole page with your decorator and inserts the 
title it ripped out. So in this sense you can have unique logic for 
title displays on unique pages and yet the whole page is decorated with 
a common look and feel that you want. (In order to do this, though, 
Sitemesh needs to parse through your whole page first and store it in a 
buffer, which leads to the problem I mentioned previously).


-- 
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie problem

2005-01-25 Thread Sebastian Hennebrueder
Hallo Robin,
you can save the values from the first form in hidden fields on the 
second JSP.
With this you will only need one formBean saving all values.

I think it depends on the application which approach is better.
If you have to save the data at the end of both forms, I prefered one 
form and hidden fields.

If the first select box is only the entrance to forms, then I prefered 
your approach.

Regards
Sebastian Hennebrüder

http:///www.laliluna.de
Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB
Robin Ericsson wrote:
Hi,
I'm new to struts and trying to understand all the new things, but 
this is my problem right now.

I have two forms, one form used for a select-list, and another form 
that  will be dynamically build based on the value selected in the 
first list.

So, how would I go on doing this? I've come so far that the first form 
is working through an action-class, but how should I request 
information from the form in the action and how should I save the 
dynamic data so it can be used by the view (jsp-page)?

One idea might be to save the data from the first form on 
http-session, and then in the "viewprepareaction" I store the dynamic 
generated data on the request as a Collection ?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


newbie problem

2005-01-25 Thread Robin Ericsson
Hi,
I'm new to struts and trying to understand all the new things, but this 
is my problem right now.

I have two forms, one form used for a select-list, and another form that 
 will be dynamically build based on the value selected in the first list.

So, how would I go on doing this? I've come so far that the first form 
is working through an action-class, but how should I request information 
from the form in the action and how should I save the dynamic data so it 
can be used by the view (jsp-page)?

One idea might be to save the data from the first form on http-session, 
and then in the "viewprepareaction" I store the dynamic generated data 
on the request as a Collection ?


regards,
Robin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


a plus for sitemesh [was] Re: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Rick Reumann
Benedict, Paul C wrote the following on 1/25/2005 10:12 AM:
I wouldn't worry too much about having a different definition just to switch
title. In essence, it is a different view and so it's deserving of a unique
entry. Besides, the amount of typing is trivial because Tiles allows
overriding of definitions, so it is simply a matter of listing out one
attribute :)
Don't forget though that it's not just a unique tiles def entry, but 
also involves more config for your action mappings definitions and your 
controller forwards. You can't just forward to "my.form.page" you know 
have to make sure you have forwards set up so that they can call a 
unique "my.edit.form.page" and "my.add.form.page," which is ok I guess.

I'm now leaning towards just simply always putting the title and/or page 
header label into the request before leaving an Action. Sure there are 
some drawbacks to this but one of the nice things is it also allows for 
easy creation of some very nice custom labels. For example say you want 
the header to say "Edit the user record for John Doe." In a sense it's 
pretty clean to set up this label in the action vs using el on the page 
to pull out the user name. There seems to be too many times when the 
title needs to be dynamic so constantly adding logic to the header to 
handle this would be a pain.

I know I'm not using Sitemesh now (see previous post about why - 
concerning buffering of large pages can cause problem), but this is 
where Sitemesh really shines. Using Sitemesh, you create your standard 
JSPs(velocity whatever) with titles on them and Sitemesh rips out the 
titles and decorates the whole page with your decorator and inserts the 
title it ripped out. So in this sense you can have unique logic for 
title displays on unique pages and yet the whole page is decorated with 
a common look and feel that you want. (In order to do this, though, 
Sitemesh needs to parse through your whole page first and store it in a 
buffer, which leads to the problem I mentioned previously).

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reloading plugin

2005-01-25 Thread Ovidiu EFTIMIE
Thanx Cedirn for your help . I think I'll do it this way.


On Tue, 25 Jan 2005 16:06:05 +0100, Cedric Levieux
<[EMAIL PROTECTED]> wrote:
> No they won't but like anything else it's your job to keep track of your
> change with a database or writing file.
> 
> In my point of view accessors are the best thing to change a value withing
> asking the value in the database. But you can store the new value in view of
> keeping the same configuration when you restart the server after a release
> ... or a crash :p
> 
> Regards,
> 
> Cedric
> 
> - Original Message -
> From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> 
> Sent: Tuesday, January 25, 2005 3:58 PM
> Subject: Re: Reloading plugin
> 
> But what happens if the server dies ? I will lose the configuration ?
> Will the accessors modify my struts-config.xml ? I don't think they
> will .
> 
> Ovidiu
> 
> On Tue, 25 Jan 2005 15:54:44 +0100, Cedric Levieux
> <[EMAIL PROTECTED]> wrote:
> > why in database ?
> >
> > public class XxxPlugIn implements PlugIn
> > {
> > private static Log log = LogFactory.getLog(ForumPlugIn.class);
> > private static XxxPlugIn INSTANCE = null;
> >
> > // Other plugin properties
> >
> > public static XxxPlugIn getInstance()
> > {
> > return INSTANCE;
> > }
> >
> > public void init(ActionServlet actionServlet, ModuleConfig
> moduleConfig)
> > throws ServletException
> > {
> > // bla bla bla
> > INSTANCE = this;
> > }
> > }
> >
> > by this way you can get your plugin from everywhere and can change the
> > configuration by accessors.
> >
> > Cedric
> >
> > - Original Message -
> > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, January 25, 2005 3:49 PM
> > Subject: Re: Reloading plugin
> >
> >
> > This could be a solution if I stored the plugin configurations in the
> > database.
> >
> > Thanx.
> >
> > On Tue, 25 Jan 2005 15:45:45 +0100, Cédric Levieux
> > <[EMAIL PROTECTED]> wrote:
> > > What about, like I said, a Web Administration Page for your plugin and
> > > change the plugins configuration with that ?
> > >
> > > Cedric
> > >
> > > On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]>
> > wrote:
> > > > The thing is that the application must be running without any
> > > > interupption. I was thinking about a plugin that watches over the
> > > > other ones inspecting the struts-config file from time to time and
> > > > compare the plugin configurations with the ones alredy loaded.
> > > > Any ideas ?
> > > >
> > > > Ovidiu
> > > >
> > > > On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > >
> > > > > Go to the manager tomcat system and you can stop/start/restart
> > application
> > > > > by application ... but it need to stop the application.
> > > > >
> > > > > The other possibility is to implement your own web admin system for
> > > > > configuring your plugins, replacing the values inside by setters.
> > > > >
> > > > > Hope it can help,
> > > > >
> > > > > Cedric
> > > > >
> > > > > - Original Message -
> > > > > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > > > > To: "Struts Users Mailing List" 
> > > > > Sent: Tuesday, January 25, 2005 2:27 PM
> > > > > Subject: Reloading plugin
> > > > >
> > > > > > Hi,
> > > > > > I have an web apllication, using several plugins that I've made,
> and
> > I
> > > > > > want to be able to change the plugin configuration without
> stopping
> > > > > > the Tomcat. Does anyone knows if it's possible ?
> > > > > >
> > > > > > Thanx,
> > > > > > Ovidiu
> > > > > >
> > > > >
> > > -
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > >
> > > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Benedict, Paul C
Rick,

I wouldn't worry too much about having a different definition just to switch
title. In essence, it is a different view and so it's deserving of a unique
entry. Besides, the amount of typing is trivial because Tiles allows
overriding of definitions, so it is simply a matter of listing out one
attribute :)

Thanks,
Paul

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 24, 2005 5:18 PM
To: Struts Users Mailing List
Subject: Best practice for dynamic Title values using Tiles?


I'm switching back to using Tiles instead of Sitemesh and I remember one 
issue that I found annoying with Tiles and I'd be curious how you guys 
handle it. Say I have a form that is going to be reused for both "Edit" 
and "Add." I want the  attribute to read something like "Add 
Employee" or "Edit Employee," depending on what I'm doing. It seems 
silly to have to create multiple definitions in my tiles-definitions 
that are essentially the same exact definition except that the title has 
changed (potentially you might want a definition to be used for more 
than just the two that I mentioned). This also requires that my struts 
config has to be set up to forward to multiple tiles definitions when 
its really the same page layout but with a different title and could 
really just require one definition to use.

I've thought of different ways I might want to handle this (ie set a 
title in request scope before leaving action and have the header.jsp 
look for this, or maybe use a filter or over-ride RequestProcessor?) I'm 
curious if others have run into this. Maybe the latest Struts/Tiles has 
a solution that I have not looked into.

Thanks

-- 
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Form in wrong scope

2005-01-25 Thread Nils Liebelt
Container specific error. Sorry.


Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 4:38 PM
To: user@struts.apache.org
Subject: Form in wrong scope

Hi everybody,

 
For some reason struts decides to put my form into the session scope instead
of the specified request scope. When does this happen? I am using a
DispatchAction to prepare the view and a LookupDispatch to save forms. 


Regards,

Nils


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Form in wrong scope

2005-01-25 Thread Nils Liebelt
Container specific error. Sorry.


Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 4:38 PM
To: user@struts.apache.org
Subject: Form in wrong scope

Hi everybody,

 
For some reason struts decides to put my form into the session scope instead
of the specified request scope. When does this happen? I am using a
DispatchAction to prepare the view and a LookupDispatch to save forms. 


Regards,

Nils


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DisplayTag

2005-01-25 Thread Martin Wegner

Check out the displaytag mailing list.  It has an excellent community
which is very quick to help.


--Marty

--- Flávio Maldonado <[EMAIL PROTECTED]> wrote:

> Hello people!
> 
> Has anybody here used DisplayTag lib?
> I'm trying to use here but I'm having some problems with Locale...
> 
> 115609 [http8080-Processor23] INFO properties.TableProperties - No 
> LocaleResolver configured.
> 
> 115875 [http8080-Processor23] WARN properties.TableProperties - Unable
> to 
> instantiate the configured I18nResourceProvider due to a 
> java.lang.NoClassDefFoundError exception: 
> org.apache.taglibs.standard.tag.common.fmt.BundleSupport. Falling back
> to 
> default implementation.
> 
> How can I configure the LocaleResolver ???
> 
> Thanks!!
> 
> 
> Flávio Vilasboas Maldonado
> Diretor de Desenvolvimento
> SedNet Soluções em TI
> (35)3471-9381 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reloading plugin

2005-01-25 Thread Cedric Levieux
No they won't but like anything else it's your job to keep track of your
change with a database or writing file.

In my point of view accessors are the best thing to change a value withing
asking the value in the database. But you can store the new value in view of
keeping the same configuration when you restart the server after a release
... or a crash :p

Regards,

Cedric


- Original Message - 
From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 3:58 PM
Subject: Re: Reloading plugin


But what happens if the server dies ? I will lose the configuration ?
Will the accessors modify my struts-config.xml ? I don't think they
will .

Ovidiu


On Tue, 25 Jan 2005 15:54:44 +0100, Cedric Levieux
<[EMAIL PROTECTED]> wrote:
> why in database ?
>
> public class XxxPlugIn implements PlugIn
> {
> private static Log log = LogFactory.getLog(ForumPlugIn.class);
> private static XxxPlugIn INSTANCE = null;
>
> // Other plugin properties
>
> public static XxxPlugIn getInstance()
> {
> return INSTANCE;
> }
>
> public void init(ActionServlet actionServlet, ModuleConfig
moduleConfig)
> throws ServletException
> {
> // bla bla bla
> INSTANCE = this;
> }
> }
>
> by this way you can get your plugin from everywhere and can change the
> configuration by accessors.
>
> Cedric
>
> - Original Message -
> From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 3:49 PM
> Subject: Re: Reloading plugin
>
>
> This could be a solution if I stored the plugin configurations in the
> database.
>
> Thanx.
>
> On Tue, 25 Jan 2005 15:45:45 +0100, Cédric Levieux
> <[EMAIL PROTECTED]> wrote:
> > What about, like I said, a Web Administration Page for your plugin and
> > change the plugins configuration with that ?
> >
> > Cedric
> >
> > On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]>
> wrote:
> > > The thing is that the application must be running without any
> > > interupption. I was thinking about a plugin that watches over the
> > > other ones inspecting the struts-config file from time to time and
> > > compare the plugin configurations with the ones alredy loaded.
> > > Any ideas ?
> > >
> > > Ovidiu
> > >
> > > On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Go to the manager tomcat system and you can stop/start/restart
> application
> > > > by application ... but it need to stop the application.
> > > >
> > > > The other possibility is to implement your own web admin system for
> > > > configuring your plugins, replacing the values inside by setters.
> > > >
> > > > Hope it can help,
> > > >
> > > > Cedric
> > > >
> > > > - Original Message -
> > > > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" 
> > > > Sent: Tuesday, January 25, 2005 2:27 PM
> > > > Subject: Reloading plugin
> > > >
> > > > > Hi,
> > > > > I have an web apllication, using several plugins that I've made,
and
> I
> > > > > want to be able to change the plugin configuration without
stopping
> > > > > the Tomcat. Does anyone knows if it's possible ?
> > > > >
> > > > > Thanx,
> > > > > Ovidiu
> > > > >
> > > >
> > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirecting to outside the webapp

2005-01-25 Thread Jesus M. Rodriguez
Thanks Hubert,
Looks like the manual redirect works.  The path would work
but I really don't know the hostname the app will be installed
on.  Best to simply redirect manually.
Thanks
Jesus Rodriguez
Hubert Rabago wrote:
If you create your own ActionForward, and you redirect with a string
that starts with "/", the result will still be the same.  You can
either do the redirect yourself as Wendy suggested or put the entire
URL on the path you've configured:
http://hostname/index.pxt"; redirect="true"/>
Hubert 

On Mon, 24 Jan 2005 16:37:03 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
From: "Jesus M. Rodriguez" <[EMAIL PROTECTED]>
I want to be sent to http://hostname/index.pxt after the LoginSubmit
action has been executed.  But we always get sent to
http://hostname/webappname/index.pxt which causes a 404.
IIRC, from execute you can either create your own ActionForward (rather than
looking it up from the ActionMapping) and return it, or just do the redirect
yourself and return null.
--
Wendy Smoak

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DisplayTag

2005-01-25 Thread Flávio Maldonado
Hello people!
Has anybody here used DisplayTag lib?
I'm trying to use here but I'm having some problems with Locale...
115609 [http8080-Processor23] INFO properties.TableProperties - No 
LocaleResolver configured.

115875 [http8080-Processor23] WARN properties.TableProperties - Unable to 
instantiate the configured I18nResourceProvider due to a 
java.lang.NoClassDefFoundError exception: 
org.apache.taglibs.standard.tag.common.fmt.BundleSupport. Falling back to 
default implementation.

How can I configure the LocaleResolver ???
Thanks!!
Flávio Vilasboas Maldonado
Diretor de Desenvolvimento
SedNet Soluções em TI
(35)3471-9381 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reloading plugin

2005-01-25 Thread Ovidiu EFTIMIE
But what happens if the server dies ? I will lose the configuration ?
Will the accessors modify my struts-config.xml ? I don't think they
will .

Ovidiu


On Tue, 25 Jan 2005 15:54:44 +0100, Cedric Levieux
<[EMAIL PROTECTED]> wrote:
> why in database ?
> 
> public class XxxPlugIn implements PlugIn
> {
> private static Log log = LogFactory.getLog(ForumPlugIn.class);
> private static XxxPlugIn INSTANCE = null;
> 
> // Other plugin properties
> 
> public static XxxPlugIn getInstance()
> {
> return INSTANCE;
> }
> 
> public void init(ActionServlet actionServlet, ModuleConfig moduleConfig)
> throws ServletException
> {
> // bla bla bla
> INSTANCE = this;
> }
> }
> 
> by this way you can get your plugin from everywhere and can change the
> configuration by accessors.
> 
> Cedric
> 
> - Original Message -
> From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 3:49 PM
> Subject: Re: Reloading plugin
> 
> 
> This could be a solution if I stored the plugin configurations in the
> database.
> 
> Thanx.
> 
> On Tue, 25 Jan 2005 15:45:45 +0100, Cédric Levieux
> <[EMAIL PROTECTED]> wrote:
> > What about, like I said, a Web Administration Page for your plugin and
> > change the plugins configuration with that ?
> >
> > Cedric
> >
> > On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]>
> wrote:
> > > The thing is that the application must be running without any
> > > interupption. I was thinking about a plugin that watches over the
> > > other ones inspecting the struts-config file from time to time and
> > > compare the plugin configurations with the ones alredy loaded.
> > > Any ideas ?
> > >
> > > Ovidiu
> > >
> > > On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > Go to the manager tomcat system and you can stop/start/restart
> application
> > > > by application ... but it need to stop the application.
> > > >
> > > > The other possibility is to implement your own web admin system for
> > > > configuring your plugins, replacing the values inside by setters.
> > > >
> > > > Hope it can help,
> > > >
> > > > Cedric
> > > >
> > > > - Original Message -
> > > > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" 
> > > > Sent: Tuesday, January 25, 2005 2:27 PM
> > > > Subject: Reloading plugin
> > > >
> > > > > Hi,
> > > > > I have an web apllication, using several plugins that I've made, and
> I
> > > > > want to be able to change the plugin configuration without stopping
> > > > > the Tomcat. Does anyone knows if it's possible ?
> > > > >
> > > > > Thanx,
> > > > > Ovidiu
> > > > >
> > > >
> > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] PropertyUtils internals (Re: Select Multiple Issues)

2005-01-25 Thread Larry Meadors
There are two things about BU that irritate me (and that is the level
- irritation, not a show stopper by any stretch of the imagination).

1) If I have an Integer (or any Number subclass) property, and someone
keys in "joe", BU turns it into 0 by default. That is the last thing I
want it to do. Zero is a number, "joe" is not - BU should not try to
make it one, it should be null.

2) The static nature of BU makes it a bit funky to customize. I have
not tried to do this myself, but several developers who I know have,
and cuss about it. It would be cool to be able to specify property
conversions at a more granular level - not at the classloader (i.e.,
static) level.

Larry

On Tue, 25 Jan 2005 08:21:27 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 9:14 PM -0700 1/24/05, Larry Meadors wrote:
> >Nope, actually, it is bean-utils that is at fault here (something all
> >struts developers should be accustomed to saying - IMO, bean-utils is
> >the single weakest component in struts).
> >
> >According to the javabeans specification
> >(http://java.sun.com/products/javabeans/docs/spec.html), indexed
> >properties should look like this:
> >
> >1) void setter(int index, PropertyType value); // indexed setter
> >2) PropertyType getter(int index); // indexed getter
> >3) void setter(PropertyType values[]); // array setter
> >4) PropertyType[] getter(); // array getter
> >
> >But the last time I looked, bean-utils never used the indexed
> >getter/setter methods (#1 or #2) - in fact, it never even called the
> >array setter (#3). Instead, it got a reference to the array by calling
> >method #4, and set the elements in it directly.
> 
> I haven't actually looked at this in a running debugger, or with log
> output, but the code which governs this ultimately is
> PropertyUtilsbean.setIndexedProperty(...)  If you look at the code,
> you'll see that it uses an IndexedPropertyDescriptor if that's what
> the Java introspector returns when asked for the write method for the
> given property.  The "#4" option is only used when the Introspector
> returns a PropertyDescriptor which is not also an
> IndexedPropertyDescriptor.
> 
> http://cvs.apache.org/viewcvs.cgi/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java?view=markup
> 
> So, I'm wondering what has you so bothered about beanutils?  There
> was some discussion about a year ago about trying to apply some of
> the strengths of the cglib project to make beanutils better, but that
> hasn't seemed to go anywhere (http://cglib.sourceforge.net).  My
> understanding is that cglib is a much higher performing way of doing
> introspection, but I haven't spent much time looking at it, or how it
> might fit in with (or replace) beanutils.
> 
> Joe
> 
> >Larry
> >
> >On Mon, 24 Jan 2005 15:39:44 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> >>  From: "Will Stranathan" <[EMAIL PROTECTED]>
> >>
> >>  > Well, I understand the way HTTP is working there, it just SEEMS to be
> >>  > that having the additional method (setBar(int, String)) confused
> >>  > BeanUtils or something - because removing those methods (making no
> >>  > other changes) cleared the problem up.
> >>
> >>  Your original code violated the JavaBeans specification-- you're only
> >>  allowed one pair of get/set methods, and the types have to match. (Boolean
> >>  properties have slightly different rules.)  Any additional methods will, 
> >> as
> >>  you found out, confuse the introspection process.
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reloading plugin

2005-01-25 Thread Cedric Levieux
why in database ?

public class XxxPlugIn implements PlugIn
{
private static Log log = LogFactory.getLog(ForumPlugIn.class);
private static XxxPlugIn INSTANCE = null;

// Other plugin properties

public static XxxPlugIn getInstance()
{
return INSTANCE;
}

public void init(ActionServlet actionServlet, ModuleConfig moduleConfig)
throws ServletException
{
// bla bla bla
INSTANCE = this;
}
}

by this way you can get your plugin from everywhere and can change the
configuration by accessors.

Cedric

- Original Message - 
From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 3:49 PM
Subject: Re: Reloading plugin


This could be a solution if I stored the plugin configurations in the
database.

Thanx.


On Tue, 25 Jan 2005 15:45:45 +0100, Cédric Levieux
<[EMAIL PROTECTED]> wrote:
> What about, like I said, a Web Administration Page for your plugin and
> change the plugins configuration with that ?
>
> Cedric
>
> On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]>
wrote:
> > The thing is that the application must be running without any
> > interupption. I was thinking about a plugin that watches over the
> > other ones inspecting the struts-config file from time to time and
> > compare the plugin configurations with the ones alredy loaded.
> > Any ideas ?
> >
> > Ovidiu
> >
> > On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > Go to the manager tomcat system and you can stop/start/restart
application
> > > by application ... but it need to stop the application.
> > >
> > > The other possibility is to implement your own web admin system for
> > > configuring your plugins, replacing the values inside by setters.
> > >
> > > Hope it can help,
> > >
> > > Cedric
> > >
> > > - Original Message -
> > > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Tuesday, January 25, 2005 2:27 PM
> > > Subject: Reloading plugin
> > >
> > > > Hi,
> > > > I have an web apllication, using several plugins that I've made, and
I
> > > > want to be able to change the plugin configuration without stopping
> > > > the Tomcat. Does anyone knows if it's possible ?
> > > >
> > > > Thanx,
> > > > Ovidiu
> > > >
> > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best practice for dynamic Title values using Tiles?

2005-01-25 Thread Rick Reumann
Dakota Jack wrote the following on 1/25/2005 2:11 AM:
I just have a  and feed the appropriate
value to the request.  State is a class as follows:
public class StateContainer
implements Map {
  private Map map;

The whole problem with these suggestions to use the Request for putting 
in a title in your Action (even if it's putting it in your State map) is 
that it seems a shame that your controller now has to worry about what 
to display. It's just one more annoyance to have to deal with. It's sort 
of funny also because we often work so diligently to use all 
tags/JSTL/EL on the page and no scriplets with the impetus for this 
movement often driven by the theory that web designers wouldn't have to 
deal with Java code (I know never works that way:). Now, though, with 
the 'title' problem I've brought up, a web designer has to actually dig 
into an Action class to make sure the correct title is being set - much 
more of a pain than even dealing with scriplets imo.

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reloading plugin

2005-01-25 Thread Ovidiu EFTIMIE
This could be a solution if I stored the plugin configurations in the database.

Thanx.


On Tue, 25 Jan 2005 15:45:45 +0100, Cédric Levieux
<[EMAIL PROTECTED]> wrote:
> What about, like I said, a Web Administration Page for your plugin and
> change the plugins configuration with that ?
> 
> Cedric
> 
> On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]> wrote:
> > The thing is that the application must be running without any
> > interupption. I was thinking about a plugin that watches over the
> > other ones inspecting the struts-config file from time to time and
> > compare the plugin configurations with the ones alredy loaded.
> > Any ideas ?
> >
> > Ovidiu
> >
> > On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > Go to the manager tomcat system and you can stop/start/restart application
> > > by application ... but it need to stop the application.
> > >
> > > The other possibility is to implement your own web admin system for
> > > configuring your plugins, replacing the values inside by setters.
> > >
> > > Hope it can help,
> > >
> > > Cedric
> > >
> > > - Original Message -
> > > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Tuesday, January 25, 2005 2:27 PM
> > > Subject: Reloading plugin
> > >
> > > > Hi,
> > > > I have an web apllication, using several plugins that I've made, and I
> > > > want to be able to change the plugin configuration without stopping
> > > > the Tomcat. Does anyone knows if it's possible ?
> > > >
> > > > Thanx,
> > > > Ovidiu
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reloading plugin

2005-01-25 Thread Cédric Levieux
What about, like I said, a Web Administration Page for your plugin and
change the plugins configuration with that ?

Cedric

On Tue, 25 Jan 2005 16:42:14 +0200, Ovidiu EFTIMIE <[EMAIL PROTECTED]> wrote:
> The thing is that the application must be running without any
> interupption. I was thinking about a plugin that watches over the
> other ones inspecting the struts-config file from time to time and
> compare the plugin configurations with the ones alredy loaded.
> Any ideas ?
> 
> Ovidiu
> 
> On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Go to the manager tomcat system and you can stop/start/restart application
> > by application ... but it need to stop the application.
> >
> > The other possibility is to implement your own web admin system for
> > configuring your plugins, replacing the values inside by setters.
> >
> > Hope it can help,
> >
> > Cedric
> >
> > - Original Message -
> > From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, January 25, 2005 2:27 PM
> > Subject: Reloading plugin
> >
> > > Hi,
> > > I have an web apllication, using several plugins that I've made, and I
> > > want to be able to change the plugin configuration without stopping
> > > the Tomcat. Does anyone knows if it's possible ?
> > >
> > > Thanx,
> > > Ovidiu
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reloading plugin

2005-01-25 Thread Ovidiu EFTIMIE
The thing is that the application must be running without any
interupption. I was thinking about a plugin that watches over the
other ones inspecting the struts-config file from time to time and
compare the plugin configurations with the ones alredy loaded.
Any ideas ?

Ovidiu


On Tue, 25 Jan 2005 14:31:05 +0100, Cedric Levieux
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Go to the manager tomcat system and you can stop/start/restart application
> by application ... but it need to stop the application.
>
> The other possibility is to implement your own web admin system for
> configuring your plugins, replacing the values inside by setters.
>
> Hope it can help,
>
> Cedric
>
> - Original Message -
> From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, January 25, 2005 2:27 PM
> Subject: Reloading plugin
>
> > Hi,
> > I have an web apllication, using several plugins that I've made, and I
> > want to be able to change the plugin configuration without stopping
> > the Tomcat. Does anyone knows if it's possible ?
> >
> > Thanx,
> > Ovidiu
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Form in wrong scope

2005-01-25 Thread Nils Liebelt
Hi everybody,

 
For some reason struts decides to put my form into the session scope instead
of the specified request scope. When does this happen? I am using a
DispatchAction to prepare the view and a LookupDispatch to save forms. 


Regards,

Nils


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Form in wrong scope

2005-01-25 Thread Nils Liebelt
Hi everybody,

 
For some reason struts decides to put my form into the session scope instead
of the specified request scope. When does this happen? I am using a
DispatchAction to prepare the view and a LookupDispatch to save forms. 


Regards,

Nils


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A table on a form from a List of Lists

2005-01-25 Thread Cedric Levieux
Hi,

There is a way :













Regards,

Cedric

- Original Message - 
From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "Hubert Rabago"
<[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2005 3:25 PM
Subject: Re: A table on a form from a List of Lists


> the method did not work, i think its because the nested tags deal with
beans
> nested in beans but this deals with lists in a list in a bean (like a 2
> dimensional array), i was hoping if i code the property like
> property[row][col], if will call my getter method String getProperty(int
> row, int col) since it calls String getProperty(int index) for property
> specified as property[index].
> all the methods i have used either comes up with the erron no gettter
method
> for this or that or null attribute.
>
> i am begining to think there is no way to get/set a two dimentional array
> type of data in a form bean other than to make the property also beans.
>
> i would really appreciate any help because i want to keep my property as a
> list of lists. the form bean is like:
>
> public class myBean extends ActionForm{
>   private List table = new ArrayList();
> /// other propeties that are of type string
>
> public List getTable(){
>   return table;
> }
>
> public List getRow(int row){
>   return (List)table.get(row);
> }
>
> public String getField(int row, int col){
>   return (String)((List)table.get(row)).get(col);
> }
>
>  and corresponding setter methods
>
> i wrote the acessor methods this way so i can specify different property
to
> get different componentof the bean's property.
>
> the problem i have is how to code a jsp to call the getter/setter methods

> with two int arguments, i dont know very much about the bean
specification.
> can anyone tell me how to code my jsp or ActionForm to get the third
> accessor methods called, to populate an html:text or set the ActionForm
> property from html:text
>
>
>
> - Original Message - 
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Monday, January 24, 2005 4:18 PM
> Subject: Re: A table on a form from a List of Lists
>
>
> > Take a look at the nested tags.
> > In your case, your code may end up looking like:
> >
> > 
> > 
> >  
> >  
> > 
> > 
> >
> > 
> > 
> >  
> >  
> > 
> > 
> >
> > Hubert
> >
> > On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi
<[EMAIL PROTECTED]>
> > wrote:
> >> Hi,
> >> i have been trying to create a table on my form from a single property
in
> >> my actionForm. the property is a List (actually an ArrayList) containg
> >> the rows of the table, each element (i.e row on the table) is
represented
> >> by a List of Strings representing the fields of the list. i can code my
> >> JSP page to display the contents of the proprety in a table but i cant
> >> get it to set the values of the property from the page on submit. all
the
> >> efforts has failed, i my latest effort, i coded the property as
> >> property[row][col] but i get an error that dia is no getter method for
> >> property[0][0]. i wrote the access methods like
> >> String getProperty(int row, int col){
> >> return  (String)((List)property.get(row)).get(col);
> >> }
> >>
> >> it did not work, any ideas will be apreciated.
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] PropertyUtils internals (Re: Select Multiple Issues)

2005-01-25 Thread Joe Germuska
At 9:14 PM -0700 1/24/05, Larry Meadors wrote:
Nope, actually, it is bean-utils that is at fault here (something all
struts developers should be accustomed to saying - IMO, bean-utils is
the single weakest component in struts).
According to the javabeans specification
(http://java.sun.com/products/javabeans/docs/spec.html), indexed
properties should look like this:
1) void setter(int index, PropertyType value); // indexed setter
2) PropertyType getter(int index); // indexed getter
3) void setter(PropertyType values[]); // array setter
4) PropertyType[] getter(); // array getter
But the last time I looked, bean-utils never used the indexed
getter/setter methods (#1 or #2) - in fact, it never even called the
array setter (#3). Instead, it got a reference to the array by calling
method #4, and set the elements in it directly.
I haven't actually looked at this in a running debugger, or with log 
output, but the code which governs this ultimately is 
PropertyUtilsbean.setIndexedProperty(...)  If you look at the code, 
you'll see that it uses an IndexedPropertyDescriptor if that's what 
the Java introspector returns when asked for the write method for the 
given property.  The "#4" option is only used when the Introspector 
returns a PropertyDescriptor which is not also an 
IndexedPropertyDescriptor.

http://cvs.apache.org/viewcvs.cgi/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java?view=markup
So, I'm wondering what has you so bothered about beanutils?  There 
was some discussion about a year ago about trying to apply some of 
the strengths of the cglib project to make beanutils better, but that 
hasn't seemed to go anywhere (http://cglib.sourceforge.net).  My 
understanding is that cglib is a much higher performing way of doing 
introspection, but I haven't spent much time looking at it, or how it 
might fit in with (or replace) beanutils.

Joe

Larry
On Mon, 24 Jan 2005 15:39:44 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
 From: "Will Stranathan" <[EMAIL PROTECTED]>
 > Well, I understand the way HTTP is working there, it just SEEMS to be
 > that having the additional method (setBar(int, String)) confused
 > BeanUtils or something - because removing those methods (making no
 > other changes) cleared the problem up.
 Your original code violated the JavaBeans specification-- you're only
 allowed one pair of get/set methods, and the types have to match. (Boolean
 properties have slightly different rules.)  Any additional methods will, as
 you found out, confuse the introspection process.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: A table on a form from a List of Lists

2005-01-25 Thread Olasoji Ajayi
the method did not work, i think its because the nested tags deal with beans 
nested in beans but this deals with lists in a list in a bean (like a 2 
dimensional array), i was hoping if i code the property like 
property[row][col], if will call my getter method String getProperty(int 
row, int col) since it calls String getProperty(int index) for property 
specified as property[index].
all the methods i have used either comes up with the erron no gettter method 
for this or that or null attribute.

i am begining to think there is no way to get/set a two dimentional array 
type of data in a form bean other than to make the property also beans.

i would really appreciate any help because i want to keep my property as a 
list of lists. the form bean is like:

public class myBean extends ActionForm{
 private List table = new ArrayList();
/// other propeties that are of type string
public List getTable(){
 return table;
}
public List getRow(int row){
 return (List)table.get(row);
}
public String getField(int row, int col){
 return (String)((List)table.get(row)).get(col);
}
 and corresponding setter methods
i wrote the acessor methods this way so i can specify different property to 
get different componentof the bean's property.

the problem i have is how to code a jsp to call the getter/setter methods 
with two int arguments, i dont know very much about the bean specification. 
can anyone tell me how to code my jsp or ActionForm to get the third 
accessor methods called, to populate an html:text or set the ActionForm 
property from html:text


- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, January 24, 2005 4:18 PM
Subject: Re: A table on a form from a List of Lists


Take a look at the nested tags.
In your case, your code may end up looking like:


 
 


   


 
 


Hubert
On Mon, 24 Jan 2005 10:31:59 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> 
wrote:
Hi,
i have been trying to create a table on my form from a single property in 
my actionForm. the property is a List (actually an ArrayList) containg 
the rows of the table, each element (i.e row on the table) is represented 
by a List of Strings representing the fields of the list. i can code my 
JSP page to display the contents of the proprety in a table but i cant 
get it to set the values of the property from the page on submit. all the 
efforts has failed, i my latest effort, i coded the property as 
property[row][col] but i get an error that dia is no getter method for 
property[0][0]. i wrote the access methods like
String getProperty(int row, int col){
return  (String)((List)property.get(row)).get(col);
}

it did not work, any ideas will be apreciated.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Will Stranathan
Fantastic!  That's exactly what I was looking for!  And since I've got 
so much stuff in the form bean, I can just access the stuff directly 
from the form bean.  (I know it's not the RIGHT way to do it, but with 
as many attributes as there are to this, it'd be nice to not have to 
rewrite existing stuff.)

Thanks a ton.
Will
On Tue, 25 Jan 2005 13:36:58 -
 "Niall Pemberton" <[EMAIL PROTECTED]> wrote:
You can do this easily using the  tag and the
RequestDispatcher. I've put a page up on my web site showing how:
http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html
I believe the RequestDispatcher is the "magic" JSP processor you're 
looking
for.

Niall
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: updating lists on the server

2005-01-25 Thread Niall Pemberton
Firstly client side validation isn't dependant on the "validate" attribute
in the struts-config - so you won't miss client validation with the approach
you've taken.

One possible alternative approach would be to create your own custom
DynaValidatorForm class and put the logic whether to validate or not in the
form's validate method.

public class CustomDynaForm extends DynaValidatorForm {

   public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

   if ( doing the update -) {
   return super.validate(mapping, request);
   } else {
   return null;
   }

   }
}

However you're using LookupDispatchAction and that would mean duplicating
the logic in that class which determines which method is being called - i.e.
either the refresh or the update. I don't use any of the flavours of
DispatchAction and LookupDispatchAction IMO is horribly complicated and you
probably won't want to do this.

Niall

- Original Message - 
From: "Simon Pett" <[EMAIL PROTECTED]>
To: "Stuts User" 
Sent: Tuesday, January 25, 2005 1:30 PM
Subject: updating lists on the server


> Hi
>
> I have some doubts about my implementation and am wondering if anyone
> has better solutions. I have done a bit of googling and thought about
> it without finding any great answers which probably means im missing
> something obvious.
>
> I am using a series of drop down lists at the top of my form. When the
> user makes a selection in the first list the dependant subsequent
> lists need to be updated.
>
> pretty standard i guess. However i do not wish to load all
> combinations of the lists into the request and use javascript to make
> the updates. I want the update or refresh to be done as a server
> request, probably in the tiles controller as its still presenation
> logic.
>
> I am using dynaValidatorForms to take advantage of struts validation - dah
>
> When the list is changed I use javascript in the html:select to submit the
form
>
> I figured i can use a lookupDispatchAction with at least two methods
> One, an update method which is invoked from the html:submit
> Two a refreshPresentation method that is executed when the list is
> changed via the javascript.
>
> The refreshPresentation method actually does nothing but forward back
> to the input, which eventually triggers the tile controller. The
> controller then looks at the current form and loads the appropriate
> lists.
>
> The update method populates the model class(es) from the actionForm
> with beanutils etc and then hands on to appropriate command classes
> then finally moves on.
>
> This all works ok, except as the refreshPresentation method does not
> require a validated actionForm in the case where the user has not
> completed later fields, i have to set that action to validate="false".
>
> Then in the update method i have to enact the validation myself. This
> is dumb as i have to duplicate the sturts code at least in a common
> super class and i think i will miss client validation.
>
> So what am i missing
>
> any help appreciated
> Simon
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get the input action path?

2005-01-25 Thread Gianpiero Caretti
[Gianpiero]
The only think I don't like with this solution is that the JSP writer 
has to know the existence of the "command" attribute into request. 
Moreover if the Action writer forgot to call the "setup" method the 
request attribute will not set.
[Jeff Beal]
You can use a custom RequestProcessor instead of a common Action method [...]
Another trick is to write a base Action class with a final execute [...]
Good, even if I prefer the first or your two option: the custom 
RequestProcessor solves the problem without forcing new rules and without 
forcing all my actions to derive from my base action.

As I told in a previous email, I prefer solutions that don't force new rules 
into team. So, the custom RequestProcessor ensure a new feature into my 
application with no restricions, as well as, if you use Velocity, you just 
need *one* programmer extends the StrutsLinkTool and *all* the JSP/VM writers 
just know, as natural it is, they have an extended $link object into VM pages.

As I already told: no rules, just features!
Gp
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Niall Pemberton
You can do this easily using the  tag and the
RequestDispatcher. I've put a page up on my web site showing how:

http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html

I believe the RequestDispatcher is the "magic" JSP processor you're looking
for.

Niall

- Original Message - 
From: "William Stranathan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 11:00 AM
Subject: OT - Evaulating JSP as internal template?


> The subject is prolly a poor way to say what I'm trying to say
>
> Does anybody know of a simple way to use JSP as an INTERNAL templating
> engine.  For example, if I have a struts application where I'm
> generating an email to send, I currently have to use Velocity on the
> server side to put the values into the template, then send that.
>
> Is there a simple way to do the same with JSP?  Would I be best served
> by on the server side, constructing an HTTP request to a JSP that simply
> pops in the request attributes into the correc place?
>
> High-level of what I want to do:
>
> ActionForward execute(mapping, form, request, response) {
>MyForm myform = (MyForm)form;
>
>Hashtable vals = new Hashtable();
>vals.put("user",form.getUser());
>vals.put("car",form.getCar());
>
>JSPProcessor proc = new JSPProcessor();
>proc.getRequestScope().put("values",vals);
>StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");
>
>MailUtils.mail("[EMAIL PROTECTED]",buff);
> }
>
> Where JSPProcessor is the kind of magic I'm looking for.  I don't really
> see anything built into the API spec, so I SUSPECT if there were
> anything available in Tomcat, for instance, it would be implementation
> specific.
>
> Not a HUGE deal, but it's kinda' a pain to have to train new folks on
> how to put together the JSP's AND how to put together the velocity
> templates.
>
> Thanks,
> Will
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



updating lists on the server

2005-01-25 Thread Simon Pett
Hi 

I have some doubts about my implementation and am wondering if anyone
has better solutions. I have done a bit of googling and thought about
it without finding any great answers which probably means im missing
something obvious.

I am using a series of drop down lists at the top of my form. When the
user makes a selection in the first list the dependant subsequent
lists need to be updated.

pretty standard i guess. However i do not wish to load all
combinations of the lists into the request and use javascript to make
the updates. I want the update or refresh to be done as a server
request, probably in the tiles controller as its still presenation
logic.

I am using dynaValidatorForms to take advantage of struts validation - dah

When the list is changed I use javascript in the html:select to submit the form

I figured i can use a lookupDispatchAction with at least two methods
One, an update method which is invoked from the html:submit 
Two a refreshPresentation method that is executed when the list is
changed via the javascript.

The refreshPresentation method actually does nothing but forward back
to the input, which eventually triggers the tile controller. The
controller then looks at the current form and loads the appropriate
lists.

The update method populates the model class(es) from the actionForm
with beanutils etc and then hands on to appropriate command classes
then finally moves on.

This all works ok, except as the refreshPresentation method does not
require a validated actionForm in the case where the user has not
completed later fields, i have to set that action to validate="false".

Then in the update method i have to enact the validation myself. This
is dumb as i have to duplicate the sturts code at least in a common
super class and i think i will miss client validation.

So what am i missing

any help appreciated
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reloading plugin

2005-01-25 Thread Cedric Levieux
Hi,

Go to the manager tomcat system and you can stop/start/restart application
by application ... but it need to stop the application.

The other possibility is to implement your own web admin system for
configuring your plugins, replacing the values inside by setters.

Hope it can help,

Cedric

- Original Message - 
From: "Ovidiu EFTIMIE" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, January 25, 2005 2:27 PM
Subject: Reloading plugin


> Hi,
> I have an web apllication, using several plugins that I've made, and I
> want to be able to change the plugin configuration without stopping
> the Tomcat. Does anyone knows if it's possible ?
>
> Thanx,
> Ovidiu
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reloading plugin

2005-01-25 Thread Ovidiu EFTIMIE
Hi,
I have an web apllication, using several plugins that I've made, and I
want to be able to change the plugin configuration without stopping
the Tomcat. Does anyone knows if it's possible ?

Thanx,
Ovidiu

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validating Array

2005-01-25 Thread Paulo César M. Jeveaux
Hi to All

  I am using DynaActions and I came across myself with a problem. In a
JSP, I have a Loop, that it writes some times the same part of the
Form, as I must validate this? How it is in validation.xml and the
Form of struts-config?

  In the example, the JSP file:

--

  
  
  

--

  Now, as I place these attributes in the Form and the Validation?

-- 
/**
* @author Paulo César M. Jeveaux
* Java Consultant
* @version 20.0
* http://www.portaljava.com
* @deprecated
*/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT - Evaulating JSP as internal template?

2005-01-25 Thread Jason Lea
Hi,
I couldn't find a way to do this, other than using Jelly:  
http://jakarta.apache.org/commons/jelly/

Which uses JEXL which is a EL processing engine, so it looks like JSP 
with EL.  The Jelly tutorial has an example where you can call the 
Embedded object to process a jelly script file.  Jelly scripts are not 
exactly the same though.  I used it for creating some HTML email messages.

William Stranathan wrote:
The subject is prolly a poor way to say what I'm trying to say
Does anybody know of a simple way to use JSP as an INTERNAL templating 
engine.  For example, if I have a struts application where I'm 
generating an email to send, I currently have to use Velocity on the 
server side to put the values into the template, then send that.

Is there a simple way to do the same with JSP?  Would I be best served 
by on the server side, constructing an HTTP request to a JSP that simply 
pops in the request attributes into the correc place?

High-level of what I want to do:
ActionForward execute(mapping, form, request, response) {
  MyForm myform = (MyForm)form;
  Hashtable vals = new Hashtable();
  vals.put("user",form.getUser());
  vals.put("car",form.getCar());
  JSPProcessor proc = new JSPProcessor();
  proc.getRequestScope().put("values",vals);
  StringBuffer buff = proc.evaluate("WEB-INF/templates/email.jsp");
  MailUtils.mail("[EMAIL PROTECTED]",buff);
}
Where JSPProcessor is the kind of magic I'm looking for.  I don't really 
see anything built into the API spec, so I SUSPECT if there were 
anything available in Tomcat, for instance, it would be implementation 
specific.

Not a HUGE deal, but it's kinda' a pain to have to train new folks on 
how to put together the JSP's AND how to put together the velocity 
templates.

Thanks,
Will
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Jason Lea

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.3 - Release Date: 2005.01.24
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   >