You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gaurav Pruthi <gk...@gmail.com> on 2007/12/20 07:58:18 UTC
Strange Problem in Tomcat
Hi,
I am new to tomcat and using Tomcat 6.0.14 with apache, mod_jk
Here is the Host configured in server.xml
<Host name="tomcatuser.org" debug="0"
appBase="/usr/local/tomcat/webapps/tomcatuser.org/webapps"
unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="/usr/local/tomcat/webapps/tomcatuser.org/logs"
prefix="tomcatuser.org.access." suffix=".log" pattern="common"
resolveHosts="false"/>
<Context path="/servlet" docBase="servlet" debug="0" reloadable="true"
crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
prefix="tomcatuser.org.access" suffix=".log" timestamp="true"/>
</Context>
<Alias>www.tomcatuser.org</Alias>
</Host>
Below is the VirtualHost configured in Apache.
<VirtualHost 192.168.199.1>
ServerAdmin root@localhost
ServerName tomcatuser.org
DocumentRoot /usr/local/tomcat/webapps/tomcatuser.org/webapps
JkMount /*.jsp default
JkMount /servlet/* default
ServerAlias www.tomcatuser.org
</VirtualHost>
My problem is that even appBase in tomcat is
/usr/local/tomcat/webapps/tomcatuser.org/webapps, still i have to Put my jsp
files in /usr/local/tomcat/webapps/tomcatuser.org/webapps/ROOT/ folder to
access them through apache. Even when i am accessing directly in tomcat
using 8080 port, my jsp file needs to be in ROOT directory to access. I kept
all of my jsp pages in /usr/local/tomcat/webapps/tomcatuser.org/webapps/
directroy, it says page not found and when i am keeping them in ROOT
directory, I can access them.
Can anybody tell me why so this problem is occuring?
To access jsp page I also have to change the DocumentRoot to
/usr/local/tomcat/webapps/tomcatuser.org/webapps/ROOT/
Also I have to put the war files in
/usr/local/tomcat/webapps/tomcatuser.org/webapps/ directory to uncompress it
then have to move it in
/usr/local/tomcat/webapps/tomcatuser.org/webapps/ROOT/ directory to make
them accessible through web browser.
Please Advice...
Thanks,
Gaurav Pruthi