Class CsrfGuardServletContextListener

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class CsrfGuardServletContextListener
    extends Object
    implements javax.servlet.ServletContextListener
    • Constructor Detail

      • CsrfGuardServletContextListener

        public CsrfGuardServletContextListener()
    • Method Detail

      • getServletContext

        public static String getServletContext()
        servlet context (will be the empty string if it is / )
        Returns:
        the servletContext
      • getConfigFileName

        public static String getConfigFileName()
        config file name if specified in the web.xml
        Returns:
        config file name
      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • printConfigIfConfigured

        public static void printConfigIfConfigured​(javax.servlet.ServletContext context,
                                                   String prefix)
        Prints the configuration to the ServletContext log file with the given prefix. Has no effect unless the CONFIG_PRINT_PARAM init parameter is "true."
        Parameters:
        context - The ServletContext
        prefix - The string used as a prefix when printing the configuration to the log
        See Also:
        ServletContext.log(String)
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener