Hi, Where are you getting this $CatalinaRoot ? I don't see this env var set in catalina.sh.
aka_sergio --- "Joe Reger, Jr." <[EMAIL PROTECTED]> wrote: > > Hi All. > > I'm still having trouble with this issue. I'm not > able to upload a .WAR > file through the html web application manager but > the same war manually > exploded and placed into the /webapps directory > works fine. I've included > the web.xml to see if anybody can determine why > Tomcat's rejecting it. I've > Included the stdout log file. Some notes from the > log4j tomcat debug file: > > Line 91: Tomcat has found the context.xml and moved > it to > $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml > > Line 537: org.apache.catalina.core.StandardContext - > Starting ROOT > > Line 7542: org.apache.catalina.startup.ContextConfig > - Missing application > web.xml, using defaults only > > Line 7744: org.apache.catalina.startup.HostConfig - > Checking context[] > redeploy resource C:\SuperFly\Tomcat > 5.5\webapps\ROOT > > Line 7746: > ContainerBackgroundProcessor[StandardEngine[Catalina]] > org.apache.catalina.core.StandardContext - Stopping > > Line 7825: Delete C:\SuperFly\Tomcat > 5.5\webapps\ROOT.war > > Here's what I see when I deploy: > > Click upload. Tomcat moves ROOT.war into > $CatalinaRoot$\webapps\. > Context.xml, from inside the .war file seen in > $CatalinaRoot$\conf\localhost. Application appears > in manager/html. A few > seconds later the application dissappears and all > files are deleted. > > The tomcat sample war file appears to be broken too > : > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ > > I'm open to suggestions. More info below. > > Thanks, > > Joe > > _____ > > From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 02, 2005 11:58 AM > To: '[email protected]' > Subject: Re: Missing application web.xml > > > Hi! > > I'm having problems with the "Missing application > web.xml" error on dev > machines running Windows XP,. Tomcat 5.5.7, Java > 5.0. > > It happens when I try to deploy a war file by using > the Manager app or by > placing it in the /webapps directory. Here are some > of the things I've > done, each time trying to deploy the resulting WAR > file with no success and > the same error: > > 1) Completely emptied the /webapps directory (per > Paul's success below). > 2) Verified existence of web.xml inside WAR file. > 3) Uninstalled ROOT app and verified file removal > from /webapps directory. > 4) Checked order of elements in web.xml to fit spec. > 5) Validated web.xml in Intellij Idea against > http://java.sun.com/dtd/web-app_2_3.dtd > 6) Changed <web-app> tag from the sample web.xml in > documentation to the one > used in Manager app from 5.5.7 build: > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > 7) Removed all comments and spaces from web.xml. > > When I unpack the WAR manually and place the > unpacked files in /webapps the > application works fine. Tomcat likes the web.xml, > but it can't seem to find > it inside of the WAR file. > > Incidentally, when I watch my /webapps directory > during a Manager deploy, > the ROOT.war file does appear for a few seconds. It > appears that Tomcat is > trying to find a web.xml inside of it, fails and > then deletes the file. > > I use Ant to build the WAR file: > <jar jarfile="ROOT.war"> > <fileset dir="${files}" excludes="**/*.java"/> > </jar> > > Any help appreciated. Seen this on two development > XP machines today. > > Best, > > Joe Reger > > > ---Original > Message---------------------------------------------------- > I just wanted to follow up and get into the record > what I think is the > > solution to the problem I asked about > > on 1/20. I turns out that the reason I was getting > "Missing > > application web.xml" errors in my stdout.log > > was because of a problem that arose during the > undeployment > > precipitated by my deployment of a new > > build. It appears (just based on Tomcat's behavior) > that when you move > > a WAR file into the webapps directory, the first > thing Tomcat tries to > > do is delete the old unpacked version. In my case, > it failed to do > > that because (as I found) the servlet had open file > handles to files > > inside the servlet's context directory. Windows XP > doesn't let you > > delete files that it thinks are "in use", and I > suspect that is the > > trouble Tomcat was running into. Anyway, it deleted > everything except > > those files, including the web.xml file, which it > then reported as > > missing. > > > > When I modified my code to make sure the files were > closed after being > > read, the problem went away. Well, I haven't had > the fix in place long > > enough to be sure it has gone away, but at the very > least it certainly > > seems to have helped a great deal, so I think the > problem is solved. > > > > --Paul Lynch (eph1v3t8 @ mailblocks.com) > > <?xml version="1.0" encoding="ISO-8859-1"?> > <!-- > <!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 xmlns="http://java.sun.com/xml/ns/j2ee" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > <filter> > <filter-name>UrlRewriteFilter</filter-name> > > <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> > </filter> > <filter-mapping> > <filter-name>UrlRewriteFilter</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > <servlet> > <servlet-name>Loader</servlet-name> > > <servlet-class>reger.scheduler.Loader</servlet-class> > <load-on-startup>100</load-on-startup> > </servlet> > <servlet-mapping> > <servlet-name>default</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.jsp</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.log</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.jspx</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.xml</url-pattern> > </servlet-mapping> > <session-config> > <session-timeout>20</session-timeout> > </session-config> > <welcome-file-list> > <welcome-file>index.log</welcome-file> > <welcome-file>index.jsp</welcome-file> > <welcome-file>index.html</welcome-file> > <welcome-file>index.htm</welcome-file> > </welcome-file-list> > <error-page> > <error-code>500</error-code> > <location>/error/500.jsp</location> > </error-page> > <resource-ref> > <description>Database > Connection</description> > <res-ref-name>jdbc/db</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > </web-app> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
