tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: JSP 2.0 and EL
Date Sat, 31 Aug 2002 15:46:26 GMT
On Sat, 31 Aug 2002, Mark R. Diggory wrote:

> So, I'm wondering, if EL is going to be available in the JSP 2.0 Core. 
> Does this mean the following?
> 
> 1.) Most taglibs for JSP 2.0 will be able to adopt to EL without much in 
> the line of code modifications?
> 
> i.e.
> 
> <prefix:tag attribute='<%=session.getAttribute("foobar")%>'/>
> 
> could easily be rewritten as
> 
> <prefix:tag attribute='${sessionScope.foobar}'/>

Yes, exactly.  The tag doesn't need to know whether the page author used
an rtexprvalue or the EL.

> and the setting of the "Attribute" would be independent of the
> evaluation of this would be independent of ${sessionScope.foobar}in
> the taglib?

Sorry, I'm afriad I don't understand what you're asking here.  But
${sessionScope.foobar} gets evaluated by the container under JSP 2.0, not
by the tag; the tag need not use the EL API itself.

> 2.) Will we be able to do things like this?
> 
> <a href="${sessionScope.foobar}">An example of EL outside of a custom 
> tag. </a>

Yup - or in plain template text too, as in

  <p>
   What were you <i>thinking</i>
   when you ordered
   ${number} gallons of yogurt?
  </p>

> I have some some custom taglib's I've been working on, I was thinking
> of integrating the EL Engine from JSTL into them and now, if the above
> is true, I'm wondering if I really have to do that? Or if I should
> just focus on implementing them for JSP 2.0.

It's just a matter of timing.  If you want to use the EL today, you should
probably call the evaluator yourself.  But if you can wait a few months,
then the need goes away because JSP 2.0 takes care of the problem for you.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message