A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
JSTL and Checkbox
Joined: Feb 18, 2008
Feb 18, 2008 04:45:00
Can any one tell me how to specify a checkbox using JSTL EL?
For example: In scriplet I have:
a = "<input type = \"checkbox\" id=\"chk\" > Select";
<%=a%> will print the checkbox in
I need to have the same functionality using JSTL
Please help me
Joined: Dec 11, 2004
Feb 18, 2008 04:49:00
JSTL EL is not needed to draw the checkbox as you have it.
Your scriptlet was not needed either.
All you did was build up a string in
and use a JSP expression to print it.
JSP is a templating language that was designed to prevent developers from having to build up strings in Java.
All you need to do is type it to the page:
<input type="checkbox" name="chk" id="chk" /> Select
[ February 18, 2008: Message edited by: Ben Souther ]
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: JSTL and Checkbox
problem with form submission
JSF - dynamic tag choice
JSTL forEach tag in struts problem
retrieve dynamically generated checkbox in JSP
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015