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 void
error
(javax.servlet.http.HttpServletResponse httpServletResponse, String message, org.springframework.http.HttpStatus code) Send an error to the client with a message.protected final StringBuilder
getBaseUrl
(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the base URL of the print servlet.protected void
setCache
(javax.servlet.http.HttpServletResponse response) Enable caching of the response.final void
setCacheDuration
(int cacheDurationInSeconds) Set the cache duration for the queries that can be cached.protected static void
setNoCache
(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
-