Simple servlet: Copyright
/*
<servlet>
<servlet-name>Copyright</servlet-name>
<servlet-class>Copyright</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Copyright</servlet-name>
<url-pattern>/Copyright</url-pattern>
</servlet-mapping>
*/
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Copyright extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
java.io.IOException {
java.io.PrintWriter out = response.getWriter();
out.println("Copyright© 2003-2004 Java Source and Support.");
out.close();
}
}
Related examples in the same category