public class TestServletContext extends Object implements javax.servlet.ServletContext
Constructor and Description |
---|
TestServletContext() |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String key) |
Enumeration |
getAttributeNames() |
javax.servlet.ServletContext |
getContext(String arg0) |
String |
getContextPath() |
String |
getInitParameter(String arg0) |
Enumeration |
getInitParameterNames() |
int |
getMajorVersion() |
String |
getMimeType(String arg0) |
int |
getMinorVersion() |
javax.servlet.RequestDispatcher |
getNamedDispatcher(String arg0) |
String |
getRealPath(String path) |
javax.servlet.RequestDispatcher |
getRequestDispatcher(String arg0) |
URL |
getResource(String arg0) |
InputStream |
getResourceAsStream(String arg0) |
Set |
getResourcePaths(String arg0) |
String |
getServerInfo() |
javax.servlet.Servlet |
getServlet(String arg0) |
String |
getServletContextName() |
Enumeration |
getServletNames() |
Enumeration |
getServlets() |
void |
log(Exception e,
String log) |
void |
log(String log) |
void |
log(String log,
Throwable t) |
void |
removeAttribute(String key) |
void |
setAttribute(String key,
Object value) |
public Object getAttribute(String key)
getAttribute
in interface javax.servlet.ServletContext
public Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletContext
public javax.servlet.ServletContext getContext(String arg0)
getContext
in interface javax.servlet.ServletContext
public String getContextPath()
getContextPath
in interface javax.servlet.ServletContext
public String getInitParameter(String arg0)
getInitParameter
in interface javax.servlet.ServletContext
public Enumeration getInitParameterNames()
getInitParameterNames
in interface javax.servlet.ServletContext
public int getMajorVersion()
getMajorVersion
in interface javax.servlet.ServletContext
public String getMimeType(String arg0)
getMimeType
in interface javax.servlet.ServletContext
public int getMinorVersion()
getMinorVersion
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getNamedDispatcher(String arg0)
getNamedDispatcher
in interface javax.servlet.ServletContext
public String getRealPath(String path)
getRealPath
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getRequestDispatcher(String arg0)
getRequestDispatcher
in interface javax.servlet.ServletContext
public URL getResource(String arg0) throws MalformedURLException
getResource
in interface javax.servlet.ServletContext
MalformedURLException
public InputStream getResourceAsStream(String arg0)
getResourceAsStream
in interface javax.servlet.ServletContext
public Set getResourcePaths(String arg0)
getResourcePaths
in interface javax.servlet.ServletContext
public String getServerInfo()
getServerInfo
in interface javax.servlet.ServletContext
public javax.servlet.Servlet getServlet(String arg0) throws javax.servlet.ServletException
getServlet
in interface javax.servlet.ServletContext
javax.servlet.ServletException
public String getServletContextName()
getServletContextName
in interface javax.servlet.ServletContext
public Enumeration getServletNames()
getServletNames
in interface javax.servlet.ServletContext
public Enumeration getServlets()
getServlets
in interface javax.servlet.ServletContext
public void log(String log)
log
in interface javax.servlet.ServletContext
public void log(Exception e, String log)
log
in interface javax.servlet.ServletContext
public void log(String log, Throwable t)
log
in interface javax.servlet.ServletContext
public void removeAttribute(String key)
removeAttribute
in interface javax.servlet.ServletContext
Copyright © 2012-2018. All Rights Reserved.