tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sullivan <>
Subject Re: Why doesn't my context work?
Date Sat, 17 Sep 2005 00:20:20 GMT
> >From the documentation for Tomcat 5.5.9 at
> http://localhost:8080/tomcat-docs/config/context.html:
> The Document Base (also known as the Context Root) 
> directory for this web application, or the pathname
> to the web application archive file (if this web
> application is being executed directly from the WAR 
> file). You may specify an absolute pathname for this 
> directory or WAR file, or a pathname that is relative 
> to the appBase directory of the owning Host.
> If you've not changed server.xml, then the appBase is
> $CATALINA_HOME/webapps.
> Rather than using a combination of appBase and docBase
> in your context file (and I don't think appBase is
> appropriate in a context node - at least in 5.5.9),
> you could use an absolute path for docBase:
> /home/michael/webspace/webapps/user
> This means that the following URL would potentially
> work.
> The next issue is one of permissions.  If you're on a
> UNIX machine, make sure that 
> /home/michael/webspace/webapps/user
> is readable by the owner of the process running
> Tomcat.  Otherwise you'll not be able to serve the
> files.
> Finally, I notice that you're going directly at this
> URL:
> Unless your Tomcat is configured to run on port 80,
> you will be hitting any web server that is running,
> and not your Tomcat server.  By default, Tomcat serves
> http on port 8080.
> In order to get Tomcat and Apache talking, you'll have
> to do a lot more work.  This involves getting mod_jk
> (or mod_proxy) built and installed, configuring Apache
> httpd.conf,, and possibly
> server.xml (although the default server.xml already
> has the ajp 1.3 connector configured).
> I hope that starts you down a more productive path.
> /mde/
> __________________________________________________

OK.  For clarification I am running tomcat-5.0.27-r6.  I want user's
tomcat files to be read from /home/*/webspace/webapps.  My personal
account is michael so my personal tomcat directory  would
be /home/michael/webspace/webapps .  Just for the sake of arguments I
created a directory called user under /home/michael/webspace/webapps and
moved my jsp files into it.
My /opt/tomcat5/conf/Catalina/localhost/user.xml file looks like this

<Context docBase="/home/michael/webspace/webapps/user"
        debug="0" privileged="true">

I restarted Tomcat.  I am using mod_jk and when I go to I see the Tomcat start page.  However,
when I go to I get Tomcat 404
Resource Not Available for /user/index.jsp .  You reprinted the
paragraph from the Tomcat documentation and it made the same amount of
sense to me as it did when I read it in the Tomcat docs:  Basically
none.  I've taken the path and appBase attributes out of the my Context
tag as you see above.  The entire tree from /home/michael/webapps to the
files in /home/michael/webapps/user have been set chmod 755 (owner all,
group and others read/execute), and it still doesn't work.  Any other
ideas?  I haven't changed /opt/tomcat5/conf/server.xml at all...

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message