This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Directory listing context docBase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Directory listing context docBase" Watch "Directory listing context docBase" New topic
Author

Directory listing context docBase

billy thompson
Greenhorn

Joined: Jan 06, 2011
Posts: 2
I am trying to setup tomcat with directory listing of files enabled. Tomcat was installed through Eclipse. I have edited the server.xml file to include the new context path needed however http://localhost:8080/movies doesn't work (404). http://localhost:8080/movies/DB_Connect does work with it's other path though. What other settings could possibly cause this problem? The reason i need the directory available publicly is because i want to be able to have files downloaded from a servlet easily with sendRedirect()

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">

<Context docBase="DB_Connect" path="/DB_Connect" reloadable="true" source="org.eclipse.jst.jee.serverB_Connect"/>
<Context docBase="C:/Movies" path="/movies" reloadable="true"/>

</Host>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Directory listing context docBase
 
Similar Threads
Root Context - mywebapps has no effect
different port to different app
problem when setting context in server.xml
ROOT directory behavior
get to files on another partition