public class MockServletConfig extends Object implements javax.servlet.ServletConfig
Mock implementation of ServletConfig.
| Constructor and Description |
|---|
MockServletConfig()
Construct a default instance.
|
MockServletConfig(javax.servlet.ServletContext context)
Construct an instance associated with the specified
servlet context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInitParameter(String name,
String value)
Add a servlet initialization parameter.
|
String |
getInitParameter(String name) |
Enumeration |
getInitParameterNames() |
javax.servlet.ServletContext |
getServletContext() |
String |
getServletName() |
void |
setServletContext(javax.servlet.ServletContext context)
Set the servlet context for this application.
|
public MockServletConfig()
Construct a default instance.
public MockServletConfig(javax.servlet.ServletContext context)
Construct an instance associated with the specified servlet context.
context - The associated ServletContextpublic void addInitParameter(String name, String value)
Add a servlet initialization parameter.
name - Parameter namevalue - Parameter valuepublic void setServletContext(javax.servlet.ServletContext context)
Set the servlet context for this application.
context - The new servlet contextpublic String getInitParameter(String name)
getInitParameter in interface javax.servlet.ServletConfigpublic Enumeration getInitParameterNames()
getInitParameterNames in interface javax.servlet.ServletConfigpublic javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.ServletConfigpublic String getServletName()
getServletName in interface javax.servlet.ServletConfigCopyright © 2017 The Apache Software Foundation. All rights reserved.