problem in a Maven + JSF application

Asked

Viewed 597 times

3

I’m trying to follow a workbook but when I do the Access project properties procedure and find the Project Facets side menu appears the window in the attachment and then I mark the altenativa as shown in the Javaserver Faces figure

inserir a descrição da imagem aqui

the eclipse guides to click on the highlighted area with the name of

further Configuration available

what I can understand is that he wants me to add the jsf library manually.

this is not the common procedure.

I’ve even added the library by Maven himself

what only I want is to mark the option Javaserver Faces is OK following the workbook.

how do I solve this problem?

the project I’m creating is a Maven project.

when I run the application even with the problem it generates this message

An error has occurred. See error log for more Details. java.lang.Nullpointerexception

  • But the focus of the book is the use of Maven? If it is just use the appropriate archetype or put the references in pom.xml. What I think is happening is that you are using a jsf implementation embedded in your project and are not doing an 'update' on your Maven repository.

  • which archetype would be suitable for a Maven + JSF project?

  • I don’t know, it depends on a lot. As you are learning I suggest you use Blank and then right-click on the project - Configuration - Add JSF Capabilities (or something like that).

  • i don’t have this option in my Add JSF eclipse or something like that.

  • It is difficult to help because the problem is not punctual. Try reading this link: http://www.infobase.com.br/creator-project_jsf-maven-eclipse/

  • the version of eclipse Luna removed this option, had already seen this site.

  • take a look here http://www.guj.com.br/26245-problemas-com-maven-jsf

  • If your intention is to learn, I suggest trying with Netbeans, it has native integration with Maven, and is much more beginner-friendly.

  • @wladyband So I suggest you answer your own question and mark as answer.

Show 4 more comments

2 answers

0

Ola, Good evening, well I managed to solve the same problem by downloading the mojarra library only, using the link highlighted in the image below!

para acessar tal janela basta clicar no erro abaixo da lista da janela project facets

-2

Even with the conditions shown above it couldn’t solve, however I realized that in my Maven project I didn’t have web.xml which would be the same thing as creating an Android project without the Androidmanifest.xml file, it doesn’t run.

after I put the web.xml file in the WEB-INF folder there it ran normally. but thank you for the help of all. and was very happy to have charitable people like you thanks for everything.

Here is the web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>
  • actually java web project runs without web.xml without problems.

  • sorry, you must have made the comment without having read my post right, my project is done in Maven with JSF, and a JSF project without web.xml is like an Android project without the Androidmanisfest.xml file

  • 1

    ola @wladyband, I read your post yes, and from version 2.0 of JSF, if you are running in a container compatible with Servlet 3.0, a JSF web application no longer needs a web.xml file to work... so your answer is a few years outdated, and therefore incorrect. source 1: http://docs.oracle.com/javaee/6/api/javax/faces/webapp/FacesServlet.html source 2: https://weblogs.java.net/blog/cayhorstmann/archive/2009/10/another-small-step-jsf

Browser other questions tagged

You are not signed in. Login or sign up in order to post.