Thread: Tomcat War Deployment
hello all,
using apache2, tomcat6, ubuntu server 9.10 , gwt 2.0. after 60 hours of non stop trying have configured "stuff" happens without errors.
question this:
can deploy exploded context directly webapps directory or have use war file , use tomcat deployment web interface deploy?
have been searching days , cant seem webapp work unless deploy war file dont want due complications in development process. tomcat guru appreciated.
here situation in entirety:
- installed ubuntu server 9.10
- installed apache 2
- installed tomcat 6
- installed libapache2-mod-jk
- configured workers.properties
- configured apache
- configured tomcat
@ point able virtual hosting working apache accept request, pass mod_jk, passed tomcat.
updated tomcat 6 server.xml file following:
and put exploded context test.domain1.org folder.code:<?xml version='1.0' encoding='utf-8'?> <server port="8005" shutdown="shutdown"> <listener classname="org.apache.catalina.core.jasperlistener" /> <listener classname="org.apache.catalina.mbeans.serverlifecyclelistener" /> <listener classname="org.apache.catalina.mbeans.globalresourceslifecyclelistener" /> <globalnamingresources> <resource name="userdatabase" auth="container" type="org.apache.catalina.userdatabase" description="user database can updated , saved" factory="org.apache.catalina.users.memoryuserdatabasefactory" pathname="conf/tomcat-users.xml" /> </globalnamingresources> <service name="catalina"> <connector port="8080" protocol="http/1.1" connectiontimeout="20000" redirectport="8443" /> <connector port="8009" protocol="ajp/1.3" redirectport="8443" /> <engine name="catalina" defaulthost="localhost"> <realm classname="org.apache.catalina.realm.userdatabaserealm" resourcename="userdatabase"/> <!-- define default virtual host --> <host name="localhost" appbase="webapps" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false" /> <host name="test.domain1.org" appbase="domain1" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false" > <valve classname="org.apache.catalina.valves.accesslogvalve" directory="logs" prefix="domain1_access_log." suffix=".txt" pattern="common" resolvehosts="false"/> </host> <host name="test.domain2.org" appbase="domain2" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false" > <valve classname="org.apache.catalina.valves.accesslogvalve" directory="logs" prefix="access_log2." suffix=".txt" pattern="common" resolvehosts="false"/> </host> </engine> </service> </server>
when navigate browser domain can see webpage client side content being displayed. need make server side call 404 error.
appears servlet mapping not working checked web.xml file in root context directory. looks correct:
/var/lib/tomcat6/conf/catalina/test.domain1.org/root.xml looks this:code:<?xml version="1.0" encoding="utf-8"?> <!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> <!-- servlets --> <servlet> <servlet-name>loginservlet</servlet-name> <servlet-class>tmst.vtd2.server.serviceimpl.loginserviceimpl</servlet-class> </servlet> <servlet> <servlet-name>createuserservlet</servlet-name> <servlet-class>tmst.vtd2.server.serviceimpl.createuserserviceimpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>loginservlet</servlet-name> <url-pattern>/vtd2/login</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>createuserservlet</servlet-name> <url-pattern>/vtd2/createuser</url-pattern> </servlet-mapping> <!-- default page serve --> <welcome-file-list> <welcome-file>vtd2.html</welcome-file> </welcome-file-list> </web-app>
yet log still says:code:<?xml version='1.0' encoding='utf-8'?> <context displayname="test.domain1.org" docbase="" path="/" antiresourcelocking="false" > </context>
code:192.168.1.50 - - [12/feb/2010:10:58:15 -0500] "post /vtd2/createuser http/1.1" 404 1000
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Tomcat War Deployment
Ubuntu
Comments
Post a Comment