This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL and Checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL and Checkbox" Watch "JSTL and Checkbox" New topic
Author

JSTL and Checkbox

Rajakumar Iyyemperumal
Greenhorn

Joined: Feb 18, 2008
Posts: 1
Rajakumar IyyemperumalCan any one tell me how to specify a checkbox using JSTL EL?
For example: In scriplet I have:
<%
String 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
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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 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:

[ February 18, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL and Checkbox
 
Similar Threads
retrieve dynamically generated checkbox in JSP
html:checkbox tag
JSTL forEach tag in struts problem
JSF - dynamic tag choice
problem with form submission