org.apache.geronimo.samples.daytrader.web.prims
Class PingJDBCWrite

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.apache.geronimo.samples.daytrader.web.prims.PingJDBCWrite
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class PingJDBCWrite
extends javax.servlet.http.HttpServlet

PingJDBCReadPrepStmt uses a prepared statement for database update. Statement parameters are set dynamically on each request. This primative uses TradeDirect to set the price of a random stock (generated by org.apache.geronimo.samples.daytrader.Trade_Config) through the use of prepared statements.

See Also:
Serialized Form

Constructor Summary
PingJDBCWrite()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          this is the main method of the servlet that will service all get requests.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          forwards post requests to the doGet method Creation date: (11/6/2000 10:52:39 AM)
 java.lang.String getServletInfo()
          returns a string of information about the servlet
 void init(javax.servlet.ServletConfig config)
          called when the class is loaded to initialize the servlet
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingJDBCWrite

public PingJDBCWrite()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
this is the main method of the servlet that will service all get requests.

Throws:
javax.servlet.ServletException
java.io.IOException

getServletInfo

public java.lang.String getServletInfo()
returns a string of information about the servlet

Returns:
info String: contains info about the servlet

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
called when the class is loaded to initialize the servlet

Parameters:
config - ServletConfig:
Throws:
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
forwards post requests to the doGet method Creation date: (11/6/2000 10:52:39 AM)

Parameters:
res - javax.servlet.http.HttpServletRequest
Throws:
javax.servlet.ServletException
java.io.IOException


Copyright © 2005-2006 Apache Software Foundation. All Rights Reserved.