1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import java.security.Principal ; 22 import javax.servlet.*; 23 import javax.servlet.http.*; 24 25 31 32 public class Include01 extends HttpServlet { 33 34 public void doGet(HttpServletRequest request, HttpServletResponse response) 35 throws IOException, ServletException { 36 37 response.setContentType("text/plain"); 38 RequestDispatcher rd = 39 getServletContext().getRequestDispatcher("/Include01.txt"); 40 if (rd == null) { 41 PrintWriter writer = response.getWriter(); 42 writer.println("Include01 FAILED - No RequestDispatcher returned"); 43 return; 44 } 45 rd.include(request, response); 46 StaticLogger.reset(); 47 48 } 49 50 } 51 | Popular Tags |