Class ServletService

java.lang.Object
fr.paris.lutece.portal.service.servlet.ServletService

@ApplicationScoped public class ServletService extends Object
ServletService
  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static ServletService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the ServletService instance. This method will be removed in future versions.
      Returns the unique instance of the ServletService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the ServletService instance instead.

      Returns:
      The unique instance of ServletService.
    • registerServlet

      public void registerServlet(ServletEntry entry, Plugin plugin)
      Register a servlet
      Parameters:
      entry - The servlet entry defined in the plugin's XML file
      plugin - The plugin
    • setServletContext

      public static void setServletContext(jakarta.servlet.ServletContext servletContext)
      Defines the servlet context used by the ServletConfig given to the servlets
      Parameters:
      servletContext - The context
    • init

      public static void init(jakarta.servlet.ServletContext context) throws LuteceInitException
      Initializes servlets
      Parameters:
      context - The context
      Throws:
      LuteceInitException - If an error occurs
    • getServlets

      public List<LuteceServlet> getServlets()
      Gives the servlets list
      Returns:
      The list of servlets