On 3 Apr 2002, David M. Karr wrote:
> Date: 03 Apr 2002 16:41:53 -0800
> From: David M. Karr <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Re: anyone care to clarify difference between struts and JSTL?
>
> >>>>> "Craig" == Craig R McClanahan <[EMAIL PROTECTED]> writes:
>
> Craig> My advice to Struts users is as follows:
>
> Craig> * If you're running on a Servlet 2.2 / JSP 1.1 container, you
> Craig> will not be able to use JSTL (it requires Servlet 2.3 / JSP 1.2).
> Craig> Go ahead and continue using the Struts tag libraries.
>
> Craig> * If you're running on a Servlet 2.3 / JSP 1.2 container, you
> Craig> should begin experimenting with JSTL. There is no problem in
> Craig> using both JSTL and Struts tags in the same page (although,
> Craig> obviously, the expression syntax is different).
>
> Craig> * Over time, I plan to add a few features to the Struts tags to
> Craig> ease migration to JSTL for the "bean" and "logic" libraries --
> Craig> for example, I want to support the same expression language, and
> Craig> attribute names where that is possible.
>
> Craig> * Longer term, I suggest that page developers plan on using the JSTL
> Craig> tags in their applications, as quickly as it is feasible for you
> Craig> to do so. But we're not going to throw away the existing Struts
> Craig> tags any time soon, so they will continue to be available.
>
> Craig> (One other note -- the expression language itself will become part of JSP
> Craig> 1.3, so you'll be able to use it in template text as well as in custom tag
> Craig> attribute values.)
>
> It would seem reasonable to consider doing what the JSTL implementors did,
> which is creating two sets of tag libraries, one using the EL, and one using
> scriptlets. As it's logical to assume that the default for the JSTL is the EL,
> and not RT, for each TLD, they created a "-rt" version and a non-rt version,
> which assumes the EL. In the case of Struts, you would probably want the
> "default" to be the RT library, and for the "-el" library to be optional. By
> making both of these available at the same time, it allows people to fully
> experiment with both alternatives. This would only be worthwhile during the
> transition. Later releases wouldn't need this.
>
I was actually thinking of a slightly different approach -- for each
Struts tag that accepts the name/property/scope triplet of attributes,
create a new attribute like "expr" that accepts an expression language
expression instead. I believe this will be easier to understand, because
the EL expression actually covers all three of these concepts, so it
wouldn't really make sense to interpret any of the existing attributes in
two different ways.
Doing this would seem to avoid the need for dual libraries. Does that
make sense?
> --
> ===================================================================
> David M. Karr ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]
>
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>