coreservlets
Class Travel
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--coreservlets.Travel
- public class Travel
- extends HttpServlet
Top-level travel-processing servlet. This servlet sets up
the customer data as a bean, then forwards the request
to the airline booking page, the rental car reservation
page, the hotel page, the existing account modification
page, or the new account page.
Taken from Core Servlets and JavaServer Pages
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
© 2000 Marty Hall; may be freely used or adapted.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Travel
public Travel()
init
public void init()
- Overrides:
- init in class GenericServlet
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Since password is being sent, use POST only. However,
the use of POST means that you cannot forward
the request to a static HTML page, since the forwarded
request uses the same request method as the original
one, and static pages cannot handle POST. Solution:
have the "static" page be a JSP file that contains
HTML only. That's what accounts.jsp is. The other
JSP files really need to be dynamically generated,
since they make use of the customer data.
- Overrides:
- doPost in class HttpServlet
 |
|---|
| CSAJSP @ amazon.com |
|---|