File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
Consider Paul's rocket mass heater.
subject: Getting Values in JSPs
It's not a secret anymore!