Serving mydomain.com, what I have is one application in an unpacked
directory, 'app-root', with jsp files located in the root dir or its
subdirs. The Host for mydomain.com has its appBase pointing to 'app-root'. 

The ROOT.xml for mydomain.com has only one line: <Context path="" docBase=""
reloadable="true"/>

I read the document on the two attributes appBase and docBase, but it is not
very clear to me what the difference is. In my case, what should docBase be?


Thanks and regards,
Qiao 

-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, January 30, 2009 9:23 PM
To: Tomcat Users List
Subject: Re: application.getRealPath() in JSP from a subdirectory

Qiao Jin wrote:
> Chuck, thanks for your response. It turns out that the auto-deploy switch
> does affect the situation. New subdirs created after the auto-deploy is
> turned off are no longer being treated as separate apps and getRealPath is
> returning the path as I expected.

This looks very much like you have configured appBase == docBase for the
ROOT
web application. This is likely to cause a world of pain - the behaviour you
have seen here being just one example. Try restarting Tomcat and see what
happens to your getRealPath() calls...

docBase should never be set to the same location as appBase.

Mark




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to