1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import javax.servlet.*; 22 import javax.servlet.http.*; 23 24 30 31 public class Forward07a extends HttpServlet { 32 33 public void doGet(HttpServletRequest request, HttpServletResponse response) 34 throws IOException, ServletException { 35 36 response.setContentType("text/plain"); 38 PrintWriter writer = response.getWriter(); 39 40 RequestDispatcher rd = 42 getServletContext().getRequestDispatcher("/Forward07b"); 43 if (rd == null) { 44 writer.println("Forward07a FAILED - No request dispatcher" + 45 " for /Forward07b"); 46 } else { 47 rd.forward(request, response); 48 writer.println("Forward07a text should NOT be present"); 49 } 50 51 } 52 53 } 54 | Popular Tags |