com.ibm.websphere.servlet.filter

Class ChainerServlet

  1. java.lang.Object
  2. extended byjavax.servlet.GenericServlet
  3. extended byjavax.servlet.http.HttpServlet
  4. extended bycom.ibm.websphere.servlet.filter.ChainerServlet
All implemented interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Deprecated. Application developers requiring this functionality should implement this using javax.servlet.filter classes.
  1. public class ChainerServlet
  2. extends javax.servlet.http.HttpServlet
Servlet that chains the responses of servlets together. This servlet requires an init parameter 'chained.path.list' that contains a space delimited list of servlet paths that should be chained together. A servlet chain acts as a response pipe that allows servlets to filter the output of the previous servlet in the chain. When a servlet writes header or output stream data to the response, this data is fed into a chained request object that will be passed to the next servlet in the chain. The next servlet can examine the contents of the chained request to see the response that was generated by the previous servlet. The data written by the last servlet in the chain will be sent back to the client. To setup a servlet chain, an instance of this servlet must be registered as the target servlet in the engine. When this servlet is invoked, the response will be generated by chaining the response of each servlet in the chainer.pathlist parameter. The response of the final servlet in the chain will be written to the client (Deprecated since WebSphere 6.0).

Example usage: Setup a servlet chain at the URI /servlet/upperCaseSnoop for /servlet/snoop-->/servlet/upperCaseFilter. The result of this chain should force the output of snoop to become capitalized.

Required init parameters

See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
PARAM_SERVLET_PATHS
Deprecated. chainer.pathlist: the name of the parameter that specifies the chained servlet path list.

Constructor Summary

Constructor and Description
ChainerServlet()
Deprecated.

Method Summary

Modifier and Type Method and Description
  1. void
destroy()
Deprecated.
  1. void
init()
Deprecated. Initialize the servlet chainer.
  1. void
service(javax.servlet.http.HttpServletRequest request,javax.servlet.http.HttpServletResponse response)
Deprecated. Handle a servlet request by chaining the configured list of servlets.
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PARAM_SERVLET_PATHS

  1. public static final java.lang.String PARAM_SERVLET_PATHS
Deprecated.
chainer.pathlist: the name of the parameter that specifies the chained servlet path list.
See Also:

Constructor Detail

ChainerServlet

  1. public ChainerServlet()
Deprecated.

Method Detail

init

  1. public void init()
  2. throws javax.servlet.ServletException
Deprecated.
Initialize the servlet chainer.
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

service

  1. public void service(javax.servlet.http.HttpServletRequest request,
  2. javax.servlet.http.HttpServletResponse response)
  3. throws javax.servlet.ServletException
  4. java.io.IOException
Deprecated.
Handle a servlet request by chaining the configured list of servlets. Only the final response in the chain will be sent back to the client. This servlet does not actual generate any content. This servlet only constructs and processes the servlet chain.
Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

destroy

  1. public void destroy()
Deprecated.
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet