You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Johnson, Chris" <ch...@ti.com> on 2004/03/15 20:48:37 UTC

JSTL 1.1 jaxp problem (under tomcat 5.0.19/java 1.4.2_03)

Hello,

I'm new to the world of JSP/JSTL, but have managed to get some code
running under tomcat 4.1.29 (bundled with jboss 3.2.3 - as I'm using JMS
too)/JSTL 1.0.  I'm using java 1.4.2_03.

I'm using only the c and x libraries currently, but wanted to use the
new EL functions of JSTL 1.1, so I installed tomcat 5.0.19 alongside the
previously mentioned jboss/tomcat versions.

I've gotten the code to run under the new tomcat, but the performance is
terrible.  I've narrowed the performance problem down to any <x:forEach>
loop.  There wasn't anything of interest in the tomcat log, so I did a
truss on the tomcat process, and found it spitting out this error over
and over: stat64("/usr/j2sdk1.4.2_03/jre/lib/jaxp.properties",
0xDF97FFF8) Err#2 ENOENT.  I understand this to be tomcat looking for
the jaxp.properties file and not finding it.  I never saw this error
message while trussing the tomcat 4.1.29 process, and it processes the
xml extremely quickly.

With the older tomcat and JSTL 1.0, I didn't have to do any special
configuration of jaxp (I understood that to be built into java 1.4.2x),
so I figured it would be the same with the newer tomcat, but I guess
not.

So far I've tried setting parser system properties in the web.xml and in
files under META-INF with no change.  What am I missing?  If someone can
just point me to some good docs on the subject, I'd appreciate it
greatly.

Thanks,
Chris Johnson

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


Re: JSTL 1.1 jaxp problem (under tomcat 5.0.19/java 1.4.2_03)

Posted by Kris Schneider <kr...@dotech.com>.
Interesting. <x:forEach> has been tagged as a performance problem before for
JSTL 1.1, but without the accompanying truss info. The XPath engine for JSTL
was changed from Jaxen/SAXPath in 1.0 to Xalan in 1.1. If you can replace
<x:forEach> with <x:transform> and an XSLT stylesheet, that seemed to help with
the last performance issue. Otherwise, you could try explicitly configuring
JAXP by setting the appropriate system properties (assuming Xerces and Xalan):

env
JAVA_OPTS="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"
$CATALINA_HOME/bin/startup.sh

That way, jaxp.properties should never be searched for. You may also want to
download the latest Xalan release and dump the following in
$CATALINA_HOME/common/endorsed:

xalan.jar
xercesImpl.jar
xml-apis.jar

Quoting "Johnson, Chris" <ch...@ti.com>:

> Hello,
> 
> I'm new to the world of JSP/JSTL, but have managed to get some code
> running under tomcat 4.1.29 (bundled with jboss 3.2.3 - as I'm using JMS
> too)/JSTL 1.0.  I'm using java 1.4.2_03.
> 
> I'm using only the c and x libraries currently, but wanted to use the
> new EL functions of JSTL 1.1, so I installed tomcat 5.0.19 alongside the
> previously mentioned jboss/tomcat versions.
> 
> I've gotten the code to run under the new tomcat, but the performance is
> terrible.  I've narrowed the performance problem down to any <x:forEach>
> loop.  There wasn't anything of interest in the tomcat log, so I did a
> truss on the tomcat process, and found it spitting out this error over
> and over: stat64("/usr/j2sdk1.4.2_03/jre/lib/jaxp.properties",
> 0xDF97FFF8) Err#2 ENOENT.  I understand this to be tomcat looking for
> the jaxp.properties file and not finding it.  I never saw this error
> message while trussing the tomcat 4.1.29 process, and it processes the
> xml extremely quickly.
> 
> With the older tomcat and JSTL 1.0, I didn't have to do any special
> configuration of jaxp (I understood that to be built into java 1.4.2x),
> so I figured it would be the same with the newer tomcat, but I guess
> not.
> 
> So far I've tried setting parser system properties in the web.xml and in
> files under META-INF with no change.  What am I missing?  If someone can
> just point me to some good docs on the subject, I'd appreciate it
> greatly.
> 
> Thanks,
> Chris Johnson

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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