aspose file tools*
The moose likes JSP and the fly likes Getting Values in JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting Values in JSPs" Watch "Getting Values in JSPs" New topic
Author

Getting Values in JSPs

Kunal Prakash Gandhi
Greenhorn

Joined: Apr 16, 2002
Posts: 11
I am having a jsp called in a frame, which in turn loads a child jsp on a button click.
On this child, i am getting some data from the user. This jsp has a 'back' button that takes him back to the parent. I want to store data on the child as well as the parent and call another jsp.
Where should i store all this data?
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Store the values in session -- this way they will be accessible across all pages of your application.

to store an object in session, call:
session.setAttribute(String name, Object Value);
To retrieve an object from session, call:
Object blah = session.getAttribute(String name);
Hope the Helps!


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
"kunal"
Your name doesn't follow the javaranch guidelines. Please take a moment and change your "Publicly Displayed Name" by modifying your profile, after reviewing the guidelines at http://www.javaranch.com/name.jsp
Thanks for your cooperation.
- madhav


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting Values in JSPs