Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two jsp's communication

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
* 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
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using struts-2. Will the same suffice?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic