It's not a secret anymore!
The moose likes Struts and the fly likes forwards in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "forwards in struts" Watch "forwards in struts" New topic

forwards in struts

venkata kadiyala

Joined: May 03, 2004
Posts: 7
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.
giang nguyen
Ranch Hand

Joined: May 13, 2003
Posts: 42
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

I agree. Here's the link:
subject: forwards in struts
It's not a secret anymore!