
300 Patterns: Pervasive and Rich Device Access Solutions
SubmitOrder
The TicketingServlet uses the TicketingService to obtain data from the local
database for display by the appropriate JSP. The doRequest() method is shown
in Example 13-2, which nicely maps to the interaction diagram shown in
Figure 13-8 on page 294.
Example 13-2 TicketingServlet doRequest()
protected void doRequest(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String nextpage = "/index.jsp";
//get the browser's locale
Final Locale locale = Util.getLocale(request);
Messages.setLocale(locale);
//
// get the action selected by the user ...