Re: EL not being evaluated?

2004-02-06 Thread Kris Schneider
Personally, I'd keep JSTL/Standard in WEB-INF/lib and Xerces/Xalan in endorsed.
Unless I needed an app-specific version of the XML libs, in which case I'd need
them in WEB-INF/lib. I wouldn't recommend dumping everything in endorsed, or
some other directory that a shared classloader can access, since it can cause
problems for certain frameworks (e.g. Struts). I'm not sure if JSTL/Standard
suffers from this problem. So, I guess my second choice would be to dump
everything in WEB-INF/lib.

Not exactly sure what's going on with that NPE. Can you post some example code
that triggers it?

Quoting David Wall [EMAIL PROTECTED]:

 Thanks.  The comments below did it for me.  However, I still had some JAR
 file location issues (tomcat's common/endorsed for the webapps
 WEB-INF/lib).
 
 Do most people put the XERCES, XALAN, JSTL/STANDARD jars in the endorsed
 location or do they just keep it with their webapps?  Right now, I seem to
 be working with XERCES and XALAN in endorsed, and the JSTL/STANDARD in my
 WEB-INF/lib.  Obviously, I'd prefer to have everything in the WEB-INF/lib
 since it would be packaged nicely together, or I'd prefer all these
 non-app JARs to be in the endorsed area.
 
 Even though everything appeared okay with my initial EL, I did note the
 following exception in catalina.log:
 
 java.lang.NullPointerException
 at
 org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:557)
 at
 org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:487)
 at
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 50)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 91)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 FilterChain.java:284)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ain.java:204)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:257)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
 Valve.java:245)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
 va:199)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:151)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
 .java:587)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195
 )
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:151)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164
 )
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:149)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
 :156)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
 t.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at
 org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
 ction(Http11Protocol.java:700)
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
 a:683)
 at java.lang.Thread.run(Thread.java:534)
 
 
 David
 
 
  Instead of:
 
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
  web-app
...
  /web-app
 
  Use:
 
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 
 

RE: EL not being evaluated?

2004-02-05 Thread Ben Anderson
el has been incorporated into JSP 2.0 which is what Tomcat 5 implements.  
So, you no longer need the c:out tag. Just do:

p1 + 2 + 3 = ${1+2+3}/p

Check out Tomcat's default pages to see more cool things you can do with 
Tomcat 5 (JSP 2.0/Servlet2.4).
-Ben

From: David Wall [EMAIL PROTECTED]
Reply-To: David Wall [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: EL not being evaluated?
Date: Thu, 5 Feb 2004 09:44:28 -0800
I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH 
Linux
9.

My XHTML JSP contains a simple construct:   p1 + 2 + 3 = c:out
value=${1+2+3}//p
But the expression is not being evaluated, yet the c:out tag is being
processed fine.  The output just looks like:
1 + 2 + 3 = ${1+2+3}

Is there a trick to getting the expressions configured to work with Tomcat
5?
Thanks,
David
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Learn how to choose, serve, and enjoy wine at Wine @ MSN. 
http://wine.msn.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: EL not being evaluated?

2004-02-05 Thread Wolfgang Röckelein
David Wall wrote:
I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH Linux
9.
My XHTML JSP contains a simple construct:   p1 + 2 + 3 = c:out
value=${1+2+3}//p
But the expression is not being evaluated, yet the c:out tag is being
processed fine.  The output just looks like:
1 + 2 + 3 = ${1+2+3}

Is there a trick to getting the expressions configured to work with Tomcat
5?
I think you need to indicate in the web.xml that this is a jsp version 2 web 
application, otherwise the container assumes the web application is written for 
an old jsp version where not the container but the taglib does the EL evaluation 
(you would need the 1.0.5 taglib version for this).

Regards,
  wolfgang
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: EL not being evaluated?

2004-02-05 Thread David Wall
 Since you're using a JSP 2.0 container, you should be able to just do:

 p1 + 2 + 3 = ${1+2+3}/p

 Make sure you're using a Servlet 2.4 deployment descriptor.

That didn't work for me.  Perhaps it's your last comment.  What does it mean
to have a 2.4 deployment descriptor for the JSP page?  Maybe that's where
I've gone wrong...  It seems like it has to be just a configuration issue.
I have the jstl.jar and standard.jar in the  WEB-INF/lib directory, and I've
put the c.tld in WEB-INF and updated web.xml to point to it using:

taglib
taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib

Thanks,
David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL not being evaluated?

2004-02-05 Thread David Wall
 I think you need to indicate in the web.xml that this is a jsp version 2
web
 application, otherwise the container assumes the web application is
written for
 an old jsp version where not the container but the taglib does the EL
evaluation
 (you would need the 1.0.5 taglib version for this).

That's no doubt my problem.  What's sort of entries are needed for web.xml
to show it's JSP version 2?  Is this the WEB-INF/web.xml file or tomcat's
conf/web.xml that needs to be changed?

Thanks,
David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL not being evaluated?

2004-02-05 Thread Wolfgang Röckelein
David Wall wrote:

I think you need to indicate in the web.xml that this is a jsp version 2
web

application, otherwise the container assumes the web application is
written for

an old jsp version where not the container but the taglib does the EL
evaluation

(you would need the 1.0.5 taglib version for this).


That's no doubt my problem.  What's sort of entries are needed for web.xml
to show it's JSP version 2?  Is this the WEB-INF/web.xml file or tomcat's
This one.

conf/web.xml that needs to be changed?
according to http://cermics.enpc.fr/doc/java/j2eetutorial-1.4/doc/WebApp4.html

Since the deployment descriptor is an XML document, it requires a prolog. The 
prolog of the version 2.4 Web application deployment descriptor is as follows:

?xml version=1.0 encoding=UTF-8?
web-app version=2.4
  xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: EL not being evaluated?

2004-02-05 Thread David Wall
Thanks.  The comments below did it for me.  However, I still had some JAR
file location issues (tomcat's common/endorsed for the webapps WEB-INF/lib).

Do most people put the XERCES, XALAN, JSTL/STANDARD jars in the endorsed
location or do they just keep it with their webapps?  Right now, I seem to
be working with XERCES and XALAN in endorsed, and the JSTL/STANDARD in my
WEB-INF/lib.  Obviously, I'd prefer to have everything in the WEB-INF/lib
since it would be packaged nicely together, or I'd prefer all these
non-app JARs to be in the endorsed area.

Even though everything appeared okay with my initial EL, I did note the
following exception in catalina.log:

java.lang.NullPointerException
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:557)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:487)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
50)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:257)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:587)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)


David


 Instead of:

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
   ...
 /web-app

 Use:

 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4
   ...
 /web-app

 Get rid of the taglib element and the TLD file, as of JSP 1.2 you don't
need
 them for packaged taglibs. Just use the proper URI in the taglib directive
in
 your JSP:

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL not being evaluated?

2004-02-05 Thread Kris Schneider
Instead of:

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
  ...
/web-app

Use:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4
  ...
/web-app

Get rid of the taglib element and the TLD file, as of JSP 1.2 you don't need
them for packaged taglibs. Just use the proper URI in the taglib directive in
your JSP:

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

Quoting David Wall [EMAIL PROTECTED]:

  Since you're using a JSP 2.0 container, you should be able to just do:
 
  p1 + 2 + 3 = ${1+2+3}/p
 
  Make sure you're using a Servlet 2.4 deployment descriptor.
 
 That didn't work for me.  Perhaps it's your last comment.  What does it
 mean
 to have a 2.4 deployment descriptor for the JSP page?  Maybe that's where
 I've gone wrong...  It seems like it has to be just a configuration issue.
 I have the jstl.jar and standard.jar in the  WEB-INF/lib directory, and
 I've
 put the c.tld in WEB-INF and updated web.xml to point to it using:
 
 taglib
 taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri
 taglib-location/WEB-INF/c.tld/taglib-location
 /taglib
 
 Thanks,
 David

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]