com.ibm.websphere.samples.technologysamples.ejb.stateless.basiccalculatorwar
Class BasicCalculatorServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.ibm.websphere.samples.technologysamples.ejb.stateless.basiccalculatorwar.BasicCalculatorServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class BasicCalculatorServlet
- extends javax.servlet.http.HttpServlet
Servlet that is used to process the incoming requests from the JSP, invoke an instance of the BasicCalculator EJB, and forward
the response back to the JSP.
- See Also:
- Serialized Form
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process incoming HTTP GET requests |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process incoming HTTP POST requests |
void |
performTask(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Main service method for BasicCalculatorServlet |
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, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicCalculatorServlet
public BasicCalculatorServlet()
doGet
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Process incoming HTTP GET requests
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
req
- Object that encapsulates the request to the servletres
- Object that encapsulates the response from the servlet
- Throws:
javax.servlet.ServletException
- This exception is thrown to indicate a servlet problem.
java.io.IOException
- Signals that an I/O exception of some sort has occurred.
doPost
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Process incoming HTTP POST requests
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
req
- Object that encapsulates the request to the servletres
- Object that encapsulates the response from the servlet
- Throws:
javax.servlet.ServletException
- This exception is thrown to indicate a servlet problem.
java.io.IOException
- Signals that an I/O exception of some sort has occurred.
performTask
public void performTask(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Main service method for BasicCalculatorServlet
- Parameters:
req
- Object that encapsulates the request to the servletres
- Object that encapsulates the response from the servlet
- Throws:
javax.servlet.ServletException
- This exception is thrown to indicate a servlet problem.
java.io.IOException
- Signals that an I/O exception of some sort has occurred.