Basic HTML version of Foils prepared May 19 99

Foil 11 Service method of the Example

From Overview of JDBC: Java Database Connectivity Java Servlets -- Spring Semester 1999. by Nancy McCracken


1 public void service (ServletRequest req, ServletResponse res)
2 throws ServletException, IOException
3 { res.setContentType ( "text/html" );
4 PrintWriter out = res.getWriter ( );
5 out.println ( "<html>");
6 out.println ( "<head>");
7 out.println ( "<title> A Sample Servlet </title>");
8 out.println ( "</head>");
9 out.println ( "<body>");
10 out.println ( "<h1> A Sample Servlet </h1>");
11 out.println ( "</body>");
12 out.println ( "</html>");
13 }
14 }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999