jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justyna Horwat <Justyna.Hor...@Sun.COM>
Subject Re: Struts EL tag library stability
Date Wed, 28 Jul 2004 16:59:56 GMT
Hi Martin,

I looked over your requirements and there is another solution you may 
consider looking into: JavaServer Faces. JSF contains tags for building 
HTML based user interfaces and also has the notion of an EL. JSF works 
in a JSP 1.2/Servlet 2.3 container.

The JSF RI source code and snapshots are available through java.net here:


There is also another open implementation called MyFaces available here:


You will notice that the EL in JSF is different and builds upon the 
commons EL in order to support the JSF lifecycle.

There is also a Struts-Faces integration library which allows you to use 
JSF in conjunction with Struts:




Martin Shiveral wrote:

> David and Martin,
> Thanks for replying - it is appreciated.  It seems sometimes there just 
> aren't enough hours in the day.
> I do intend to email the Struts user community at user@struts.apache.org 
> as Martin suggested.  The reason I mailed the developer list in the 
> first place was to aim my questions at developers who might possibly be 
> extending the EL tags themselves (as I am), including the original 
> developer(s).  Please don't interpret my original mail as a criticism of 
> either the original developer(s) or the EL tag library itself and 
> apologies if you think my mail is better suited to the Taglibs user list.
> Your replies suggest a reason why few people have extended the EL tags 
> (I have found little purchase on any of the Struts forums) - they are a 
> "bridge" between the JSP 1.2 and JSP 2.0 containers so as David suggests 
> they will have a limited lifespan.
> The problem I have is that our project is standardising around WebSphere 
> Studio Application Developer which supports JSP 1.2 therefore I need to 
> extend the Struts-EL tags if I want to support the expression language 
> in our custom tags within WSAD.  The JavaServer Pages Standard Tag 
> Library 
> (http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html) does 
> not contain tags for creating HTML-based user interfaces so it is not 
> suitable.  The Struts Taglib will support expression language in its 
> attribute values but only if the container it runs in is JSP 2.0 (EL 
> support being one of the ney features of JSP 2.0) so it is not suitable 
> either.
> My approach so far has been to create a number of custom tags which 
> extend the EL tags to provide the functionality we require (mostly 
> decoration of the underlying tag).  The only issue I have encountered 
> with extending the EL tags is that I need to duplicate the 
> "evaluateExpressions" functionality of each EL tag class in my custom 
> tags as the method is declared private (instead of protected) in the EL 
> Tag Library source.  I have already examined the Struts-EL Tag Library 
> source (1.1) in some detail and am familiar with how it works.  
> Considering my situation, does this sound like a sensible approach or do 
> you think I have missed something significant?
> Regards,
> Martin S
>> From: "Karr, David" <david.karr@wamu.net>
>> Reply-To: "Tag Libraries Developers List" 
>> <taglibs-dev@jakarta.apache.org>
>> To: "Tag Libraries Developers List" <taglibs-dev@jakarta.apache.org>
>> Subject: RE: Struts EL tag library stability
>> Date: Fri, 23 Jul 2004 09:08:18 -0700
>> As the implementor of struts-el, and not specifically a user of it, I
>> can't comment from the POV of a user, but I can clarify some of the
>> goals of this library, which I think you may have missed.
>> I implemented struts-el when I saw the need for a "bridge" between
>> Struts on JSP 1.2 containers and the upcoming JSP 2.0 containers,
>> concerning use of the JSTL specifically.  Struts-el is intended to be
>> used in a JSP 1.2 container.  It is not used in a JSP 2.0 container.
>> So, to address one of your questions, Struts-EL will certainly NOT
>> become part of the core Struts tag library, as there's no point to it.
>> The greatest accomplishment of the struts-el library will be when no one
>> needs it anymore.
>> I've struggled with the fact that I don't have very much documentation
>> for Struts-EL, but the important thing to realize is that it's just a
>> pairing of the Struts tag library with the JSTL EL (not the JSTL).  In
>> fact, virtually the entire tag library could technically be generated.
>> Any tags that are implemented in Struts-EL exactly mirror the interface
>> of the tag in the base tag library (except for two attributes I thought
>> were very convenient in two tags), mostly because all of the tag classes
>> in Struts-EL simply inherit from the corresponding class in the base
>> library, but just pass the parameters through the JSTL EL.
>> With respect to calling setters of the tags, as Martin Cooper alludes
>> to, it's important to understand the perspective of why this is
>> happening.
>> > -----Original Message-----
>> > From: Martin Shiveral [mailto:martin_shiverallit@hotmail.com]
>> >
>> > The purpose of this email is to try and get an idea of the
>> > number of users
>> > in the struts community currently using the Struts EL tag library and
>> > determine if the library is a sensible candidate for use
>> > (i.e. whether it
>> > will become a fully fledged part of the core Struts tag
>> > library as opposed
>> > to a contribution and what the level of developer support is
>> > likely to be).
>> >
>> > The Struts EL tag library (see
>> > http://struts.apache.org/faqs/struts-el.html)
>> > is an
>> > extension of the Struts tag library that supports expression language
>> > attribute values instead of the conventional
>> > runtime-expression values. This
>> > tag functionalty would prove useful for the project I am
>> > involved with but
>> > there is not a great deal of Struts-EL documentation
>> > available online. The
>> > Struts 1.1 source download does contain some doumentation but
>> > I find it a
>> > worrying sign that the API for these tags is not available
>> > online (to my
>> > knowledge).
>> >
>> > For the most part we wish to take tags that generate standard
>> > HTML elements
>> > (button, text, textarea etc.) that support EL attribute
>> > values and customise
>> > them by wrapping additional elements around the underlying
>> > functionality. I
>> > have also read in numerous places (most notably the Jakarta
>> > Taglib Developer
>> > Guideline) that "user code should avoid calling a setter
>> > method of a tag
>> > handler for properties that correspond to tag attributes".
>> > The Struts-EL
>> > taglib source seems to break this rule by calling setter
>> > methods from within
>> > the "evaluateExpressions() private method of each tag, which makes me
>> > slightly wary of them.
>> >
>> > Has anyone else extended these tags or encountered any
>> > problems with them?
>> >
>> > Best Regards,
>> > Martin
>> >
>> > _________________________________________________________________
>> > Use MSN Messenger to send music and pics to your friends
>> > http://www.msn.co.uk/messenger
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
>> >
>> >
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> _________________________________________________________________
> Stay in touch with absent friends - get MSN Messenger 
> http://www.msn.co.uk/messenger
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org

To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org

View raw message