This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i pass the objects between two jsps

 
Venkateswarlu Vadde
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can pass it within request attributes.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Venkateswarlu,
Please see:
http://faq.javaranch.com/view?UseTheForumNotEmail
to see why we prefer that technical conversations stay in the forums.

Thanks,
-Ben
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic