File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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 jSP page
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 Java and use a
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: JSTL and Checkbox
problem with form submission
JSF - dynamic tag choice
retrieve dynamically generated checkbox in JSP
JSTL forEach tag in struts problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014