-
1. Re: war file exploded in tmp folder
peterj Jul 30, 2007 12:00 PM (in response to m_bojarski)The tmp directory is just a staging area for the contents of the WAR file. The app server cannot (or doesn't want to) work with files within an archive and therefore explodes the archive so that it can access the files directly. You could deploy your app as exploded in the deploy directory and then the tmp directory is not used. See http://wiki.jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment.
The main reason for the 404 error is that the URL entered is not being mapped correctly. Could you post the contents of your web.xml file? Be sure to embed the contents within [ code ]...[ /code ] brackets (without the spaces). You can select the contents and click the 'Code' button to do this. Also, post a URL that you think should work but results on a 404 error. -
2. Re: war file exploded in tmp folder
m_bojarski Jul 30, 2007 1:58 PM (in response to m_bojarski)<?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> <listener> <listener-class>trivia.ContextListener</listener-class> </listener> <Servlet> <Servlet-name>analyzeservlet</Servlet-name> <Servlet-class>trivia.AnalyzeServlet</Servlet-class> <load-on-startup>1</load-on-startup> </Servlet> <Servlet> <Servlet-name>controlservlet</Servlet-name> <Servlet-class>trivia.ControlServlet</Servlet-class> <load-on-startup>1</load-on-startup> </Servlet> <Servlet-mapping> <Servlet-name>analyzeservlet</Servlet-name> <url-pattern>/verify.html</url-pattern> </Servlet-mapping> <Servlet-mapping> <Servlet-name>controlservlet</Servlet-name> <url-pattern>/control.html</url-pattern> </Servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
That is my web.xml file. It is correct because I have deployed the same WAR file using Tomcat and Resin and it works successfully.
So in my index.html I have a form and action is action='control.html' -
3. Re: war file exploded in tmp folder
m_bojarski Jul 30, 2007 2:09 PM (in response to m_bojarski)Actually I found the problem. This was occuring because the start of my tags were capitalized i.e. <Servlet-mapping> should be <servlet-mapping>
-
4. Re: war file exploded in tmp folder
peterj Jul 30, 2007 2:17 PM (in response to m_bojarski)If you change your action to action='control' and change the servlet mapping to:
<Servlet-mapping> <Servlet-name>controlservlet</Servlet-name> <url-pattern>/control</url-pattern> </Servlet-mapping>
does it work? I am suspecting that the .html suffix is messing it up.