|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet toolbox.web.ControllerServlet
public class ControllerServlet
Front Controller servlet for developing web applications.
The servlet functions as a controller for all the actions defined in the web_config.xml file.
Requests to this servlet take the following form: http://server/your_app/controller?[action=<action>][template=<tmpl_name>]
Constructor Summary | |
---|---|
ControllerServlet()
Default constructor |
Method Summary | |
---|---|
void |
destroy()
Destroy the servlet. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles all HTTP GET requests. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles all HTTP POST requests. |
XMLProperties |
getConfiguration()
Return the XML configuration properties of this controller. |
java.util.Map |
getProperties()
Return the global configuration properties as a map. |
java.lang.String |
getResource()
Return the name of the resource configured for this controller. |
Validator |
getValidator(java.lang.String name)
Return the named Validator instance. |
void |
init(javax.servlet.ServletConfig config)
Initialise the ControllerServlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ControllerServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
config
- Servlet configuration properties.
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
request
- GET request.response
- Response channel.
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
request
- GET request.response
- Response channel.
javax.servlet.ServletException
java.io.IOException
public XMLProperties getConfiguration()
getConfiguration
in interface Controller
public Validator getValidator(java.lang.String name)
getValidator
in interface Controller
name
- String containing name of Validator to return.
public java.util.Map getProperties()
getProperties
in interface Controller
public java.lang.String getResource()
getResource
in interface Controller
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |