public class DispatchServlet
extends javax.servlet.http.HttpServlet
This server will respond to both HTTP GET and POST requests. activities are handled by ordered collections of DispatchHandlers.
This server is designed so that the dispatch activities are handled by ordered collections of DispatchHandlers are identified at run time through the olfs.xml configuration file. The olfs.xml file is identified in the servlets web.xml file. The olfs.xml file is typically located in $CATALINE_HOME/content/opendap.
The web.xml file used to configure this servlet must contain servlet parameters identifying the location of the olfs.xml file.
Constructor and Description |
---|
DispatchServlet() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
***********************************************************************
Handles incoming requests from clients.
|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected long |
getLastModified(javax.servlet.http.HttpServletRequest req)
Gets the last modified date of the requested resource.
|
void |
init()
************************************************************************
Intitializes the servlet.
|
doDelete, doHead, doOptions, doPut, doTrace, service, service
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
OLFS
. It uses
the methods processOpendapURL
to extract the OPeNDAP URL
information from the incoming client request. This OPeNDAP URL information
is cached and made accessible through get and set methods.
After processOpendapURL
is called loadIniFile()
is called to load configuration information from a .ini file,
If the standard behaviour of the servlet (extracting the OPeNDAP URL
information from the client request, or loading the .ini file) then
you should overload processOpendapURL
and loadIniFile()
. We don't recommend overloading doGet()
beacuse
the logic contained there may change in our core and cause your server
to behave unpredictably when future releases are installed.doGet
in class javax.servlet.http.HttpServlet
request
- The client's HttpServletRequest
request
object.response
- The server's HttpServletResponse
response
object.ReqInfo
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
doPost
in class javax.servlet.http.HttpServlet
request
- .response
- .protected long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified
in class javax.servlet.http.HttpServlet
req
- The current requestpublic void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet