• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

pass the value to next form  RSS feed

 
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!!
 
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
 
author
Posts: 4106
24
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!!
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!