You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/09/25 06:24:58 UTC
DO NOT REPLY [Bug 12985] New: -
jsp load-on-startup behavior not correct
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12985
jsp load-on-startup behavior not correct
Summary: jsp load-on-startup behavior not correct
Product: Tomcat 4
Version: 4.1.12
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: steve5m@yahoo.com
There are two problems. The first is the same bug that I reported for
Tomcat 4.0.4 (9979, and this bug is still Open).
The second is a related issue that used to work ok in Tomcat 4.0.4.
I will repeat Part 1 of the problem:
Following is part of a web.xml file to talk about.
<servlet>
<servlet-name>foo_jsp</servlet-name>
<jsp-file>/foo.jsp</jsp-file>
<load-on-startup></load-on-startup>
<!-- Note there is no integer inside the tag above. -->
</servlet>
The bug is that in this particular case - where there is no integer
inside the load-on-startup tag, the load-on-startup
has no effect. (Note I think this actually works for Servlets, but I'm
talking about JSP's.) The Servlet 2.3 spec says that if you don't specify
a number, then all servlets/jsps with a number will get loaded first
(in their proper numbered order) and then everything else (with load-on-
startup) will be preloaded in no particular order.
This bug has an easy workaround, which is to always put a number,
but it's annoying if you have a lot of JSP's that you want to preload
and you have to add a number for all when you really don't care about
the order.
Part 2 of the problem is new in Tomcat 4.1.12 (or maybe it existed in 4.1.10
also).
For those jsp's that have a numbered load-on-startup, their jspInit method
is called -- but then when the page is hit for the first time, their jspInit
method is called again! This should not happen.
I'm using JDK 1.4.1 on Windows 2000, but I would imagine this bug exists on
all platforms.
I will try to attach my test war file to this bug (look for it).
Among other things it has .../test_app/preload1.jsp and preload2.jsp,
each of which print out a line to System.out from their jspInit methods
to help see what's happening. Both jsp's are requested to load-on-startup
in the web.xml file, but #1 has no order, and #2 does have an order specified.
thanks.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>