Reputation: 37115
I have a WAR that I wish to deploay on a Tomcat. As this file is quite big (some 150MB) I simply dropped it into /usr/share/Tomcat7/webapps
to autodeploy it when server is restarted. After re-starting tomcat the app was deployed correctly, I may access the app using http://myhost:8080/myApp
. However there is no such folder under webapps/myApp
containing the files building up the app, the archieve-file is still there.
So I wonder how I change any file within that webapp (e.g. the config file under webapps/myApp/WEB-INF
) if the appropriate folder doesn´t even exist. Or is the webapp unpacked in any other folder which I´m not aware of?
This is my server.xml
-file:
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JasperListener"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"/>
</GlobalNamingResources>
<Service name="Catalina">
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="1024"
minSpareThreads="4"/>
<Connector executor="tomcatThreadPool" port="80" connectionTimeout="20000"
redirectPort="443" protocol="org.apache.coyote.http11.Http11NioProtocol"/>
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https"
secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="conf/certificate.jks"
keystoreType="JKS" keystorePass="ciardi25" keyPass="ciardi25"/>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"
startStopThreads="0">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b"/>
</Host>
</Engine>
</Service>
</Server>
EDIT: catalina.out
also states, that the app has successfully been deployed as there are many comments within the file that have been written by my app.
EDIT: OS is Amazon Linux AMI
Upvotes: 0
Views: 4674
Reputation: 2504
If Tomcat has been installed via some package manager, its files are usually spread across serveral dirs, like /usr/share/tomcatX/
, /var/lib/tomcatX/
, and /etc/tomcatX
.
If your packages have been deployed with apt
, you might try dpkg-query -L tomcat7
to see all paths belonging to the installation. With rpm
, it's rpm -ql tomcat7
. From the output, you can determine which dir is actually part of the installation, and which is not.
There is a Debian installation here, which has its webapps
folder in /var/lib/tomcat7/webapps
. Maybe you should check if this directory contains your webapp as well. Why Tomcat appears to nupack the WARs to a different folder yet remains mysterious. Are you using some /etc/init.d/tomcat7
for starting/stopping it? If so, you might want to take a look at that script and what it does on startup.
Upvotes: 2