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:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) voidinitService(org.springframework.boot.context.event.ApplicationReadyEvent ignored) voidsetCompressJavascript(Boolean compressJavascript) voidsetCustomResources(List<CustomResourceContribution> customResources) voidsetJavaScriptModules(List<JavaScriptModuleContribution> javaScriptModuleContributions) voidsetJavaScripts(List<JavaScriptContribution> javaScripts) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
JavaScriptServlet
-
-
Method Details
-
initService
@EventListener public void initService(org.springframework.boot.context.event.ApplicationReadyEvent ignored) -
setJavaScripts
-
setJavaScriptModules
@Autowired public void setJavaScriptModules(List<JavaScriptModuleContribution> javaScriptModuleContributions) -
setCustomResources
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
setCompressJavascript
@Value("${nice2.web.core.compressJavascript}") public void setCompressJavascript(Boolean compressJavascript)
-