Class JavaScriptServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ch.tocco.nice2.web.core.impl.servlet.script.JavaScriptServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

@Component public class JavaScriptServlet extends jakarta.servlet.http.HttpServlet
Servlet which produces JS and jsb2 package files. Requests in "release" mode are cached in memory. YUI Compressor is used for JS compression.
See Also:
  • Constructor Details

    • JavaScriptServlet

      @Lazy public JavaScriptServlet(ModuleManager moduleManager, org.slf4j.Logger log)
  • Method Details

    • initService

      @EventListener public void initService(org.springframework.boot.context.event.ApplicationReadyEvent ignored)
    • setJavaScripts

      @Autowired public void setJavaScripts(List<JavaScriptContribution> javaScripts)
    • setJavaScriptModules

      @Autowired public void setJavaScriptModules(List<JavaScriptModuleContribution> javaScriptModuleContributions)
    • setCustomResources

      @Autowired public void setCustomResources(List<CustomResourceContribution> customResources)
    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • setCompressJavascript

      @Value("${nice2.web.core.compressJavascript}") public void setCompressJavascript(Boolean compressJavascript)