org.apache.felix.webconsole
Class AbstractWebConsolePlugin
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.felix.webconsole.AbstractWebConsolePlugin
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- BaseWebConsolePlugin, LicenseServlet, RenderBridge, ShellServlet
public abstract class AbstractWebConsolePlugin
- extends HttpServlet
- See Also:
- Serialized Form
Field Summary |
static String |
ATTR_FILEUPLOAD
The name of the request attribute containig the map of FileItems from the POST request |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTR_FILEUPLOAD
public static final String ATTR_FILEUPLOAD
- The name of the request attribute containig the map of FileItems from the POST request
- See Also:
- Constant Field Values
AbstractWebConsolePlugin
public AbstractWebConsolePlugin()
getServletName
public String getServletName()
- Returns the title for this plugin as returned by
getTitle()
- Specified by:
getServletName
in interface ServletConfig
- Overrides:
getServletName
in class GenericServlet
doGet
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Renders the web console page for the request. This consist of the following
four parts called in order:
startResponse(HttpServletRequest, HttpServletResponse)
renderTopNavigation(HttpServletRequest, PrintWriter)
renderContent(HttpServletRequest, HttpServletResponse)
endResponse(PrintWriter)
- Overrides:
doGet
in class HttpServlet
- Throws:
ServletException
IOException
activate
public void activate(BundleContext bundleContext)
deactivate
public void deactivate()
getTitle
public abstract String getTitle()
getLabel
public abstract String getLabel()
renderContent
protected abstract void renderContent(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
- Throws:
ServletException
IOException
getBundleContext
protected BundleContext getBundleContext()
startResponse
protected PrintWriter startResponse(HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Throws:
IOException
renderTopNavigation
protected void renderTopNavigation(HttpServletRequest request,
PrintWriter pw)
endResponse
protected void endResponse(PrintWriter pw)
getParameter
public static String getParameter(HttpServletRequest request,
String name)
sendRedirect
protected void sendRedirect(HttpServletRequest request,
HttpServletResponse response,
String redirectUrl)
throws IOException
- Utility method to handle relative redirects.
Some app servers like web sphere handle relative redirects differently
therefore we should make an absolute url before invoking send redirect.
- Throws:
IOException
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.