Package org.mapfish.print.servlet
Class BaseMapServlet
java.lang.Object
org.mapfish.print.servlet.BaseMapServlet
- Direct Known Subclasses:
MapPrinterServlet
Base class for MapPrinter servlets (deals with the configuration loading).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voiderror(javax.servlet.http.HttpServletResponse httpServletResponse, String message, org.springframework.http.HttpStatus code) Send an error to the client with a message.protected final StringBuildergetBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the base URL of the print servlet.protected voidsetCache(javax.servlet.http.HttpServletResponse response) Enable caching of the response.final voidsetCacheDuration(int cacheDurationInSeconds) Set the cache duration for the queries that can be cached.protected static voidsetNoCache(javax.servlet.http.HttpServletResponse response) Disable caching of the response.
-
Constructor Details
-
BaseMapServlet
public BaseMapServlet()
-
-
Method Details
-
error
protected static void error(javax.servlet.http.HttpServletResponse httpServletResponse, String message, org.springframework.http.HttpStatus code) Send an error to the client with a message.- Parameters:
httpServletResponse- the response to send the error to.message- the message to sendcode- the error code
-
setNoCache
protected static void setNoCache(javax.servlet.http.HttpServletResponse response) Disable caching of the response.- Parameters:
response- the response
-
getBaseUrl
Returns the base URL of the print servlet.- Parameters:
httpServletRequest- the request
-
setCacheDuration
public final void setCacheDuration(int cacheDurationInSeconds) Set the cache duration for the queries that can be cached.- Parameters:
cacheDurationInSeconds- the duration
-
setCache
protected void setCache(javax.servlet.http.HttpServletResponse response) Enable caching of the response.- Parameters:
response- the response
-