Simple servlet: Copyright : Do Get Do Post « Servlets « Java






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&copy; 2003-2004 Java Source and Support.");
    out.close();

  }
}

           
         
  








Related examples in the same category

1.Print various CGI variables that have been requested by the servlet
2.Print all header information available from the client
3.Request header viewer
4.Request binder
5.Request display
6.Servlet Request Listener
7.Client auto refresh
8.Get Request Parameters in a Servlet