I'm new to Tomcat and having a problem I thought someone could help me with.
I have an application with servlet installed under webapps. I can run the
servlet without problems. The servlet creates a page that gets sent to the
browser with some links to some (HTML and XML) data files on it. When I
click on one of the links, I get a 404 (resource not available) error, even
though the file exists under my web application location. My setup is
(basically, I'm not at work, so I can't remember it exactly):
webapps\testapp\index.html
webapps\testapp\WEB-INF\web.xml
webapps\testapp\WEB-INF\classes\servlet.class
webapps\testapp\WEB-INF\src\servlet.java
webapps\testapp\data\test1.html
in my server.xml config file I have:
<Context path="/testapp" docBase="testapp" debug="0" reloadable="true">
although I don't think I need this since my app is located under the webapps
directory. Navigating to:
http://localhost:8080/testapp/index.html works fine, but navigating to
http://localhost:8080/testapp/data/test1.html gives me the 404 error. I was
under the imression that I could place files anywhere under the application
root (docBase) directory. Am I missing something here. Configuration
oversight?
Thanks for any information.
Joe.