| Author |
Forwarding data struts.xml
|
shaf maff
Ranch Hand
Joined: Sep 07, 2008
Posts: 180
|
|
Hi Guys,
I hava login action which logs the user in, loads his data and then moves onto the JSP where it is displayed. I have come across one problem though with the struts. If I set my struts to the following:
In the login action, the final result is to forward to manager.jsp. This works perfectly fine. But if I use <result name="manager" type="redirect">ManagerPanel.action</result> in the place of <result>/main/user/manager.jsp</result> the data is not forwarded to the JSP. does anyone know why ? And how I can correct this?
.
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
Hi,
First of all when you redirect your action then you can not get any of your actionError, actionMessage and any of your action variable value.
You have to use either <result>/main/user/manager.jsp</result> jsp or
<result name="manager" type="chain">ManagerPanel</result>
this will solve your problem.
So, remove your result type="redirect"
I am not sure about chain.
But if you use chain may be you can get data.
|
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
|
 |
 |
|
|
subject: Forwarding data struts.xml
|
|
|