Basic HTML version of Foils prepared May 19 99

Foil 10 Example Servlet (from MageLang)

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


1 This servlet returns a page to the web browser:
2 import java.io.*;
3 import javax.servlet.*;
4 public SampleServlet implements Servlet
5 { private ServletConfig config;
6 public void init (ServletConfig config) throws ServletException
7 { this.config = config; }
8 public void destroy ( ) { } // do nothing
9 public ServletConfig getServletConfig ( )
10 { return config; }
11 public String getServletInfo()
12 { return "A simple servlet"; }

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