After spending some time trying to discover why my JSF application worked on eclipse and didn’t on IntelliJ, I found a TomCat setup configuration at Run/Debug Configurations.

And it was like in that picture bellow:

Without notice I was getting http status 500 error message as the pic bellow after the deployment:

Solution

After search a little I found what was missing on that configuration.

The context root of a web application determines which URLs Tomcat will delegate to your web application.

In Application context field, you need to put the context path for your project. Generally is recommended that you specify the same context path that you chose to the Maven project. The context path can be found in the root POM file of your project as a <_context-root_> tag.

So the main point here is: Be aware of the application context, which defaults to “/” This means your application when deployed to the server would be available at “http://localhost:8080//” if you want it to be deployed to another path, you need to update the value in the Application Context field. As in my case I put the same WAR application name.

After that all the things are working and Mojarra found the root context as the image bellow:

That’s All.