# Class JasperInitializer

java.lang.Object
org.apache.jasper.servlet.JasperInitializer

All Implemented Interfaces:
  `ServletContainerInitializer`

public class JasperInitializer extends Object implements ServletContainerInitializer
Initializer for the Jasper JSP Engine.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JasperInitializer()`
  Constructs a new JasperInitializer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TldScanner`
  `newTldScanner(ServletContext context, boolean namespaceAware, boolean validate, boolean blockExternal)`
  Create a new TldScanner instance.
  `void`
  `onStartup(Set<Class<?>> types, ServletContext context)`
  Receives notification during startup of a web application of the classes within the web application that matched the criteria defined via the `HandlesTypes` annotation.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JasperInitializer

    public JasperInitializer()
    Constructs a new JasperInitializer.

- ## Method Details

  - ### onStartup

    public void onStartup(Set<Class<?>> types, ServletContext context) throws ServletException
    Description copied from interface: `jakarta.servlet.ServletContainerInitializer`
    Receives notification during startup of a web application of the classes within the web application that matched the criteria defined via the `HandlesTypes` annotation.
    Specified by:
      `onStartup` in interface `ServletContainerInitializer`
    Parameters:
      `types` - The (possibly null) set of classes that met the specified criteria
      `context` - The ServletContext of the web application in which the classes were discovered
    Throws:
      `ServletException` - If an error occurs

  - ### newTldScanner

    protected TldScanner newTldScanner(ServletContext context, boolean namespaceAware, boolean validate, boolean blockExternal)
    Create a new TldScanner instance.
    Parameters:
      `context` - the servlet context
      `namespaceAware` - whether to be namespace aware
      `validate` - whether to validate
      `blockExternal` - whether to block external entities
    Returns:
      the new TldScanner