• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSTL and Checkbox

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic