This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Pass radio button/ text box responses from one page to another  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello

I have a jsp screen1 with lot of radio buttons and a text box.

Once some of these radio buttons are selected and text box typed with a value
and submit button clicked, it has to update the postgre DB with the selected radio
button's text and the text box value.

On successfull updation of DB, it has to redirect to a jsp screen 2.

Currently i have the jsp screen 1 but i dont know how to get responses and proceed.

Please help me with a sample code.

It is urgent!

 
Bartender
Posts: 1844
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds simple enough...

The form on jsp screen 1 has to have an action that will invoke a servlet




In your servlet doPost method, you retrieve the values of the parameters with request.getParameter(), and then invoke some JDBC code to save them.


and then get a request dispatcher and forward to the next jsp:

 
Greenhorn
Posts: 4
Eclipse IDE Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir,

String selectedRadio = request.getParameter("radioControlName");
String inputText = request.getParameter("textfieldControlName");

the request.getparameter("radiocontrolname") if null then how do we check it

if(request.getParameter("radio")==null)
out.println("user did not choosen");

but the if condition not checking, I have this problem in jsp registration page . please guide me in this regard


regards
kanna
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!