• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pass the value to next form

 
Sujay Nadkarni
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sujay Nadkarni
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks balu and scott!! it worked!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic