I've deployed, after some struggle, a web-app on a (remote) Tomcat 5.5 server (Turnkey Linux comes with that). It is a GoogleWebToolkit web-app with a Java backend.
Observing the logs everything went fine. The /manager app also shows 'running=true' on my new app.
But the problem is, going to the /myApp url gives 404. What I've done so far, to no success:
Any hints on how to fix this, find out what the problem is, or what might cause this? Can there be conflicts? there is another app running in the $CATALINA_HOME/webapps dir, can that conflict with myApp, which is in the same directory deployed?
Below is my server.xml
<?xml version="1.0" encoding="UTF-8"?>
<Server>
<Listener className="org.apache.catalina.core.AprLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<GlobalNamingResources>
<Environment
name="simpleValue"
type="java.lang.Integer"
value="30"/>
<Resource
auth="Container"
description="User database that can be updated and saved"
name="UserDatabase"
type="org.apache.catalina.UserDatabase"
pathname="conf/tomcat-users.xml"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
</GlobalNamingResources>
<Service
name="Catalina">
<Connector
port="8009"
redirectPort="8443"
address="127.0.0.1"
protocol="AJP/1.3">
</Connector>
<Engine
defaultHost="localhost"
name="Catalina">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
<Host
appBase="webapps"
name="localhost">
</Host>
</Engine>
</Service>
</Server>
So you have an Apache instance sitting in front of Tomcat. Some/all requests to Apache are forwarded to Tomcat AJP port 8009. Assuming this Apache-Tomcat bridge is working ok, and thus focusing only on your deployed application, you probably need to add some JKMount
directives into Apache's httpd.conf
file, to ensure that requests to /myApp
url are indeed forwarded to Tomcat. Otherwise, they are served by Apache, which means that you get a 404 error when those resources are not found.