This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes two jsp's communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "two jsp Watch "two jsp New topic
Author

two jsp's communication

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
Hi All..I want some inputs,examples,books,notes on how 2 jsp's communicate with each other or rather the right way to pass values between jsp's and setting them to UI tags etc

Say,moving from jsp1 to jsp2 and sending some data(can be a javascript value et al) prepared in jsp1 which should be set in some table-cell of jsp2 i.e as soon as jsp2 appears to user he should see the value sent from jsp1 set in the table-cell of jsp2 .

Thanks...
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

* Redirect to a servlet first.
* Let the servlet set the required values for JSP2 from an external source and also attach the values of JSP1 from the POST payload to a scope.
* Forward to JSP2 and display all the values.

Parameters are also an option -> http://www.exampledepot.com/egs/javax.servlet.jsp/caller.jsp.html


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
I am using struts-2. Will the same suffice?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two jsp's communication
 
Similar Threads
Need direction for passing values problem+struts2
How To Output the Value of A Hidden Field?
setting values in jsp+struts2
setting values for table cells in javascript
passing JS values between 2 pages