tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toby Piper" <tpi...@CompCraft.com>
Subject Servlet reloading once more
Date Thu, 13 Jul 2000 15:41:19 GMT
Set reloadable to true for that context in the server.xml file.

> -----Original Message-----
> From: Svein Petter Larsen [mailto:spla@scandpower.no]
> Sent: Thursday, July 13, 2000 5:40 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Servlet reloading once more
>
>
> Trying again
>
> This is eating up a lot of my time so I try to ask once more..
>
>  How can I set up Tomcat 3.1 to autoreload servlets?
>  Every time I compile my servlet I have to stop and restart my Tomcat
> to get the
>  new class up and running.
>  I have tried to put in the string in the file "server.xml" which says:
>    	<Context path="/sis" docBase="webapps/sis" debug="0" reloadable="true" >
>          	</Context>
>  where sis is my app. and it is under $TOMCAT_HOME/webapps/sis
>  It did not work...
>
>
>  It is timeconsuming to stop and start Tomcat on every compile

>
>  Is there an solutions?
>
>
> ----------------------------------------------------------------------
> --------------------
> My web.xml under $TOMCAT_HOME/webapps/sis file look like:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>     "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
>
> <web-app>
>
>         <display-name>Subject Information System</display-name>
>         <description>
>         this is version 1.0 of SIS
>         </description>
>
>         <context-param>
>         <param-name>webmaster</param-name>
>         <param-value>spla@scandpower.no</param-value>
>         <description>
>         The EMAIL address of the administrator to whom questions
>         and comments about this application should be addressed.
>         </description>
>         </context-param>
>
> <!-- Define the default session timeout for your application,
>          in minutes.  From a servlet or JSP page, you can modify
>          the timeout for a particular session dynamically by using
>          HttpSession.getMaxInactiveInterval(). -->
>
>         <session-config>
>           <session-timeout>30</session-timeout>    <!-- 30 minutes -->
>         </session-config>
> </web-app>
>
> ----------------------------------------------------------------------
> ----------------------
>
> My server.xml file under $TOMCAT_HOME/conf look like:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <Server>
>     <!-- Debug low-level events in XmlMapper startup -->
>     <xmlmapper:debug level="0" />
>
>     <!-- This is quite flexible; we can either have a log file per
>          module in Tomcat (example: ContextManager) or we can have
>          one for Servlets and one for Jasper, or we can just have
>          one tomcat.log for both Servlet and Jasper.
>
>          If you omit "path" there, then stderr should be used.
>
>          verbosityLevel values can be:
>             FATAL
>             ERROR
>             WARNING
>             INFORMATION
>             DEBUG
>          -->
>
>     <Logger name="tc_log"
>             path="logs/tomcat.log"
>             customOutput="yes" />
>
>     <Logger name="servlet_log"
>             path="logs/servlet.log"
>             customOutput="yes" />
>
>     <Logger name="JASPER_LOG"
>             path="logs/jasper.log"
>             verbosityLevel = "INFORMATION" />
>
>     <!-- Add "home" attribute if you want tomcat to be based on a
> different directory
>          "home" is used to create work and to read webapps, but not
> for libs or CLASSPATH.
>          Note that TOMCAT_HOME is where tomcat is installed, while
> ContextManager home is the
>          base directory for contexts, webapps/ and work/
>       -->
>     <ContextManager debug="0" workDir="work" >
>         <!-- ContextInterceptor
> className="org.apache.tomcat.context.LogEvents" / -->
>         <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.DefaultCMSetter" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.WorkDirInterceptor" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.WebXmlReader" />
>         <ContextInterceptor
> className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
>         <!-- Request processing -->
>         <RequestInterceptor
> className="org.apache.tomcat.request.SimpleMapper" debug="0" />
>         <RequestInterceptor
> className="org.apache.tomcat.request.SessionInterceptor" />
>         <RequestInterceptor
> className="org.apache.tomcat.request.SecurityCheck" />
>         <RequestInterceptor
> className="org.apache.tomcat.request.FixHeaders" />
>
>        <!--
>          <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
>             <Parameter name="handler"
> value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
>             <Parameter name="port" value="8080"/>
>         </Connector>
>         -->
>
>         <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
>             <Parameter name="handler"
> value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
>
>             <Parameter name="port" value="8007"/>
>         </Connector>
>
>
>         <!-- example - how to override AutoSetup actions -->
>         <Context path="/examples" docBase="webapps/examples"
> debug="0" reloadable="true" >
>         </Context>
>         <!-- example - how to override AutoSetup actions -->
>         <Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" >
>         </Context>
>
>     <Context path="/test" docBase="webapps/test" debug="0" reloadable="true">
>          </Context>
>
>         <Context path="/sis" docBase="webapps/sis" debug="0"
> reloadable="true" >
>         </Context>
>
>     </ContextManager>
> </Server>
>
> --
>
> ================,,,=========================
> ===============(o o)========================
> ===========oOO==(_)==OOo====================
>
> Petter Larsen
> Institutt for informatikk,
> Universitetet i Oslo
>
> sveinpe@ifi.uio.no
> http://www.stud.ifi.uio.no/~sveinpe
>
> Linux is best..:-)
>
> ===========ooooO==Ooooo=====================
> ===========(   )==(   )=====================
> ============\ (====) /======================
> =============\_)==(_/=======================
>


Mime
View raw message