WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.xml.http
Class StockServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--examples.xml.http.StockServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class StockServlet
extends javax.servlet.http.HttpServlet

This example shows how to pass XML data between a Java client and a servlet over HTTP. This class receives stock trade instructions from StockClient in the form of XML data. This class obtains an instance of TraderBean and perfoms the stock trades. The results of the trade are then pass back to StockClient in the form of XML data.

Author:
Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Summary
StockServlet()
           
 
Method Summary
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles HTTP POST requests.
 
Methods inherited from class javax.servlet.http.HttpServlet
, doDelete, doGet, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockServlet

public StockServlet()
Method Detail

doPost

public final void doPost(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Handles HTTP POST requests.
Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
javax.servlet.ServletException - if there is a servlet problem
java.io.IOException - if there is an I/O problem

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.