FileDocCategorySizeDatePackage
MultipleInc.javaAPI DocExample930Wed Mar 05 13:32:08 GMT 2003com.jspservletcookbook

MultipleInc

public class MultipleInc extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
protected 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>Multiple Includes</title>");  
        out.println("</head>");
        out.println("<body>");
        out.println("<h1>Hello from Level 1</h1>");
        out.println("This text is displayed at Level 1.");
        RequestDispatcher dispatcher = request.getRequestDispatcher("/level2");
        dispatcher.include(request, response);
        out.println("</body>");
        out.println("</html>");
        out.close();