I’ve problem in properly setup a jsf2 project with tomcat.
Configuration:
- Eclipse Indigo x64 (IDE for Java EE developers)
- Tomcat 7.0.22 x64
- JDK 1.7.0
- JSF API: version 2.1.3
- JSF Implementation: Primefaces 3.0.M3
- Project facets: Dynamic Web module 3.0, Java 1.7, JavaScript 1.0, JavaServer Faces 2.0
I configure my tomcat v7.0 server in Eclipse, then add my project to the server, run tomcat from within Eclipse.
Then, when I browse localhost:8080/myapp, Tomcat send me a 404 error. When I look in <workspace-root>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps I see my webapp with all config files, namely web.xml, but it seems that Tomcat doesn’t know it.
My web.xml file has the following web-app element configuration:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
Moreover, when I start tomcat server, I see on the console view the usual output log string:
Info: Initializing Mojarra 2.1.3 (FCS 20110908) for context ‘/mycontext’
so it seemed to me that all is configured fine.
What I’m missing?
Make sure that your
<welcome-file>inweb.xmlis properly set and points to an existing file.