Hi
Can someone tell me if this approach is "right" or there is a better way, its something which always gives me a headache when I use
struts.
Say I have the situation where, I want to use request scope action forms.
JSP Screen 1 user enters some data
JSP Screen 2 Application outputs data based on entry on screen1.
Screen 1 will have an action mapped via the
So the Action casts the form passed to Screen1ActionForm(form)
Gets the data out of it screen1ActionForm.getXXXX()
To prepopulate the Screen2ActionForm
It has to
Create an instance of Screen2ActionForm
Populate it via setXXX methods
Put this instance into the correct scope
e.g request.setAttribute(Screen2ActionForm)
Return an ActionForward that maps to Screen2 JSP
What worries me about this approach is that not only does the Action need to know the Class of the ActionForm passed to it (Screen1ActionForm) it also has to know the Class of the Form used in the target jsp (Screen2ActionForm)!
Is this ok???