wadearnold

Well-Known Member
Jan 13, 2002
111
0
316
Ok I have installed the tomcat via the cool new tool and for some domain names it works and then others give a 404 from tomcat. I have looked at httpd.conf and web.xml and they both seem exatly the same for the domains that work. I also found in another post to try re-installing tomcat but that did not do anything.

-- does not work --
http://bdfs.eccentrichosting.net/jsptest.jsp

-- works --
http://wadearnold.com/jsptest.jsp


HTTP Status 404 - /jsptest.jsp
type Status report
message /jsptest.jsp
description The requested resource (/jsptest.jsp) is not available.
Apache Tomcat/5.0.28

Any ideas what else to check? Yes the file is there!

Thanks so much!

Wade
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Try re-installing it. The latest cpanel update did something fishy with it. upcp broke tomcat on two of my servers, but re-installing it fixed it.
 

wadearnold

Well-Known Member
Jan 13, 2002
111
0
316
answer to 404 error

Ticket number: 81293
In order to get tomcat to work it has to have a domain resolving for it.

Thanks for the help!

wade
 

volcano

Member
Jul 8, 2003
6
0
151
You need to have a <host></host> entry for each domain you want to run servlets for setup in the server.xml file.

e.g:
Code:
<!-- host 1 context's -->
<Host name="host.com" appBase="/home/host/public_html">
    <Context path="" reloadable="true" docBase="/home/host/public_html" debug="1"/>
</Host>
<Host name="www.host.com" appBase="/home/host/public_html">
    <Context path="" reloadable="true" docBase="/home/host/public_html" debug="1"/>
</Host>

<!-- host 2 context's -->
<Host name=".host2.com" appBase="/home/host2/public_html">
    <Context path="" reloadable="true" docBase="/home2/host2/public_html" debug="10"/>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="host2_log" suffix=".txt" timestamp="true"/>
</Host>
<Host name="www.host2.com" appBase="/home/host2/public_html">
    <Context path="" reloadable="true" docBase="/home2/host2/public_html" debug="10"/>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="host2_log" suffix=".txt" timestamp="true"/>
</Host>