com.ibm.websphere.samples.plantsbywebspherewar
Class ShoppingServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.ibm.websphere.samples.plantsbywebspherewar.ShoppingServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ShoppingServlet
extends javax.servlet.http.HttpServlet

Servlet to handle shopping needs.

See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_ADDTOCART
           
static java.lang.String ACTION_COMPLETECHECKOUT
           
static java.lang.String ACTION_GOTOCART
           
static java.lang.String ACTION_INITCHECKOUT
           
static java.lang.String ACTION_ORDERINFODONE
           
static java.lang.String ACTION_PRODUCTDETAIL
           
static java.lang.String ACTION_SHOPPING
           
static java.lang.String ACTION_UPDATEQUANTITY
           
 
Constructor Summary
ShoppingServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process incoming HTTP GET requests
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process incoming HTTP POST requests
 void init(javax.servlet.ServletConfig config)
           
 void performTask(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Main service method for ShoppingServlet
 
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, 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

ACTION_ADDTOCART

public static final java.lang.String ACTION_ADDTOCART
See Also:
Constant Field Values

ACTION_COMPLETECHECKOUT

public static final java.lang.String ACTION_COMPLETECHECKOUT
See Also:
Constant Field Values

ACTION_GOTOCART

public static final java.lang.String ACTION_GOTOCART
See Also:
Constant Field Values

ACTION_INITCHECKOUT

public static final java.lang.String ACTION_INITCHECKOUT
See Also:
Constant Field Values

ACTION_ORDERINFODONE

public static final java.lang.String ACTION_ORDERINFODONE
See Also:
Constant Field Values

ACTION_PRODUCTDETAIL

public static final java.lang.String ACTION_PRODUCTDETAIL
See Also:
Constant Field Values

ACTION_SHOPPING

public static final java.lang.String ACTION_SHOPPING
See Also:
Constant Field Values

ACTION_UPDATEQUANTITY

public static final java.lang.String ACTION_UPDATEQUANTITY
See Also:
Constant Field Values
Constructor Detail

ShoppingServlet

public ShoppingServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Process incoming HTTP GET requests

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - Object that encapsulates the request to the servlet
response - Object that encapsulates the response from the servlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Process incoming HTTP POST requests

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - Object that encapsulates the request to the servlet
response - Object that encapsulates the response from the servlet
Throws:
javax.servlet.ServletException
java.io.IOException

performTask

public void performTask(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse resp)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Main service method for ShoppingServlet

Parameters:
req - Object that encapsulates the request to the servlet
resp - Object that encapsulates the response from the servlet
Throws:
javax.servlet.ServletException
java.io.IOException