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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGet
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) void
initService
(org.springframework.boot.context.event.ApplicationReadyEvent ignored) void
setCompressJavascript
(Boolean compressJavascript) void
setCustomResources
(List<CustomResourceContribution> customResources) void
setJavaScriptModules
(List<JavaScriptModuleContribution> javaScriptModuleContributions) void
setJavaScripts
(List<JavaScriptContribution> javaScripts) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, service
Methods 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:
doGet
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
setCompressJavascript
@Value("${nice2.web.core.compressJavascript}") public void setCompressJavascript(Boolean compressJavascript)
-