Problem in the initial configuration of the project of the 2nd edition JavaEE book with JSF Prime Faces and CDI

2

Galera,

I began today to read the book that I mention in the title of this question.

Following step by step I created the server in the eclipse, the project and the initial servlet following the instructions in the book. But following the book when I try to perform the step described in pages 33 and 34 that is to add the project to the server, I have the following answer: "There are no resources that can be added or removed from the server".

I know other ways to get this to work because I have already created several projects and added it to the server without problems.

I put this question as a way to help improve the book and help the new ones in this matter.

So I would like to have some help to do following the book, maybe I missed something or in the book forgot to mention some step.

The images of the step you intended to perform. From the book:

Onmymachine(theerror):

    
asked by anonymous 23.03.2015 / 12:12

1 answer

2

I was able to solve the problem I was having and the book is not wrong, just not very clear. I'll explain the problem and solution.

Problem: In the book they ask you to create a simple maven project and then add the project facet Dynamic Web Module version 3.1. I did this but when I tried to add the project to the serividor it did not work, giving the error that I showed. This happened because I tried to add the project to a tomcat7 server and not tomcat8 as it says in the book. But I only did this because I did not know that there was this compatibility problem between the facet version and the server.

Solution: Simple :-) ... I created a tomcat8 server and it worked. I came to this conclusion thanks to the discussion below in the eclipse forum: link

I think you should add something in the book that talks about it or even indicate a link that explains better, because we often do things without knowing why.

    
24.03.2015 / 10:18