Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes radion button input in form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "radion button input in form" Watch "radion button input in form" New topic

radion button input in form

Muhammad Usman

Joined: Nov 18, 2001
Posts: 29
hello to all,
i m just a beginner in servlets.
i have a very basic problem. i am practicing to make a shoping cart.
i have made a servlet named Welcome .In which i included a from with three radio buttons lime
. Garment
. Medicine
. Books
Submit button at bottom.
i have made three servlets i.e Garment , Medicine and Books .
How i could get to required servlet if i press the submit button after selecting any radio buttons.

an student of Operation Badar ( a educational movement in Pakistan).
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Use javascript to dispatch:


Regards, Rene Larsen
Dropbox Invite
Stu Glassman
Ranch Hand

Joined: Jul 01, 2002
Posts: 91
Another way is to create another servlet, we'll call it ActionServlet. The ActionServlet can read the value of the radio button and then redirect the user to the appropriate servlet.
I agree. Here's the link:
subject: radion button input in form
It's not a secret anymore!