If the values are not in the ActionForm, then you don't have to use the html tags. You can use standard JSP techniques to access the request and the session and write the HTML tags. Jakarta Taglibs has some very nice request and session tags that would work well in that use case.
It can still be helpful to use the html:form tag, since this handles the URL rewriting on the submit. But what's in between doesn't matter, so long as it resolves to HTML the browser understands. The html tags can also refer to other beans. So if you had your own request or session bean in play, you could use that for the bean name instead. (The current ActionForm is only the default.) It might be possible to also do something some populate from the request or the session the ActionForm's init(), but, through oversight, init is not called in 1.0 when a ActionForm is instantiated by the JSP. It is called in 1.0.1 and later. Personally, I'm not keen on populating ActionForms directly from the session or request on the JSP itself. Smacks too much of model 1. It would also make the ActionForm less portable to non-JSP environment, like Velocity. And, then, stuff can be missing, so you are into error handling, which is the controller's job. But that's just me. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ "Jon.Ridgway" wrote: > > Hi Derek, > > This is a recurring question in the list. The solution (Ted etc please > correct me if I'm wrong) is to forward to an action first, this creates an > instance of the form (if required) and sets the properties (userloggedin) > before forwarding to the jsp containing the form. > > Ted etc. Can we not extend the form tag and add a default/prepopulate > attribute? When true the forms properties are set (if possible) with the > corresponding request/session attributes. > > Jon Ridgway. > > -----Original Message----- > From: Derek M Wayland [mailto:[EMAIL PROTECTED]] > Sent: 29 November 2001 12:46 > To: [EMAIL PROTECTED] > Subject: hidden tag and request object > > Hi, > > i am trying this below and it is not working as i would like. > > the problem lies with the hidden tag. i want the value to be populated with > the 'request' objects', 'userloggedin' variable. > > is this possible? > can someone advise the correct syntax? > thanks > dmw > > <html:form action="/shopping" method='post'> > > <html:hidden property='userloggedin' name='request'/> > > </html:form> > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

