Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.servlet
Class UIXServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--oracle.cabo.servlet.UIXServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
BajaServlet

public class UIXServlet
extends javax.servlet.http.HttpServlet

The base servlet engine. UIXServlet automates creating and destroying a PageBroker (based on a configuration parameter), creating a BajaContext for each request, and using the PageBrokerHandler to handle all requests. All the "brains", however, is in PageBrokerHandler, so there's no requirement that clients use this class as their servlet.

UIXServlet uses the following servlet configuration parameters:

See Also:
PageBrokerHandler, Serialized Form

Constructor Summary
UIXServlet()
          Creates the servlet.
 
Method Summary
protected  BajaContext createBajaContext(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Creates the BajaContext.
protected  PageBrokerHandler createPageBrokerHandler(BajaContext context)
          Creates the PageBrokerHandler that will be used to process the page.
 void destroy()
          Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
protected  void doGet(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Receives an HTTP GET request from the protected service method and handles the request.
 void doPost(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Receives an HTTP POST request from the protected service method and handles the request.
protected  long getLastModified(javax.servlet.http.HttpServletRequest httpRequest)
          Returns the time the HttpServletRequest object was last modified, in milliseconds since midnight January 1, 1970 GMT.
 PageBroker getPageBroker()
          Returns the PageBroker attached to the servlet.
 void init(javax.servlet.ServletConfig config)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, service, 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
 

Constructor Detail

UIXServlet

public UIXServlet()
Creates the servlet.
Method Detail

getPageBroker

public PageBroker getPageBroker()
Returns the PageBroker attached to the servlet.

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

This implementation stores the ServletConfig object it receives from the servlet container for alter use. When overriding this form of the method, call super.init(config).

Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - the ServletConfig object that contains configutation information for this servlet
Throws:
javax.servlet.ServletException - if an exception occurs that interrupts the servlet's normal operation

destroy

public void destroy()
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
Overrides:
destroy in class javax.servlet.GenericServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest httpRequest,
                   javax.servlet.http.HttpServletResponse httpResponse)
            throws java.io.IOException,
                   javax.servlet.ServletException
Receives an HTTP POST request from the protected service method and handles the request. The HTTP POST method allows the client to send data of unlimited length to the Web server once and is useful when posting information such as credit card numbers.
Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
httpRequest - an HttpServletRequest object that contains the request the client has made of the servlet
httpResponse - an HttpServletResponse object that contains the response the servlet sends to the object
Throws:
java.io.IOException - if an input or output error is detected when the servlet handles the request
javax.servlet.ServletException - if the request for the POST could not be handled

doGet

protected void doGet(javax.servlet.http.HttpServletRequest httpRequest,
                     javax.servlet.http.HttpServletResponse httpResponse)
              throws java.io.IOException,
                     javax.servlet.ServletException
Receives an HTTP GET request from the protected service method and handles the request. The GET method allows a client to read information from the Web server, passing a query string appended to an URL to tell the server what information to return.
Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
httpRequest - an HttpServletRequest object that contains the request the client has made of the servlet
httpResponse - an HttpServletResponse object that contains the response the servlet sends to the object
Throws:
java.io.IOException - if an input or output error is detected when the servlet handles the GET request
javax.servlet.ServletException - if the request for the GET could not be handled

getLastModified

protected long getLastModified(javax.servlet.http.HttpServletRequest httpRequest)
Returns the time the HttpServletRequest object was last modified, in milliseconds since midnight January 1, 1970 GMT. If the time is unknown, this method returns a negative number.

Servlet engines that support HTTP GET requests should override getLastModified to provide an accurate object modification time. This makes browser and proxy caches work more effectively, reducing the load on server and network resources.

Overrides:
getLastModified in class javax.servlet.http.HttpServlet
Parameters:
httpRequest - the HttpServletRequest object that is sent to the servlet
Returns:
a long integer specifying the time the HttpServletRequest object was last modified, in milliseconds since midnight, January 1, 1970 GMT, or -1 if the time is not known

createBajaContext

protected BajaContext createBajaContext(javax.servlet.http.HttpServletRequest httpRequest,
                                        javax.servlet.http.HttpServletResponse httpResponse)
Creates the BajaContext. Clients can subclass and override this method if they need a different context. The default implementation returns a BaseBajaContext.

See Also:
BaseBajaContext

createPageBrokerHandler

protected PageBrokerHandler createPageBrokerHandler(BajaContext context)
Creates the PageBrokerHandler that will be used to process the page.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.