• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL and Checkbox

 
Rajakumar Iyyemperumal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic