1 12 package org.eclipse.equinox.http.servlet.internal; 13 14 import java.io.IOException ; 15 import javax.servlet.*; 16 17 public class RequestDispatcherAdaptor implements RequestDispatcher { 19 20 private RequestDispatcher requestDispatcher; 21 22 public RequestDispatcherAdaptor(RequestDispatcher requestDispatcher) { 23 this.requestDispatcher = requestDispatcher; 24 } 25 26 public void forward(ServletRequest req, ServletResponse resp) throws ServletException, IOException { 27 if (req instanceof HttpServletRequestAdaptor) 28 req = ((HttpServletRequestAdaptor) req).getRequest(); 29 30 requestDispatcher.forward(req, resp); 31 } 32 33 public void include(ServletRequest req, ServletResponse resp) throws ServletException, IOException { 34 if (req instanceof HttpServletRequestAdaptor) 35 req = ((HttpServletRequestAdaptor) req).getRequest(); 36 37 requestDispatcher.include(req, resp); 38 } 39 } 40 | Popular Tags |