oracle.clex.util.http
Class ProxyServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--oracle.clex.util.http.ProxyServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
SSOProxyServlet

public class ProxyServlet
extends javax.servlet.http.HttpServlet

Use this class for each proxy servlet needed. Specify the backend or target servlet in the servlet's init parameters (see below). class. Session is maintained and POSTS and GETS are both supported. All HTTP commands should work transparantly.

usage:

  In web.xml:

	 <servlet>
	  <servlet-name>proxy</servlet-name>
	  <servlet-class>oracle.clex.util.http.ProxyServlet</servlet-class>
        <init-param>
          <param-name>target</param-name>
          <param-value>http://localhost:8888/servlet/snoop</param-value>
        </init-param>
  </servlet>
  

See Also:
Serialized Form

Field Summary
protected static java.lang.String TARGET_INIT_PARAM
          Value for the servlet init parameter name: target
 
Constructor Summary
ProxyServlet()
           
 
Method Summary
 void debug(java.lang.String text)
          a simple way to print some debug messages out
 java.lang.String getTarget()
           
 void init(javax.servlet.ServletConfig sc)
          Picks up the Http target from the servlet's init parameters
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void setTarget(java.lang.String aStringURL)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

TARGET_INIT_PARAM

protected static final java.lang.String TARGET_INIT_PARAM
Value for the servlet init parameter name: target
Constructor Detail

ProxyServlet

public ProxyServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig sc)
          throws javax.servlet.ServletException
Picks up the Http target from the servlet's init parameters
Overrides:
init in class javax.servlet.GenericServlet

getTarget

public java.lang.String getTarget()

setTarget

protected void setTarget(java.lang.String aStringURL)

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Overrides:
service in class javax.servlet.http.HttpServlet

debug

public void debug(java.lang.String text)
a simple way to print some debug messages out


Copyright © 2003 ORACLE Corp. All Rights Reserved.