• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between struts-html and struts-html-el taglibs

 
Charanjit Sidhu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is the difference between struts-html and struts-html-el taglibs? Which one should I use for a new Struts based project? Does it matter which J2EE version implementation of my application server(I have to use Weblogic 8.1 which implements J2EE 1.3)?

Thanks,
Charanjit
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main difference between regular struts tags and struts-el tags is in how you specify a run-time expression in one of the tags. With regular struts, you use a scriptlet. With Struts-el, you use an EL expression.
For example:

Regular struts:
<html:text property="myProperty" disabled='<%=((MyBean)request.getAttribute("myBean")).isDisabled() %>' />

struts-el
<html:text property="myProperty" disabled="${myBean.disabled}" />

If you're using JSTL tags in your JSPs, I'd strongly suggest using the struts-el tags.

As long as you're using a version of the JSP spec that supports JSTL, you're good to go.
[ February 02, 2006: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic