test_class.file: pages/jasper/src/test/java/cloud/piranha/pages/jasper/JasperInitializerTest.java
test_class.identifier: JasperInitializerTest
test_case.body: @Test
      void testOnStartup() throws Exception {
          DefaultWebApplication servletContext = new DefaultWebApplication();
          servletContext.addResource(new DirectoryResource(new File("src/test/webapp/webapp1")));
          JasperInitializer initializer = new JasperInitializer();
          initializer.onStartup(new HashSet<>(), servletContext);
      }
test_case.class_method_signature: JasperInitializerTest.testOnStartup()
test_case.full_signature: @Test void testOnStartup()
test_case.identifier: testOnStartup
test_case.invocations: addResource onStartup
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnStartup()
focal_class.declarator: LOGGER = Logger.getLogger(JasperInitializer.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(JasperInitializer.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: pages/jasper/src/main/java/cloud/piranha/pages/jasper/JasperInitializer.java
focal_class.identifier: JasperInitializer
focal_class.interfaces: implements ServletContainerInitializer
focal_class.class_method_signature: JasperInitializer.getClassesDirectory(ServletContext servletContext)
focal_class.full_signature: private String getClassesDirectory(ServletContext servletContext)
focal_class.identifier: getClassesDirectory
focal_class.modifiers: private
focal_class.parameters: (ServletContext servletContext)
focal_class.return: String
focal_class.signature: String getClassesDirectory(ServletContext servletContext)
focal_class.class_method_signature: JasperInitializer.getJarFiles(ServletContext servletContext)
focal_class.full_signature: private String getJarFiles(ServletContext servletContext)
focal_class.identifier: getJarFiles
focal_class.modifiers: private
focal_class.parameters: (ServletContext servletContext)
focal_class.return: String
focal_class.signature: String getJarFiles(ServletContext servletContext)
focal_class.class_method_signature: JasperInitializer.onStartup(Set<Class<?>> classes, ServletContext servletContext)
focal_class.full_signature: @Override public void onStartup(Set<Class<?>> classes, ServletContext servletContext)
focal_class.identifier: onStartup
focal_class.modifiers: @Override public
focal_class.parameters: (Set<Class<?>> classes, ServletContext servletContext)
focal_class.return: void
focal_class.signature: void onStartup(Set<Class<?>> classes, ServletContext servletContext)
focal_method.body: @Override
      public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException {
          LOGGER.fine("Initializing Jasper integration");
  
          if (JspFactory.getDefaultFactory() == null) {
              JspFactory.setDefaultFactory(new JspFactoryImpl());
          }
  
          ServletRegistration.Dynamic registration = servletContext.addServlet("jsp", "org.apache.jasper.servlet.JspServlet");
          registration.addMapping("*.jsp");
          String classpath = System.getProperty("jdk.module.path",
                  System.getProperty("java.class.path")) +
                  getClassesDirectory(servletContext) +
                  getJarFiles(servletContext);
  
          LOGGER.log(FINER, () -> "Jasper classpath is: " + classpath);
  
          registration.setInitParameter("classpath", classpath);
          registration.setInitParameter("compilerSourceVM", "1.8");
          registration.setInitParameter("compilerTargetVM", "1.8");
  
          WebApplication webApplication = (WebApplication) servletContext;
          webApplication.setJspManager(new JasperJspManager());
  
          LOGGER.fine("Initialized Jasper integration");
      }
focal_method.class_method_signature: JasperInitializer.onStartup(Set<Class<?>> classes, ServletContext servletContext)
focal_method.full_signature: @Override public void onStartup(Set<Class<?>> classes, ServletContext servletContext)
focal_method.identifier: onStartup
focal_method.invocations: fine getDefaultFactory setDefaultFactory addServlet addMapping getProperty getProperty getClassesDirectory getJarFiles log setInitParameter setInitParameter setInitParameter setJspManager fine
focal_method.modifiers: @Override public
focal_method.parameters: (Set<Class<?>> classes, ServletContext servletContext)
focal_method.return: void
focal_method.signature: void onStartup(Set<Class<?>> classes, ServletContext servletContext)