home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#)ProtectedServlet.java 1.8 97/05/22
- *
- * Copyright (c) 1996-1997 Sun Microsystems, Inc. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- * CopyrightVersion 1.0
- */
-
- import java.io.*;
-
- import javax.servlet.*;
- import javax.servlet.http.*;
-
- /**
- * This is an example of a simple Servlet
- */
- public class ProtectedServlet extends HttpServlet {
-
- public void doGet (HttpServletRequest req, HttpServletResponse res)
- throws ServletException, IOException
- {
- res.setContentType("text/html");
-
- ServletOutputStream out = res.getOutputStream();
- out.println("<HEAD><TITLE> ProtectedServlet Output </TITLE></HEAD><BODY>");
-
-
- out.println("<h1> ProtectedServlet Output </h1>");
- out.println("<P>This is output from ProtectedServlet.");
- out.println("</BODY>");
- out.close();
- }
-
- public String getServletInfo() {
- return "A simple servlet";
- }
-
- }
-