Package com.levigo.jadice.web.server
Class FontResourceServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.levigo.jadice.web.server.FontDownloadServlet
com.levigo.jadice.web.server.FontResourceServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
@WebServlet(description="Servlet providing font-related resources",
displayName="jadice web toolkit font resources download",
name="jwtFontResourceServlet",
urlPatterns="/jwt/fontresources/*")
public class FontResourceServlet
extends FontDownloadServlet
A servlet providing static font-related resources. Currently only webfontloader.js (formerly:
webfonts.js) and the JWT-icon-font is served.
- See Also:
-
Field Summary
Fields inherited from class com.levigo.jadice.web.server.FontDownloadServlet
accessControlAllowOriginHeader, cacheTimeToLive
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addContentTypeHeaders
(jakarta.servlet.http.HttpServletResponse response, String fileName) Sets the content-type for a requested resource.protected void
doGet
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Methods inherited from class com.levigo.jadice.web.server.FontDownloadServlet
addCacheHeaders, clientSupportsWoff, getCacheTimeToLive, getStreamHash, init, setCacheTimeToLive
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
FontResourceServlet
public FontResourceServlet()
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doGet
in classFontDownloadServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
addContentTypeHeaders
protected void addContentTypeHeaders(jakarta.servlet.http.HttpServletResponse response, String fileName) Sets the content-type for a requested resource. This logic is very simple as not many file-types are served- Parameters:
response
- the servlet-responsefileName
- the name of the resource
-