struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajay Patil" <>
Subject Re: Populating form from request parameters in JSP
Date Fri, 11 Jul 2003 10:20:35 GMT
Thanks Nagi,

Atleast I know that I am not doing something wierd.

Anyway, why does the JSP page care about the origin of the forward.
Why cant it simply autopopulate the form from request parameters ?

Defining an extra action class just to do the forward seems to
unnecessarily increase complexity. What do you think ?


your two jsp pages have  different  action forms associated with them. 
so u cant expect the second jsp page to autopupulate the previous 
request parameters. u have to go thro' the struts thing(action class) 
which will then autopopulate ur new action form and then the jsp page 
associated will show the values..
if both ur jsp pages share a single action form(which is in session) 
then the second jsp page will automatically show the values
hope its clear now
-- nagi
-------Original Message-------
From: Struts Users Mailing List
Date: Friday, July 11, 2003 12:33:32 PM
Subject: Populating form from request parameters in JSP

I know this question has probably been asked several times. But,
possibly a Struts developer can explain because I am confused.

Generally, my action classes receive posted data, query the database, 
put the query result as request attribute and then forward to the 
next JSP.

However, I find that form properties in the next JSP dont get
auto-populated from the request parameters. So, I define a new
action class (associated with the next form), and use it simply
for forwarding. And then I can see the form properties auto-populated.

So, why is this extra step (or extra action class) needed ?

Or am doing something wrong here ?

Please clarify,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message