Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top