... and the form bean will have a "name" property, and you will remove
the "value" attribute from your "html:text" element.

> -----Original Message-----
> From: Jarnot Voytek Contr AU HQ/SC
[mailto:[EMAIL PROTECTED]]
> 
> If you want to stick to the generally accepted Struts best-practices,
you
> will never link directly to a JSP, only to an Action - which could
then
> populate your form bean before forwarding to the JSP and the JSP tag
would
> automagically have the right value.
> 
> > -----Original Message-----
> > From: Larry Hytail [mailto:[EMAIL PROTECTED]]
> >
> > I have started playing with Struts and have some simple
> > things working well.  I have looked around but can't answer
> > the following.
> >
> > Say I have this in my JSP:
> >
> > <html:text property="name" value="SAM" />
> >
> > Then the field "name" will have a default value of "SAM".
> > But what if I want "SAM" to be variable based on a parameter
> > passed in on the request?  I can't seem to figure out how to
> > do this seemingly simple thing.
> >
> > Say I use URL:
> >
> > http://localhost:8080/web/JSP/depositMail.jsp?name="BOB";
> >
> > and I want "BOB" then to show up as the default value.  How
> > do I code the html tag?
> >
> > I am sure this is simple and will greatly appreciate the push
> > in the right direction.
> >
> > Larry Hytail
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Shopping - Send Flowers for Valentine's Day
> >
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to