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


public void service (ServletRequest req, ServletResponse res)
throws ServletException, IOException
{ res.setContentType ( "text/html" );
PrintWriter out = res.getWriter ( );
out.println ( "<html>");
out.println ( "<head>");
out.println ( "<title> A Sample Servlet </title>");
out.println ( "</head>");
out.println ( "<body>");
out.println ( "<h1> A Sample Servlet </h1>");
out.println ( "</body>");
out.println ( "</html>");
}
}



© 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