All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.guicedee.guicedservlets.jsf.implementations.GuicedServletJSFModule Maven / Gradle / Ivy

There is a newer version: 62
Show newest version
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