tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Milne <...@orange.net>
Subject Problem with load-on-startup and jsp pages
Date Wed, 12 Jun 2002 08:06:15 GMT
Hi
I'm running Tomcat 4.0.3 in standalone mode and I can't get a JSP page
to load on startup.
I've put together a test webapp which has one servlet and one jsp page
both set to load on startup via the webapp web.xml file and only the
servlet is started when the webapp is loaded.
Here's the web.xml:

<web-app>
        <display-name>Test area</display-name>
        <servlet>
                <servlet-name>svstart</servlet-name>
                <servlet-class>Startup</servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
                <servlet-name>jsstart</servlet-name>
                <jsp-file>/index.jsp</jsp-file>
                <load-on-startup>2</load-on-startup>
        </servlet>
</web-app>

In the tomcat log for this webapp I can see the following:
2002-06-12 08:00:18 StandardWrapper[:default]: Loading container servlet
default
2002-06-12 08:00:18 default: init
2002-06-12 08:00:18 StandardWrapper[:invoker]: Loading container servlet
invoker
2002-06-12 08:00:18 invoker: init
2002-06-12 08:00:18 invoker: init: Associated with Context ''
2002-06-12 08:00:18 jsstart: init
2002-06-12 08:00:18 jsp: init
2002-06-12 08:00:18 StandardContext[]: Starting completed

Which implies that the jsp init method was run, but it hasn't been since
there is no output to stdout from the jspInit method until I actually
visit the jsp page via a browser.
Meanwhile, the servlet (class Startup above) has run its init method
fine and produced stdout output ok, even though it's not mentioned in
the webapp log.

Is this a known problem? I've looked in the source code for the
superclass for the JSP pages and jspInit should be called from the init
method so that seems to imply that the init method hasn't been called
either for the compiled servlet. I also can't see the compiled servlet
code in the $CATALINA_HOME/work directory until I access the jsp via a
browser.

I've tried varying the startup order, and only having jsp in the startup
without any luck.

Any help appreciated!

Thanks,
Neil.


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


Mime
View raw message