This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "forwards in struts" Watch "forwards in struts" New topic
Author

forwards in struts

venkata kadiyala
Greenhorn

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.
thanks,
venkat
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


SCJP 1.4, SCWCD
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: forwards in struts
 
Similar Threads
[URGENT]Problems with Struts and Tiles
how to call a specific action
I Can not access my welcome file, frame.jsp?
Can I build in Java1.4 and run on Java1.6
Spring MVC behaviour for Struts