Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
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 Source code of org.apache.catalina.core.AprLifecycleListener" />
 <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener Source code of org.apache.catalina.mbeans.ServerLifecycleListener" />
 <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener Source code of org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
 <Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener Source code of org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>

 <GlobalNamingResources>

   <Environment name="simpleValue" type="java.lang.Integer Source code of java.lang.Integer" value="30"/>

   <Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase Source code of org.apache.catalina.UserDatabase" description="User database that
can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory Source code of 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 Source code of 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 Source code of org.apache.catalina.startup.Bootstrap -params start \
-stop org.apache.catalina.startup.Bootstrap Source code of 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.

©2008 junlu.com - Jax Systems, LLC, U.S.A.