Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
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:
JSP
how to assign a java variable as a value to an html radio button?
aatish pandya
Greenhorn
Posts: 21
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Suppose,
[code=java]
<%
String type = "credit";
%>
<body>
<input type="radio" name="type" value=<I want to assign the above String variable [i]type[/i] here> />
.
.
.
</body>
[/code]
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You should
not be using
Java
scriptlets in JSP any longer. Please read
this JspFaq entry
.
Using the EL, if a
String
existed as a scoped variable named
type
, the syntax would be:
value="${type}"
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
help with radio buttons
Radio Button,Check Boxes
parameter to servlet
setting a radio button
Problem integrating Input box with JSP
More...