This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes pass the value to next form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "pass the value to next form" Watch "pass the value to next form" New topic
Author

pass the value to next form

Sujay Nadkarni
Ranch Hand

Joined: Jul 03, 2008
Posts: 34
I have made two forms. The first one has a drop down list. it takes the value from the database. When i click on submit it takes me to another form. There is a drop down list in the other form which again retrieves value from the database. it also has a textbox. I want the value of the textbox to be equal to the selected option of the first form. These are my codes.


2nd form




I have used string.getParameter and retrieved the value of the drop down list and stored in String variable name. When i put that in the value of the textbox the selected option doesnt appear!!
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874




Firstly , Do not use Scriplets in JSP, Submit to Servlet , and use Utility class to get DB operations and send teh result to JSP to display it.

For your current problem , to access scriplet variable use <%=name%> instead of "name" in the above case
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740
    
  10

DO NOT PUT JDBC CODE INSIDE OF JSP. It's a sign of a really really bad developer.

I swear this is going to become my catch phrase.


[OCA 8 Book] [Blog]
Sujay Nadkarni
Ranch Hand

Joined: Jul 03, 2008
Posts: 34
thanks balu and scott!! it worked!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass the value to next form
 
It's not a secret anymore!