tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject RE: Tomcat Manager behaviour difference between 5.0 and 5.5
Date Wed, 01 Feb 2006 12:15:48 GMT
You could have the back end deploy a .war file, and force the students to
build the .war (give them a template build.xml for ant and it should not be
too difficult).

Or, how about if you make the back end deploy just the .xml context file,
setting docBase to point back at the user's home?  I.e.,

tjl.xml
<context docBase="/home/tjl/..." reloadable="true"/>

And then deploying via

http://server:8080/manager/html/deploy?deployPath=&deployConfig=tjl.xml&depl
oyWar=

Not sure how you want to set reloadable.  If you have it to true, then every
student's recompilation will cause the app to reload and (if you've read
this group very long, you already know what is coming ;-) eventually your
tomcat could run out of PermGen space (this may or may not be a problem for
you -- depends on external jars, singleton patterns, etc.)  Not having
automatic reload means another mechanism, which ought not be that different
then the one they already go through.

Tim

-----Original Message-----
From: Grandy Fu [mailto:cswfu@comp.polyu.edu.hk] 
Sent: Tuesday, January 31, 2006 11:15 PM
To: users@tomcat.apache.org
Subject: re: Tomcat Manager behaviour difference between 5.0 and 5.5


It seems that no one can answer my question, maybe my English is not 
good enough to express the problem, sorry about that.

Let me rephrase the problem:

Objective:
Allow all users (students) to enable/disable/reload their own tomcat 
applications by using Tomcat Manager.

How:
Users are require to fill some information on the web and a back-end 
program (written in php) will contact Tomcat Manager to do the rest.

Problem:
In Tomcat 5.0.x, there is no problem at all except we like to upgrade it 
to Tomcat 5.5. Tomcat 5.0 will create a XML file under 
$CATALINA_HOME/conf/Catalina/localhost for user's application.

In Tomcat 5.5.x, Tomcat Manager will COPY ALL (including non-servlet, 
non-jsp) files from users' web application directory (public_html) to 
$CATALINA_HOME/webapps directory. This behavior caused 2 major problem: 
1. My $CATALINOA_HOME partition may not be big enough to all hundreds of 
users' web. 2. Tomcat Manager will cause exception and stop copying if 
NOT ALL files under user's public_html directory is world readable hence 
user's servelet application or jsp application may not be able to 
execute and have 404 error.

Question:
Are there any way, parameter to instruct Tomcat Manager to create XML 
file (like Tomcat 5.0.x) for a new application instead copying all files 
to $CATALINA_HOME/webapps?


Grandy

> Hi All,
>
> I had setup Tomcat 5.0.x in a school environment for students to write
> their servlet programs. With
>
>  <Listener className="org.apache.catalina.startup.UserConfig"
>             directoryName="public_html"
>             homeBase=/home"
>             
> userClass="org.apache.catalina.startup.HomesUserDatabase"/>
>
> and some little scripts that make use of tomcat manager, all students
> can deploy/undeploy/reload their own application at their will.
>
> Recently, I was going to upgrade our Tomcat server from 5.0.x to 5.5.x
> and found that my little scripts were not alwyas working as they should 
> suppose to. The reason I for this was, in Tomcat 5.0.x, when I call  
>
http://tomcatserver.edu/manager/deploy?path=/user&war=/home/user/public_html
<http://tomcatserver.edu/manager/deploy?path=/user&war=/home/user/public_htm
l>, 
> it will create an XML file (user.xml) under 
> $CATALINA_HOME/conf/Catalina/localhost, however, in Tomcat5.5x, it will 
> actually COPY all files from user's public_html directory into 
> $CATALINA_HOME/webapps/user directory. This behavior have 2 problems, 
> this first one is my tomcat server's partition may not be big enough to 
> hold few hundred students' servlet files. The second problem is the 
> manager application will have exception if not all files in 
> /home/user/public_html are world readable. The copying process simply 
> stop without copying ALL files but manager application still got the OK 
> and those students' servlet will have 404 error.
>
>
> My question is, are there any parameters for me to set so that Tomcat
> 5.5.x manager will behave just like Tomcat 5.0.x which only create an 
> XML file when manger's deploy command executed?
>
> Grandy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@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