com.mkdoc.servlet
Class AbstractMKDocServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.mkdoc.servlet.AbstractMKDocServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
AbstractStoreQueryServlet

public abstract class AbstractMKDocServlet
extends javax.servlet.http.HttpServlet

An abstract implementation of servlet utilities.

Version:
0.4 2005-07-26
Author:
Philip Shaw
See Also:
Serialized Form

Constructor Summary
protected AbstractMKDocServlet()
          Protected default constructor.
 
Method Summary
static java.lang.String filter(java.lang.String input)
          Filter a string for potentially malicious markup.
static ApplicationContext getApplicationContext(javax.servlet.ServletContext context)
          Get an application context for a servlet.
static java.lang.String getFirstParam(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Get the first parameter by a given name.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, 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
 

Constructor Detail

AbstractMKDocServlet

protected AbstractMKDocServlet()
Protected default constructor.

Since:
Version 0.1 2005-01-20
Method Detail

getFirstParam

public static final java.lang.String getFirstParam(javax.servlet.http.HttpServletRequest request,
                                                   java.lang.String name)
Get the first parameter by a given name.

Parameters:
request - The HTTP servlet request.
name - The name of the parameter value to get.
Returns:
The value of the first named parameter in the request or null if the parameter does not exist or is blank.
Since:
Version 0.1 2005-01-20

filter

public static final java.lang.String filter(java.lang.String input)
Filter a string for potentially malicious markup.

Parameters:
input - A servlet parameter to filter.
Returns:
The input string with potentially malicious markup converted to HTML entities.
Since:
Version 0.2 2005-05-18

getApplicationContext

public static final ApplicationContext getApplicationContext(javax.servlet.ServletContext context)
Get an application context for a servlet.

Parameters:
context - The servlet context for an application.
Returns:
A new application context.
Since:
Version 0.3 2005-07-19