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
- Direct Known Subclasses:
- AdminTreeMVCServlet, DialogMVCServlet, PageMVCServlet
public abstract class MVCServlet
- extends javax.servlet.http.HttpServlet
The servlet gets a MVCServletHandler
with the method
getHandler(HttpServletRequest, HttpServletResponse)
.
MVCServletHandler.getCommand()
is called and the returned command name is passed to the
MVCServletHandler.execute(String)
method wich returns the view name. Finally it calls
MVCServletHandler.renderHtml(String)
passing the view name.
Make a subclass to provide you own handler(s).
- Version:
- $Id: MVCServlet.java 41137 2011-01-06 18:19:25Z gjoseph $
- 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-2011 Magnolia International Ltd.. All Rights Reserved.