org.springframework.mock.web
Class MockServletConfig
java.lang.Object
org.springframework.mock.web.MockServletConfig
- All Implemented Interfaces:
- ServletConfig
public class MockServletConfig
- extends Object
- implements ServletConfig
Mock implementation of the ServletConfig interface.
Used for testing the web framework; typically not
necessary for testing application controllers.
- Since:
- 1.0.2
- Author:
- Rod Johnson, Juergen Hoeller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockServletConfig
public MockServletConfig(ServletContext servletContext)
- Create new MockServletConfig with empty String as name.
- Parameters:
servletContext
- the ServletContext that the servlet runs in
MockServletConfig
public MockServletConfig(ServletContext servletContext,
String servletName)
- Create new MockServletConfig.
- Parameters:
servletContext
- the ServletContext that the servlet runs inservletName
- the name of the servlet
getServletName
public String getServletName()
- Specified by:
getServletName
in interface ServletConfig
getServletContext
public ServletContext getServletContext()
- Specified by:
getServletContext
in interface ServletConfig
addInitParameter
public void addInitParameter(String name,
String value)
getInitParameter
public String getInitParameter(String name)
- Specified by:
getInitParameter
in interface ServletConfig
getInitParameterNames
public Enumeration getInitParameterNames()
- Specified by:
getInitParameterNames
in interface ServletConfig
Copyright © 2002-2006 The Spring Framework.