com.mockrunner.mock.web
Class MockActionServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.struts.action.ActionServlet
              extended by com.mockrunner.mock.web.MockActionServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class MockActionServlet
extends org.apache.struts.action.ActionServlet

This mock version of the Struts ActionServlet is necessary, because some Struts methods use it to get the ServletContext and other things.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.action.ActionServlet
chainConfig, configDigester, convertNull, internal, internalName, log, registrations, servletMapping, servletName
 
Constructor Summary
MockActionServlet()
           
 
Method Summary
 javax.servlet.ServletConfig getServletConfig()
          Returns the ServletConfig.
 javax.servlet.ServletContext getServletContext()
          Returns the ServletContext.
 void setServletConfig(javax.servlet.ServletConfig config)
          Set the ServletConfig.
 void setServletContext(javax.servlet.ServletContext context)
          Set the ServletContext.
 
Methods inherited from class org.apache.struts.action.ActionServlet
addServletMapping, destroy, destroyConfigDigester, destroyInternal, destroyModules, doGet, doPost, getInternal, getModuleConfig, getRequestProcessor, init, initChain, initConfigDigester, initInternal, initModuleActions, initModuleConfig, initModuleConfigFactory, initModuleExceptionConfigs, initModuleFormBeans, initModuleForwards, initModuleMessageResources, initModulePlugIns, initModulePrefixes, initOther, initServlet, parseModuleConfigFile, parseModuleConfigFile, process, processActionConfigClass, processActionConfigExtension, processExceptionConfigClass, processExceptionExtension, processFormBeanConfigClass, processFormBeanExtension, processForwardConfigClass, processForwardExtension, splitAndResolvePaths
 
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, 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

MockActionServlet

public MockActionServlet()
Method Detail

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Returns the ServletConfig.

Specified by:
getServletConfig in interface javax.servlet.Servlet
Overrides:
getServletConfig in class javax.servlet.GenericServlet
Returns:
the ServletConfig

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns the ServletContext.

Specified by:
getServletContext in interface javax.servlet.ServletConfig
Overrides:
getServletContext in class javax.servlet.GenericServlet
Returns:
the ServletContext

setServletConfig

public void setServletConfig(javax.servlet.ServletConfig config)
Set the ServletConfig.

Parameters:
config - the ServletConfig

setServletContext

public void setServletContext(javax.servlet.ServletContext context)
Set the ServletContext.

Parameters:
context - the ServletContext