Interface IBMServletContext
- All Superinterfaces:
ExtendedServletContext
,jakarta.servlet.ServletContext
- Since:
- WAS5.0
-
Field Summary
Fields inherited from interface jakarta.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDynamicServlet
(String servletName, String servletClass, String mappingURI, Properties initParameters) Deprecated.void
addHttpSessionListener
(jakarta.servlet.http.HttpSessionListener listener) Deprecated.void
fireSessionAttributeAdded
(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute added eventvoid
fireSessionAttributeRemoved
(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute removed eventvoid
fireSessionAttributeReplaced
(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute replaced eventvoid
fireSessionCreated
(jakarta.servlet.http.HttpSessionEvent event) To drive HttpSession created eventvoid
fireSessionDestroyed
(jakarta.servlet.http.HttpSessionEvent event) To drive HttpSession invalidated eventTo get the context root associated with this web module Returns the context root for this contextint
To get at session timeout used by web moduleboolean
To check if timeout is set in deployment descriptor of the web module(web.xml) or notvoid
loadServlet
(String servletName) Deprecated.void
removeDynamicServlet
(String servletName) Deprecated.void
sendError
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ServletErrorReport e) Sends an error response back to the client.Methods inherited from interface com.ibm.websphere.servlet.context.ExtendedServletContext
addMappingFilter, getAsyncRequestDispatcher, getDynamicServletRegistrations, getFilterConfig
Methods inherited from interface jakarta.servlet.ServletContext
addFilter, addFilter, addFilter, addListener, addListener, addListener, addServlet, addServlet, addServlet, createFilter, createListener, createServlet, declareRoles, getAttribute, getAttributeNames, getClassLoader, getContext, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, log, log, log, removeAttribute, setAttribute, setInitParameter, setSessionTrackingModes
-
Method Details
-
fireSessionCreated
void fireSessionCreated(jakarta.servlet.http.HttpSessionEvent event) To drive HttpSession created event- Parameters:
event
- object on which event is to be triggered.- Since:
- WAS 5.0
-
fireSessionDestroyed
void fireSessionDestroyed(jakarta.servlet.http.HttpSessionEvent event) To drive HttpSession invalidated event- Parameters:
event
- object on which event is to be triggered.- Since:
- WAS 5.0
-
fireSessionAttributeAdded
void fireSessionAttributeAdded(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute added event- Parameters:
event
- object on which event is to be triggered.- Since:
- WAS 5.0
-
fireSessionAttributeReplaced
void fireSessionAttributeReplaced(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute replaced event- Parameters:
event
- object on which event is to be triggered- Since:
- WAS 5.0
-
fireSessionAttributeRemoved
void fireSessionAttributeRemoved(jakarta.servlet.http.HttpSessionBindingEvent event) To drive attribute removed event- Parameters:
event
- object on which event is to be triggered- Since:
- WAS 5.0
-
isSessionTimeoutSet
boolean isSessionTimeoutSet()To check if timeout is set in deployment descriptor of the web module(web.xml) or not- Returns:
- true if session timeout is set false if session timeout is set to zero or not set.
- Since:
- WAS 5.0
-
getSessionTimeout
int getSessionTimeout()To get at session timeout used by web module- Returns:
- returns session timeout of the web module.
- Since:
- WAS 5.0
-
getContextPath
String getContextPath()To get the context root associated with this web module Returns the context root for this context- Specified by:
getContextPath
in interfacejakarta.servlet.ServletContext
- Returns:
- Since:
- WAS 6.1
-
addDynamicServlet
void addDynamicServlet(String servletName, String servletClass, String mappingURI, Properties initParameters) throws jakarta.servlet.ServletException, SecurityException Deprecated.To add servlet instance dynamically into a web module. If a security manager exists, accessing this method requires com.ibm.websphere.security.WebSphereRuntimePermission with target name "accessServletContext".- Parameters:
servletName
- Name of the Servlet that is being added servletClass Class name of the servlet mappingURI URI for the servlet initParameters init parameters of the servlet- Throws:
SecurityException
- if a security manager exists and it doesn't allow the current operation . ServletException if a servlet with same name already existsjakarta.servlet.ServletException
- Since:
- WAS 5.01
-
removeDynamicServlet
Deprecated.To remove servlet instance dynamically from a web module. If a security manager exists, accessing this method requires com.ibm.websphere.security.WebSphereRuntimePermission with target name "accessServletContext".- Parameters:
servletName
- Name of the Servlet that is to be removed- Throws:
SecurityException
- if a security manager exists and it doesn't allow the current operation .- Since:
- WAS 5.01
-
addHttpSessionListener
void addHttpSessionListener(jakarta.servlet.http.HttpSessionListener listener) throws SecurityException Deprecated.To add session listener dynamically into a web module. If a security manager exists, accessing this method requires com.ibm.websphere.security.WebSphereRuntimePermission with target name "accessServletContext".- Parameters:
listener
- Instance of HttpSessionListener- Throws:
SecurityException
- if a security manager exists and it doesn't allow the current operation .- Since:
- WAS 5.01
-
loadServlet
Deprecated.To load a servlet instance. If servlet is already loaded, this method simply returns. If a security manager exists, accessing this method requires com.ibm.websphere.security.WebSphereRuntimePermission with target name "accessServletContext".- Parameters:
servletName
- Name of the Servlet that is to be loaded- Throws:
SecurityException
- if a security manager exists and it doesn't allow the current operation . ServletException if a servlet with same name already existsjakarta.servlet.ServletException
- Since:
- WAS 5.01
-
sendError
void sendError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ServletErrorReport e) Sends an error response back to the client. This method will inspect the information in the servlet error report specified, and invoke any error pages that have been defined by this application.- Parameters:
request
-response
-e
-
-