Application successfully deployed to Tomcat, but error 404

After some struggle, I deployed the web application to a remote Tomcat 5.5 server (Linux is included in the package). This is a GoogleWebToolkit web application with a Java backend.

Watching the magazines all went well. The / manager application also shows "running = true" in my new application.

But the problem is that the URL / myApp gives 404. What I have so far done without success:

  • Make sure it runs locally using Eclipse, works fine there
  • Checking the logs on the deployment server, it successfully loads Spring and some other libraries. In fact, it shows the same messages as when starting in guest mode in Eclipse
  • Applications / manager, / host-manager, / admin work fine.
  • Rebooting the application in / manager also says "OK"
  • I have a welcome file that actually goes straight there, which also gives 404
  • I use the default host ("localhost"), like manager / manager / host manager and / admin apps
  • I searched a lot on the Internet, but to no avail.
  • Tried another Tomcat (v6) server (my home ubuntu, the one I want to deploy is VPS somewhere on the network) and it just works there ... Reinstall VPS?

Any clues on how to fix this, find out what the problem is, or what might cause this? Could there be conflicts? there is another application running in the $ CATALINA_HOME / webapps directory, can this conflict with myApp, which is in the same directory that was deployed?

Below is my .xml server

<?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>
+3
2

, Apache, Tomcat. / Apache Tomcat AJP 8009. , Apache-Tomcat , , , , , JKMount Apache httpd.conf /myApp url Tomcat. Apache, , 404, .

+2

HTTPD/conf.d .conf, , -. .conf, ProxyPass conf. ProxyPass , tomcat. ProxyPass /myApp/ ajp://localhost:8009/myApp/. Tomcat AJP Connector 8009 .

+2

Source: https://habr.com/ru/post/1779163/


All Articles