public class MockServletContext
extends java.lang.Object
implements javax.servlet.ServletContext
Constructor and Description |
---|
MockServletContext(java.lang.String realPath) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String arg0) |
java.util.Enumeration |
getAttributeNames() |
javax.servlet.ServletContext |
getContext(java.lang.String arg0) |
java.lang.String |
getContextPath() |
java.lang.String |
getInitParameter(java.lang.String arg0) |
java.util.Enumeration |
getInitParameterNames() |
int |
getMajorVersion() |
java.lang.String |
getMimeType(java.lang.String arg0) |
int |
getMinorVersion() |
javax.servlet.RequestDispatcher |
getNamedDispatcher(java.lang.String arg0) |
java.lang.String |
getRealPath(java.lang.String arg0) |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String arg0) |
java.net.URL |
getResource(java.lang.String arg0) |
java.io.InputStream |
getResourceAsStream(java.lang.String arg0) |
java.util.Set |
getResourcePaths(java.lang.String arg0) |
java.lang.String |
getServerInfo() |
javax.servlet.Servlet |
getServlet(java.lang.String arg0) |
java.lang.String |
getServletContextName() |
java.util.Enumeration |
getServletNames() |
java.util.Enumeration |
getServlets() |
void |
log(java.lang.Exception arg0,
java.lang.String arg1) |
void |
log(java.lang.String arg0) |
void |
log(java.lang.String arg0,
java.lang.Throwable arg1) |
void |
removeAttribute(java.lang.String arg0) |
void |
setAttribute(java.lang.String arg0,
java.lang.Object arg1) |
public java.lang.String getServletContextName()
getServletContextName
in interface javax.servlet.ServletContext
public java.lang.String getServerInfo()
getServerInfo
in interface javax.servlet.ServletContext
public java.lang.String getRealPath(java.lang.String arg0)
getRealPath
in interface javax.servlet.ServletContext
public java.net.URL getResource(java.lang.String arg0) throws java.net.MalformedURLException
getResource
in interface javax.servlet.ServletContext
java.net.MalformedURLException
public java.lang.Object getAttribute(java.lang.String arg0)
getAttribute
in interface javax.servlet.ServletContext
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletContext
public void setAttribute(java.lang.String arg0, java.lang.Object arg1)
setAttribute
in interface javax.servlet.ServletContext
public void removeAttribute(java.lang.String arg0)
removeAttribute
in interface javax.servlet.ServletContext
public java.lang.String getInitParameter(java.lang.String arg0)
getInitParameter
in interface javax.servlet.ServletContext
public java.util.Enumeration getInitParameterNames()
getInitParameterNames
in interface javax.servlet.ServletContext
public void log(java.lang.String arg0)
log
in interface javax.servlet.ServletContext
public void log(java.lang.String arg0, java.lang.Throwable arg1)
log
in interface javax.servlet.ServletContext
public void log(java.lang.Exception arg0, java.lang.String arg1)
log
in interface javax.servlet.ServletContext
public int getMajorVersion()
getMajorVersion
in interface javax.servlet.ServletContext
public int getMinorVersion()
getMinorVersion
in interface javax.servlet.ServletContext
public javax.servlet.ServletContext getContext(java.lang.String arg0)
getContext
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String arg0)
getRequestDispatcher
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String arg0)
getNamedDispatcher
in interface javax.servlet.ServletContext
public java.lang.String getMimeType(java.lang.String arg0)
getMimeType
in interface javax.servlet.ServletContext
public java.util.Set getResourcePaths(java.lang.String arg0)
getResourcePaths
in interface javax.servlet.ServletContext
public java.io.InputStream getResourceAsStream(java.lang.String arg0)
getResourceAsStream
in interface javax.servlet.ServletContext
public javax.servlet.Servlet getServlet(java.lang.String arg0) throws javax.servlet.ServletException
getServlet
in interface javax.servlet.ServletContext
javax.servlet.ServletException
public java.util.Enumeration getServlets()
getServlets
in interface javax.servlet.ServletContext
public java.util.Enumeration getServletNames()
getServletNames
in interface javax.servlet.ServletContext
public java.lang.String getContextPath()
getContextPath
in interface javax.servlet.ServletContext
Copyright © 2001-2010 Jalios SA. All Rights Reserved.