Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple entries to JSP

 
Venkat Ivaturi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are building a web application using Struts framework. I need some help on the Forwarding. Below is my problem.
1. User enters a search criteria and submits to
goto JSP "J1" (Using Action "A1") which
displays Search results.
2. On JSP "J1", when the user clicks on a link,
it goes through an action "A2" and displays
JSP "J2".
3. User clicks on submit "J2" and goes through an
Action "A3". This is where I need help. I want
the control to forward to action "A1".
(re-execute the Action "A1" and display
JSP "J1").
4. There are multiple entry points to go to
JSP "J2". I want to always re-execute the
action that I initially started.
A1 --> J1 --->A2 --->J2 -->A3 -->forward to A1
A11--> J11--->A2 --->J2 -->A3 -->forward to A11
Any ideas/help is much appreciated. Thanks in advance.
[ December 26, 2002: Message edited by: Venkat Ivaturi ]
[ December 26, 2002: Message edited by: Venkat Ivaturi ]
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Venkat Ivaturi:
We are building a web application using Struts framework. I need some help on the Forwarding. Below is my problem.
A1 --> J1 --->A2 --->J2 -->A3 -->forward to A1
A11--> J11--->A2 --->J2 -->A3 -->forward to A11

In your form beans that submit ti A2, use a hidden field indicating your process. The value of this field can then be used to locate the forward you want. In your struts-config.xml you can then define a forward for each name to the appropriate action (with the .do on the path).
 
Lakshmi Kishore
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
once you select the link, you might be getting the data through a object in request or session right...,
if yes, once u submit J2-A2, update the Object and put it in the request or session, and make sure that your forward page is same as input page for the J2-A2.
This could solve your problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic