You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Karr, David" <da...@attws.com> on 2002/10/02 19:53:39 UTC

[ANNOUNCEMENT] Struts-EL contrib library (Struts & JSTL)

I'd like to announce the availability of the Struts-EL contrib library in
the
nightly build, as of build 20021002.

The Struts-EL tag library is an extension of the Struts tag library (at
least
the "bean", "html", and "logic" portions).  Each JSP custom tag in this
library is a subclass of an associated tag in the Struts tag library.  The
basic difference is that this tag library does not use "rtexprvalues", it
uses
the expression evaluation engine in the JSP Standard Tag Library (version
1.0)
to evaluate attribute values.

All of the tags in this library are "ported" from the Struts tag library,
with
the same attributes (except for one each added to "logic:match" and
"logic:notMatch") and functionality.  However, some of the Struts tags were
not
ported to this library.  This is the case for several tags whose
functionality
is completely covered by the JSTL tag library ("bean:write", for instance,
being covered by "c:out" in the JSTL).

In order to fully understand the correct utilization of this library, you
must
understand the use and operation of the Struts tag library, and the use and
operation of the JavaServer Pages Standard Tag Library (hereafter called the
"JSTL"), along with the expression language (sometimes called the "EL") used
for evaluating attribute values.  At this point in time, there is only very
little documentation for the Struts-EL library.  There is a "README.txt"
file
at the root of the distribution which provides some basic information.  At
some
future time, the documentation for Struts-EL may be generated just like the
Struts documentation.  However, as this library is really just a pure
combination of the Struts tag library with the JSTL EL engine, there isn't a
great deal more additional information that would be useful.

Note that the use of JSTL 1.0 requires the use of a JSP 1.2-compliant web
container.  As a result, Struts-EL also requires a JSP 1.2-compliant web
container.

The Struts-EL distribution is provided as part of the Struts distribution,
as a
"contrib" library.  Just like the normal Struts distribution, there is a
"strutsel-exercise-taglib" web application, which is a simple application
used
for demonstrating many of the tags and their features.  This version of the
application covers a few more tags than the example in the base library, and
also provides a "Source" feature, to view the source online.

If you want a quick example of what you can do with Struts-EL, imagine what
you
normally have to do if you're using LabelValueBean in your Action code to
populate a symbolic value and a message resource key, and displaying that
resulting string in your JSP page.

You would normally have a pair of lines like this in your JSP page
(hopefully
I've got my syntax correct, as I'm entering this cold):

  <bean:define id="foo" name="labelValueBean" property="label"/>
  <bean:message key='<%= foo.toString() %>'/>

Using Struts-EL, it would look like this:

  <bean-el:message key="${labelValueBean.label}"/>

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts-EL contrib library

Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Rob" == Rob Leland <rl...@apache.org> writes:

    Rob> David:
    Rob>    It seems that by default the struts-el library
    Rob>    wants to build, I though the default was not to build ?
    Rob>    It tries to build if there is no custom property file.
    Rob>    I tried creating the file but setting the jstl.jar='',
    Rob>    and it still wants to build.

No, it is part of the normal build.  If you don't want to build it for some
reason, I believe you would have to remove the "jstl.jar" setting entirely.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Struts-EL contrib library

Posted by Rob Leland <rl...@apache.org>.
David:

   It seems that by default the struts-el library
   wants to build, I though the default was not to build ?
   It tries to build if there is no custom property file.
   I tried creating the file but setting the jstl.jar='',
   and it still wants to build.


-Rob


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [ANNOUNCEMENT] Struts-EL contrib library (Struts & JSTL)

Posted by Vinh Tran <vi...@processintelligence.com>.
David:

I just downloaded the nightly 20021003 and read through the Readme.  I am
still unsure as to which files/libraries to copy over to my webapp.

Can I extract the EL libraries for use in my Struts 1.0.2 app (if so, what
is needed) or do I have to copy everything that is included in the nightly.

Please advise.  Thanks.

Vinh

-----Original Message-----
From: Karr, David [mailto:david.karr@attws.com]
Sent: Wednesday, October 02, 2002 1:54 PM
To: 'struts-user@jakarta.apache.org'
Subject: [ANNOUNCEMENT] Struts-EL contrib library (Struts & JSTL)


I'd like to announce the availability of the Struts-EL contrib library in
the
nightly build, as of build 20021002.

The Struts-EL tag library is an extension of the Struts tag library (at
least
the "bean", "html", and "logic" portions).  Each JSP custom tag in this
library is a subclass of an associated tag in the Struts tag library.  The
basic difference is that this tag library does not use "rtexprvalues", it
uses
the expression evaluation engine in the JSP Standard Tag Library (version
1.0)
to evaluate attribute values.

All of the tags in this library are "ported" from the Struts tag library,
with
the same attributes (except for one each added to "logic:match" and
"logic:notMatch") and functionality.  However, some of the Struts tags were
not
ported to this library.  This is the case for several tags whose
functionality
is completely covered by the JSTL tag library ("bean:write", for instance,
being covered by "c:out" in the JSTL).

In order to fully understand the correct utilization of this library, you
must
understand the use and operation of the Struts tag library, and the use and
operation of the JavaServer Pages Standard Tag Library (hereafter called the
"JSTL"), along with the expression language (sometimes called the "EL") used
for evaluating attribute values.  At this point in time, there is only very
little documentation for the Struts-EL library.  There is a "README.txt"
file
at the root of the distribution which provides some basic information.  At
some
future time, the documentation for Struts-EL may be generated just like the
Struts documentation.  However, as this library is really just a pure
combination of the Struts tag library with the JSTL EL engine, there isn't a
great deal more additional information that would be useful.

Note that the use of JSTL 1.0 requires the use of a JSP 1.2-compliant web
container.  As a result, Struts-EL also requires a JSP 1.2-compliant web
container.

The Struts-EL distribution is provided as part of the Struts distribution,
as a
"contrib" library.  Just like the normal Struts distribution, there is a
"strutsel-exercise-taglib" web application, which is a simple application
used
for demonstrating many of the tags and their features.  This version of the
application covers a few more tags than the example in the base library, and
also provides a "Source" feature, to view the source online.

If you want a quick example of what you can do with Struts-EL, imagine what
you
normally have to do if you're using LabelValueBean in your Action code to
populate a symbolic value and a message resource key, and displaying that
resulting string in your JSP page.

You would normally have a pair of lines like this in your JSP page
(hopefully
I've got my syntax correct, as I'm entering this cold):

  <bean:define id="foo" name="labelValueBean" property="label"/>
  <bean:message key='<%= foo.toString() %>'/>

Using Struts-EL, it would look like this:

  <bean-el:message key="${labelValueBean.label}"/>

--
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>