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

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

public class PingJDBCWrite
extends 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(HttpServletRequest req, HttpServletResponse res)
          this is the main method of the servlet that will service all get requests.
 void doPost(HttpServletRequest req, HttpServletResponse res)
          forwards post requests to the doGet method Creation date: (11/6/2000 10:52:39 AM)
 String getServletInfo()
          returns a string of information about the servlet
 void init(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(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException
this is the main method of the servlet that will service all get requests.

Overrides:
doGet in class HttpServlet
Parameters:
request - HttpServletRequest
responce - HttpServletResponce
Throws:
ServletException
IOException

getServletInfo

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

Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in class GenericServlet
Returns:
info String: contains info about the servlet

init

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

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
config - ServletConfig:
Throws:
ServletException

doPost

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

Overrides:
doPost in class HttpServlet
Parameters:
res - javax.servlet.http.HttpServletRequest
res2 - javax.servlet.http.HttpServletResponse
Throws:
ServletException
IOException


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