org.faceless.graph2.tag
Class GraphServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.faceless.graph2.tag.GraphServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class GraphServlet
- extends HttpServlet
This is the Servlet that processes web-service requests, and retrieves
images and/or other files created by the Tag Library or a RequestHandler.
Typically there will be no need to override this class - extending it
can usually be done by creating a new RequestHandler
.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphServlet
public GraphServlet()
init
public void init()
throws ServletException
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface Servlet
- Overrides:
destroy
in class GenericServlet
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
- Overrides:
doGet
in class HttpServlet
- Throws:
ServletException
IOException
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
- Overrides:
doPost
in class HttpServlet
- Throws:
ServletException
IOException
process
protected void process(HttpServletRequest req,
HttpServletResponse res,
String xmlstring)
throws ServletException,
IOException
- Called from
doGet()
and doPost()
to process the XML.
- Parameters:
req
- the HTTP requestres
- the HTTP responsexmlstring
- XML to use for the request
- Throws:
ServletException
IOException
- Since:
- 2.4.1
authenticate
protected boolean authenticate(HttpServletRequest req)
- Return true if the request should be honoured, false otherwise.
By default this method checks the
headercheck.n
parameters
for patterns which will be matched against the supplied headers,
e.g. Referer:.*mywebsite.com/.*
- Parameters:
req
- the request to validate- Since:
- 2.3.2
getServletPath
public static String getServletPath(ServletContext sc,
HttpServletRequest req,
boolean relative)
- Get the base path that should be used to request a file from this servlet
to retrieve a file. The returned value should be appended with "pageid" and a "/"
character to retrieve the graph
- Parameters:
sc
- the Servlet Contextreq
- the Request contextrelative
- whether the URL is to be relative (true) or include the servlet host and port (false)- Since:
- 2.4.1
Copyright © 2001-2011 Big Faceless Organization