Public Member Functions | |
String | getServletInfo () |
Returns a short description of the servlet. | |
void | doGet (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException |
Responds to an HTTP GET request. |
Definition at line 16 of file ModelDemo.java.
String getServletInfo | ( | ) |
void doGet | ( | HttpServletRequest | request, | |
HttpServletResponse | response | |||
) | throws IOException, ServletException |
Responds to an HTTP GET request.
Definition at line 24 of file ModelDemo.java.
00024 { 00025 response.setContentType("text/html"); 00026 PrintWriter out = response.getWriter(); 00027 00028 try { 00029 out.println("<h1>Model demo</h1>"); 00030 out.println("<p>Just a call to <code>Data.makeExample().toString();</code>.</p>"); 00031 Data d = Data.makeExample(); 00032 out.println("<pre>" + d.toString() + "</pre>"); 00033 } catch (Exception e) { 00034 out.println("Exception: " + e.toString()); 00035 } 00036 00037 }