|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.xenonsoft.bridgetown.test.servlets.CalcServlet
Calculation Service servlet
| Field Summary | |
static java.lang.String |
FIRST_NUMBER_ATTR
First number JSP scope attribute name |
static java.lang.String |
INPUT_VIEW
The input view (hard coded for this demonstration, use a web MVC framework like Jakarta Struts) |
static java.lang.String |
OPERATOR_ATTR
Operator JSP scope attribute name |
static java.lang.String |
OUTPUT_VIEW
The output view (hard coded for this demonstration, use a web MVC framework like Jakarta Struts) |
static java.lang.String |
RESULT_ATTR
Result request JSP scope attribute name |
static java.lang.String |
SECOND_NUMBER_ATTR
Second number JSP scope attribute name |
static java.math.BigDecimal |
ZERO
Short cut for a global BigDecimal 0.0 object |
| Constructor Summary | |
CalcServlet()
Default constructor |
|
| Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implements / overrides doGet, executes the user's calculation using the calculation service bean. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implements / overrides doPost, simply calls the method doGet()
and returns. |
void |
init()
Initialises the servlets Implements / overrides init |
| 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 |
public static final java.lang.String INPUT_VIEW
public static final java.lang.String OUTPUT_VIEW
public static final java.lang.String FIRST_NUMBER_ATTR
public static final java.lang.String SECOND_NUMBER_ATTR
public static final java.lang.String OPERATOR_ATTR
public static final java.lang.String RESULT_ATTR
public static final java.math.BigDecimal ZERO
| Constructor Detail |
public CalcServlet()
| Method Detail |
public void init()
GenericServlet.init()
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
ICalcService service bean
in order to run the user's requested calculation. By the
time the service bean is asked for the dependency have
already been injected by the IoC framework.
request - response -
java.io.IOException
javax.servlet.ServletExceptionHttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doGet()
and returns.
request - response -
java.io.IOException
javax.servlet.ServletExceptionHttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse),
doGet(HttpServletRequest, HttpServletResponse)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||