  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Tomcat directories location | Tomcat directories location 2006-11-16 - By Didier Croutz
Back Hello,
I'm working for an University. Our workstations are unmarked so each student is able to work on every workstations. But we must save students data on their home directoy wich is a network drive mounted on a Windows sharing.
They' ll use Tomcat 5.5.20 so we must configure this software to work this network drive.
The first step was to redirect the application directory and the users database. I modified the server.xml the following way:
_*server.xml file*_
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener " /> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener " /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener " /> <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener "/>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer " value="30"/>
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase " description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory " pathname="H:/Tomcat/conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> <Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm " resourceName="UserDatabase"/>
<Host name="localhost" appBase="H:/Tomcat/webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>
Moreover we have to start Tomcat not as a service but as a simple application with the script below (*). Otherwise Tomcat doesn't recognize redirected application directory even if we change the user who launch the Tomcat service to the ower of the network drive.
(*) *_Tomcat.bat file_*
/set TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5 set JAVA_HOME=C:\Program Files\Java
"%TOMCAT_HOME%\bin\tomcat5.exe" \ -install "tomcat" \ "%JAVA_HOME%\jre\bin\client\jvm.dll" \ "-Djava.class.path=%TOMCAT_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" \ "-Dcatalina.home=%TOMCAT_HOME%" \ -Xrs -Xms128m -Xmx256m \ -start org.apache.catalina.startup.Bootstrap -params start \ -stop org.apache.catalina.startup.Bootstrap -params stop \ -out "H:\Tomcat\Logs\stdout.log" -err "H:\Tomcat\Logs\stderr.log" /
That's ok for users database but not all the log files are redirected into "H:\Tomcat\Logs", it's the first trouble.
Next I'd like to redirect "temp", "work" and may be "conf" directories on the network drive but dont't know how to do this. Anybody can help me ?
Thanks, Regards,
Didier Croutz.
|
|
 |