FileDocCategorySizeDatePackage
IncludeServlet.javaAPI DocExample995Tue Mar 04 06:15:48 GMT 2003com.jspservletcookbook

IncludeServlet

public class IncludeServlet extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        
        response.setContentType("text/html");
        java.io.PrintWriter out = response.getWriter();
        
        out.println("<html>");
        out.println("<head>");
        out.println("<title>Include Servlet</title>");  
        out.println("</head>");
        out.println("<body>");
        out.println("<h1>Welcome To Our Universe</h1>");
        out.println("Imagine the rest of the page here.<br><br>");
        //Include the copyright information
        RequestDispatcher dispatcher = request.getRequestDispatcher("/copyright");
        dispatcher.include(request, response);

        out.println("</body>");
        out.println("</html>");
      
        out.close();