This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting Values in JSPs" Watch "Getting Values in JSPs" New topic

Getting Values in JSPs

Kunal Prakash Gandhi

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

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
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
Thanks for your cooperation.
- madhav

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Getting Values in JSPs
It's not a secret anymore!