It's not a secret anymore!*
The moose likes JSP and the fly likes How can i pass the objects between two jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How can i pass the objects between two jsps" Watch "How can i pass the objects between two jsps" New topic
Author

How can i pass the objects between two jsps

Venkateswarlu Vadde
Greenhorn

Joined: Jan 07, 2006
Posts: 7
How can i pass the objects between two jsps

My situtation:

I've two jsp's, One will display the total report from form and also having edit button for every row

Say for each person details one edit button (Id,FirstName,Add,Phone no, EDIT button)

If Click edit button, I dont wanna to go action class(im using struts)
I want the details to be displayed in second jsp, afterwords i can edit and i'll hit the database

Here i wanna to reduce database hitS,

hOW should I, please help me

Thankx in advance
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
You can pass it within request attributes.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by rathi ji:
You can pass it within request attributes.


Request attributes would probably not help the original poster in this case.
Once the inital page is drawn its request object is gone.
When the user clicks on on of the edit buttons a new request will be generated.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
When clicking the edit button, call the javascript function where you can pass the each values to next jsp page.

This will be suitable when no of passing values is less.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by vidya sagar:
When clicking the edit button, call the javascript function where you can pass the each values to next jsp page.
This will be suitable when no of passing values is less.


I'm at a total loss as to what this post means.
How is he to pass form values from one JSP to another with javascript?
Venkateswarlu Vadde
Greenhorn

Joined: Jan 07, 2006
Posts: 7
hi vidya s

Please explain how can you pass one person details(on clicking edit button) through java script, please provide some code or othewise

my email []

In which scope you are setting the values

Thankx
[ August 31, 2006: Message edited by: Ben Souther ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Venkateswarlu,
Please see:
http://faq.javaranch.com/view?UseTheForumNotEmail
to see why we prefer that technical conversations stay in the forums.

Thanks,
-Ben
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i pass the objects between two jsps
 
Similar Threads
There is no pass by reference in java ?
applet or jsp for comm with servlet ?
Passing an object as a part of Form Post - Possible?
How to do a preview page for submitted form
Display all Users Detail on JSP page when we Loged in through ADMIN