Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forwards in struts

 
venkata kadiyala
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm relatively new to struts and was just trying to figure out my problem with the forwards that we use in the struts-config.xml file
My problem is I need to call a JSP which is contained in another web application from the forward element in my current web applications "struts-config.xml" file.
A.war's struts-config.xml file should call
For ex: <forward value="success" path="some JSP in B.war"/>
Any suggestions would be greatly appreciated.
thanks,
venkat
 
giang nguyen
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can only send a redirect to a resource in another web application. Forward is impossible. Servlet container will not maintain attributes stored in the request from one web app to another.
To do a sendRedirect, add the context root to the url.
for example: ../yourContextRoot/servlet2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic