• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forwarding data struts.xml

 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic