info.magnolia.cms.servlets
Class MVCServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
info.magnolia.cms.servlets.MVCServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public abstract class MVCServlet
- extends javax.servlet.http.HttpServlet
The servlet gets a MVCHandler with the method getHandler. The method getCommand of this returned handler is called to
map the request parameters to a command. Then execute() is called which uses reflection to call a method. Each method
returns a string defining the view. After that, renderHtml is called.
Make a subclass to provide you own handler(s).
- Version:
- $Id: MVCServlet.java 32667 2010-03-13 00:37:06Z gjoseph $
- Author:
- Philipp Bracher
- See Also:
- Serialized Form
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected abstract MVCServletHandler |
getHandler(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MVCServlet
public MVCServlet()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
HttpServlet.doGet(HttpServletRequest,HttpServletResponse)
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
HttpServlet.doPost(HttpServletRequest, HttpServletResponse)
getHandler
protected abstract MVCServletHandler getHandler(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Parameters:
request
-
- Returns:
Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.