A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
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 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
subject: JSTL and Checkbox
JSF - dynamic tag choice
retrieve dynamically generated checkbox in JSP
JSTL forEach tag in struts problem
problem with form submission
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014