You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by NO...@britbio.co.uk on 2001/05/01 10:45:04 UTC

RE: Manually reloading classes without restarting catalina

Thanks - this has been a great help.

For development purposes I found it eaiser still to remove the
<security-constraint> and <login-config> elements from the web.xml file.
This way you don't have to enter in a password every time.  I know this is
not very secure, but it should be ok in a purely development enviroment.

Jon

> -----Original Message-----
> From: David Meaker [mailto:DaveMeaker@angelshade.com]
> Sent: 30 April 2001 11:12
> To: 'turbine-user@jakarta.apache.org'
> Subject: Manually reloading classes without restarting catalina
> 
> 
> I was getting very frustrated with tdk1.a13 not reloading 
> classes when they
> were recompiled. (even though I set a context with 
> reloadable="true" in
> server.xml)  I found the only way to do this was to restart 
> catalina?  Here
> is a manual workaround that has helped speed things up.  
> (This was found in
> the Catalina docs.)
> 
> 1. in the tdk/conf/tomcat_users.xml
> 
> 	add the following user.  The role must be manager.
> 		<user name="manager" password="manag3r" 
> roles="manager" />
> 
> 2. create directory webapps/manager/WEB-INF 
> 3. create a file called web.xml in this directory
> 
> 4. insert the following into web.xml
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
> 
> <web-app>
> 
>   <!-- Define the Manager Servlet -->
>   <servlet>
>     <servlet-name>Manager</servlet-name>
>  
> <servlet-class>org.apache.catalina.servlets.ManagerServlet</se
rvlet-class>
>     <init-param>
>       <param-name>debug</param-name>
>       <param-value>2</param-value>
>     </init-param>
>   </servlet>
> 
>   <!-- Define the Manager Servlet Mapping -->
>   <servlet-mapping>
>     <servlet-name>Manager</servlet-name>
>     <url-pattern>/*</url-pattern>
>   </servlet-mapping>
> 
>   <!-- Define a Security Constraint on this Application -->
>   <security-constraint>
>     <web-resource-collection>
>       <web-resource-name>Entire Application</web-resource-name>
>       <url-pattern>/*</url-pattern>
>     </web-resource-collection>
>     <auth-constraint>
>        <!-- NOTE:  This role is not present in the default 
> users file -->
>        <role-name>manager</role-name>
>     </auth-constraint>
>   </security-constraint>
> 
>   <!-- Define the Login Configuration for this Application -->
>   <login-config>
>     <auth-method>BASIC</auth-method>
>     <realm-name>Tomcat Manager Application</realm-name>
>   </login-config>
> 
> </web-app>
> 
> 5. restart catalina.
> 
> 6. enter the following url
> 	http://localhost:8080/manager/reload?path=/<appname>
> 
> 7. sign on as manager / manag3r
> 
> 8. Classes are reloaded.
> 
> 9. Each time you hit the url it will reload the app quite 
> quickly, works for
> changes to the turbine.resources files.
> 
> Hope this helps
> 
> Dave
> 
> PS. Jason, perhaps we could include the manager app when 
> building the next
> TDK.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 


--------------------------------------------------
DISCLAIMER: This message contains proprietary
information some or all of which may be
confidential and/or legally privileged. It is for
the intended recipient only who may use and apply
the information only for the intended purpose.
Internet communications are not secure and
therefore the British Biotech group does not
accept legal responsibility for the contents of
this message. Any views or opinions presented are
only those of the author and not those of the
British Biotech group. If you are not the intended
recipient please delete this e-mail and notify the
author immediately by calling ++44 (0)1865 748747;
do not use, disclose, distribute, copy, print or
rely on this e-mail.

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