aspose file tools*
The moose likes Struts and the fly likes Difference between struts-html and struts-html-el taglibs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference between struts-html and struts-html-el taglibs" Watch "Difference between struts-html and struts-html-el taglibs" New topic
Author

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

Charanjit Sidhu
Greenhorn

Joined: Apr 04, 2005
Posts: 13
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


Charanjit Sidhu<br />SCJP 81%
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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 ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between struts-html and struts-html-el taglibs