
com.guicedee.guicedservlets.jsf.implementations.GuicedServletJSFModule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guiced-servlets-jsf Show documentation
Show all versions of guiced-servlets-jsf Show documentation
Configures Guice Servlet for JSF
package com.guicedee.guicedservlets.jsf;
import com.guicedee.guicedservlets.services.GuiceSiteInjectorModule;
import com.guicedee.guicedservlets.services.IGuiceSiteBinder;
import com.guicedee.logger.LogFactory;
import javax.faces.webapp.FacesServlet;
import java.util.Set;
import java.util.logging.Logger;
public class GuicedServletJSFModule
implements IGuiceSiteBinder
{
private static final Logger log = LogFactory.getLog("GuicedServletJSFModule");
public static Set JsfListenURLs = Set.of("/faces/", "/faces/*", "*.jsf", "*.faces", "*.xhtml");
@Override
public void onBind(GuiceSiteInjectorModule module)
{
module.bind(FacesServlet.class)
.asEagerSingleton();
module.serve$(JsfListenURLs)
.with(FacesHttpServlet.class);
log.config("Serving " + JsfListenURLs.toString() + " with Faces Servlet");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy