I programmed an application with JSF and some other fraeworks. Then I destroyed my metadata with maven and then I created a new project and imported all my classes and config files into the new project. So that I have clean metadata. The Project can be built without problems now. But when I want to start it onto tomcat I get the following exception:
com.sun.faces.config.ConfigurationException: no web.xml present
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.scanForFacesServlet(ConfigureListener.java:785)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.<init>(ConfigureListener.java:745)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:173)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
But there is definitely a web.xml
in that project. Has somebody an idea where my mistake could be? Thank you
Update
Yes I am using m2Eclipse!
My directory tree looks like:
OLD
My Servlet is there as well:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
UPDATE2
- Directories (after BalusC Commend): Here I have found a good Manual about Maven Web Projects. But unfortunately the problem stayed the same. My directory structure looks like:
UPDATE3
Response to Pascal's comment:
mvn clean compile
is successfullmvn install
throws a build error:[INFO] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if execut ing in update mode)
I executed those commands from windows console
Maybe the problem is something else. There is another Warning while starting the server:
27.08.2010 09:04:52 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:studentportal' did not find a matching property.
Maybe that helps?