File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jan 10, 2005
Oct 13, 2005 07:56:00
I want to put my index.jsp in this directory. /home/www
How should server.xml be setup? I keep getting 404 error or a blank page.
<Host name="localhost" appBase="/home/www"
<Context path="" docBase="/home/www" reloadable="true" />
tried a ton of configs. still don't work.
Joined: Sep 23, 2004
Oct 13, 2005 09:54:00
What do your error logs say? I'm guessing that the context couldn't be started for some reason. I usually have something more like:
<Host name="localhost" appBase="/home/www" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="" docBase="" reloadable="true" /> </Host>
note that the docBase of the Context is not a full path name. This just means that it inherits from the parent Host element.
Also, remember that you are creating web apps. You will want to have at least a WEB-INF directory with a
web.xml. A really short web.xml would be something like:
<?xml version="1.0"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
I agree. Here's the link:
subject: configuration help.
Virtual Hosting with Tomcat 4.x
Tomcat-6: Per-virtual-host environment stuff?
Servlet Mapping in Tomcat
How to deploy to Root of Tomcat for Website?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014