tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilhelmsen Tor Iver" <TorIv...@arrive.no>
Subject SV: Invoke JSP on tomcat startup
Date Fri, 16 Nov 2007 14:24:24 GMT
> Exists some automatic way to invoke a JSP when tomcat starts?

In the sense that a JSP can be declared as <load-on-startup>, yes; put
the code you want to invoke in e.g.

<%!

static {
   // Stuff to do once
}
%>

However, you really should look into solving the real problem you want
to use this for in some other way, e.g. a listener. JSPs are meant for
request processing, and there are no requets present at startup.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message