I am doing a project in eclipse with JSF 2.2 and Servlet 3.1 (Java EE7). The first problem I ran into was the error in pom.xml in the line:
<packaging>war</packaging>
Error: web.xml is missing and set to true.
I researched the web and added the following lines to my pom.xml
<plugin> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin>
After that, the error disappeared, but when you start the project, you get the error:
java.lang.NoClassDefFoundError: javax / servlet / jsp / jstl / core / Config
I searched the Internet again and put the following lines in pom.xml
<dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>
The problem is solved only with access, for example:
http: // localhost: 8080 / MeuSistema / Login.jsf
(I put the jsf mapping in inves xhtml)
It changes jsf to jsp, specifying the following:
HTTP Status 404 - / MeuSistema / Login.jsp
Out of curiosity, changing .jsf to .xhtml to see if at least the file is open, it returns the following:
HTTP Status 404 - Not Found /Login.xhtml in ExternalContext as Resource
I also found this alternative to make read web.xml
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <webxml>src/main/webapp/WEB-INF/web.xml</webxml> <warSourceDirectory>src/main/webapp/</warSourceDirectory> </configuration> </plugin>
But the problems remain the same.
Follow my pom.xml and web.xml:
http://pastebin.com/43nqctAn
http://pastebin.com/GbqR9j9v
Well, it doesn't seem to read web.xml. It's funny that in and not some kind of console error.
What could be wrong? Thank you for attention.