Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
View Interest List Message Details
<< Back to Search Results

Date: 06/08/2006
From: jfletcher@latitudegeo.com
Subject: RE: [ServletExec] JSTL 1.0 and Servlet 2.4
Great explanation, thank you very much. 

John Fletcher
Latitude Geographics Group Ltd.
jfletcher@latitudegeo.com www.latitudegeo.com
Head Office: 204 Market Square Victoria, BC Canada V8W 3C6
Tel: (250) 381-8130 Fax: (250) 381-8132

Geocortex Internet Mapping (www.geocortex.net) - Helping people succeed
with web-based geography 


________________________________

From: servletexec-interest-owner@newatlanta.com
[mailto:servletexec-interest-owner@newatlanta.com] On Behalf Of
matt@newatlanta.com
Sent: Thursday, June 08, 2006 9:41 AM
To: servletexec-interest@newatlanta.com
Subject: Re: [ServletExec] JSTL 1.0 and Servlet 2.4


John,
If your web.xml specifies Servlet Spec. 2.4,(or newer) then any EL on a
JSP page is evaluated by SE's JspEngine.
If your web.xml specifies Servlet Spec. 2.3 (or older)  then any EL on a
JSP page is NOT evaluated by SE's JspEngine.

If such EL is used as the value of an attribute of a JSTL (or custom)
tag then SE will pass the EL to the tag.

"passing the EL to the tag" means different things depending on       
whether
the app is 2.4 or 2.3:

 1. for 2.4, SE will pass the evaluated EL string to the tag.
    (this is treated as a runtime expression as far as the tag is
concerned)

 2. for SE 2.3, SE will pass the UN-evaluated EL string to the tag.

Whether or not the tag can evaluate an UN-evaluated EL construct, or
whether or not it can accept a runtime expression depends on the tag
(and the TLD where it is defined).

With JSTL 1.0, there are 2 categories of tag libraries:
 - EL-based
 - runtime-based

Please see section 7.4 of the SE 4.2 User Guide for more details about
those 2 categories.
I can add here that the EL-based TLDs defined in JSTL 1.0 can handle
UN-evaluated EL, but cannot handle runtime expressions (i.e. they cannot
handle EL that SE has already evaluated).


With JSTL 1.1, there is only one set of tag libraries (no longer 2
"categories").
The JSTL 1.1 tags do NOT take care of evaluating the EL... the JSP
Engine is supposed to handle EL in those cases.
This means that to use JSTL 1.1 tags, and use EL as the value of
attributes of those tags, a person would have to use a Servlet 2.4
webapp, running inside a Servlet/JSP Engine that supports Servlet 2.4.

When I setup your example as you described it fails for me too, and I'd
expect that.
I can make it work if I just change:

<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"

<http://java.sun.com/jstl/core> %>

to be a either:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core"
<http://java.sun.com/jsp/jstl/core>  prefix="c" %>

-or-

<%@ taglib uri="http://java.sun.com/jstl/core_rt"                  
prefix="c" %>


both of which are TLDs that accept runtime expression values.

Hope that helps.



Matt McGinty
Software Engineer
New Atlanta Communications, LLC
http://www.newatlanta.com 


John Fletcher wrote: 

I have identical web applications on two separate servers, both
running
ServletExec 5.0 with the latest (May 2006) hotfix.  Both web
applications use JSTL 1.0 tag libraries.  One is on Java 1.4.2,
the
other on Java 1.5.  The web application running Java 1.5 has a
Servlet
2.4 declaration in the web.xml, the other will not work unless I
use a
Servlet 2.3 declaration.  The error I get when using a Servlet
2.4
declaration is:

"attribute value cannot have a request time expression value"

I get this error in the ServletExec logs when I try to run the
following
jsp:

<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"

<http://java.sun.com/jstl/core> %>
<c:set var="myName" value="john"/>
<c:out value="${myName}"/>

That convoluted introduction leads me to my two questions:

1. Is JSTL 1.0 / Servlet 2.4 a supported configuration in
ServletExec?
2. How does ServletExec's processing of JSTL differ when inside
a
Servlet 2.3 webapp as opposed to a Servlet 2.4 webapp?  The most
confusing thing for me is that the Servlet 2.4 / JSTL 1.0 setup
works on
the other machine (in fact, there are others as well on the
network with
slightly different web application configurations which also
work with
the Servlet 2.4 / JSTL 1.0 setup).  I can't help but think there
_must_
be some difference in the configuration of the applications, I
just
can't determine what that difference might be.

Thanks for the help.

John Fletcher
Latitude Geographics Group Ltd.
jfletcher@latitudegeo.com www.latitudegeo.com
Head Office: 204 Market Square Victoria, BC Canada V8W 3C6
Tel: (250) 381-8130 Fax: (250) 381-8132 

Geocortex Internet Mapping (www.geocortex.net) - Helping people
succeed
with web-based geography



------------------------------------------------------------------------
-
ServletExec-Interest. For archives and unsubscribe instructions,
visit:

    http://www.newatlanta.com/servletexec-interest.jsp
  

-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

    http://www.newatlanta.com/servletexec-interest.jsp

Message Thread
Date Subject Author
06/08/2006 Re: [ServletExec] JSTL 1.0 and Servlet 2.4 matt@newatlanta.com
06/08/2006 RE: [ServletExec] JSTL 1.0 and Servlet 2.4 jfletcher@latitudegeo.com
06/07/2006 [ServletExec] JSTL 1.0 and Servlet 2.4 jfletcher@latitudegeo.com
<< Back to Search Results


   
company media information terms of use privacy policy contact us