Pier Luigi
Pier Luigi

Reputation: 7871

Can't run jsf2 project in Eclipse-Indigo/Tomcat7

I've problem in properly setup a jsf2 project with tomcat. Configuration:

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?

Upvotes: 1

Views: 680

Answers (2)

feuyeux
feuyeux

Reputation: 1196

Make sure about your eclipse setting file of named org.eclipse.wst.common.component is configured correctly. I think it doesn't due to your tomcat server's setting.

Upvotes: 1

BalusC
BalusC

Reputation: 1108722

Make sure that your <welcome-file> in web.xml is properly set and points to an existing file.

Upvotes: 1

Related Questions