Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Servlets
How to pass the radio button attribute checked=true from the Java servlet to JSP
Raveendran Hs
Greenhorn
Posts: 23
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a two radio button in the
JSP
I need to pass the radio button attribute checked=true from the
Java
servlet
to JSP
How can achieve this
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are you reading this status from a request submitted from a FORM? If you are forwarding to the JSP, the request will still have the status when the JSP gets it.
If this status comes from something else, information can be kept in the session.
How are you passing control from servlet to JSP?
Bill
Prashant Chindhade
Ranch Hand
Posts: 77
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You write this in jsp file
<input type="radio" name="sex" value="Male">
you can simply write this in servlet
Sex=req.getParameter("sex").toString();
you will get value in
string
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why the redundant .toString()?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Prashant Chindhade
Ranch Hand
Posts: 77
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
its an optional thing you can remove it and you will get same answer.
i have written it because i want that in string and to make sure it is string
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It's redundant and should not be used. The method already returns a string and there's no need for the extra method.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Prashant Chindhade
Ranch Hand
Posts: 77
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
ya i know man...
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How values of a radio button selected can be retained
Session expires ,user session expires when online
Using EL to generate attribute/value pairs inside of an XHTML element
How to retain the values after page refresh.
get disabled values from HttpServletRequest parameter
More...