This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Multiple entries to JSP 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 "Multiple entries to JSP" Watch "Multiple entries to JSP" New topic
Author

Multiple entries to JSP

Venkat Ivaturi
Greenhorn

Joined: Dec 26, 2002
Posts: 1
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

Joined: Dec 19, 2002
Posts: 374
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).


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
Lakshmi Kishore
Ranch Hand

Joined: Aug 04, 2001
Posts: 51
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.


Thanks & Regards<br />glkishore
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple entries to JSP
 
Similar Threads
Object reference array assignment
help in array
Arrays
Dan Chisholm's Array Question
Single table two column dependency query