Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes how to call a jsp page from another jsp in struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to call a jsp page from another jsp in struts?" Watch "how to call a jsp page from another jsp in struts?" New topic
Author

how to call a jsp page from another jsp in struts?

akash kumar
Ranch Hand

Joined: Jun 13, 2007
Posts: 63
Hi!
How to call a jsp page from another jsp when i click the submit button in struts with out using the action class as intermediate?
[ December 26, 2007: Message edited by: akashkumar kumar ]
Pankaj Kap
Greenhorn

Joined: Apr 30, 2006
Posts: 5
You can use a ForwardAction. You won't require an action to be written for this, just set your type attribute of action tag in struts-config as org.apache.struts.actions.ForwardAction. Refer example below:

<!--example starts-->
<action path="/saveSubscription" type="org.apache.struts.actions.ForwardAction"
name="subscriptionForm"
scope="request"
input="/subscription.jsp"
parameter="/path/to/jsp"/>
<!--example ends-->
[ December 26, 2007: Message edited by: Pankaj Kap ]

SCJP 1.5<br />SCWCD 1.4
akash kumar
Ranch Hand

Joined: Jun 13, 2007
Posts: 63
Thanks Pankaj!
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
you can use <html:link> tag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call a jsp page from another jsp in struts?
 
Similar Threads
JSP to Servlet call
Jsp
Response various from struts page and jsp page
How to call a jsp page from another jsp page in struts
STRUTS PROBLEM