Kamil Tomšík
Kamil Tomšík

Reputation: 2437

Tell that webapp uses JSF without the need for an empty faces-config.xml

Is there any other way to tell Java EE 6 app server that project is going to use JSF than having an empty faces-config.xml?

I'd love to do this somehow using annotations or maybe initialization code on appcontext. Having an empty faces-config.xml looks namely really ugly to me. I'm pretty okay with default configuration, just wondering if it's possible to drop the physical faces-config.xml file somehow.

Currently I already don't have any web.xml and I'm quite ok with that, so registering the FacesServlet manually is not what I'm looking for.

Upvotes: 1

Views: 751

Answers (2)

BalusC
BalusC

Reputation: 1108537

This is only supported in JSF 2.1 and above, not in JSF 2.0. So you have to upgrade your JSF 2.0 libraries to JSF 2.1 or to target an apsperver which bundles JSF 2.1.

Upvotes: 1

sogukk
sogukk

Reputation: 37

Yes you can remove it,in JSF 2 you dont need a faces-config.xml file unless you want to declare message resources,converters,validators,el resolvers etc.

Upvotes: 0

Related Questions