1 16 17 package org.apache.struts.chain.servlet; 18 19 20 import javax.servlet.RequestDispatcher ; 21 import javax.servlet.http.HttpServletRequest ; 22 import org.apache.commons.chain.Context; 23 import org.apache.commons.chain.web.servlet.ServletWebContext; 24 import org.apache.struts.chain.AbstractPerformInclude; 25 import org.apache.struts.upload.MultipartRequestWrapper; 26 27 28 34 35 public class PerformInclude extends AbstractPerformInclude { 36 37 38 40 41 48 protected void perform(Context context, String uri) 49 throws Exception { 50 51 ServletWebContext swcontext = (ServletWebContext) context; 52 53 HttpServletRequest request = swcontext.getRequest(); 55 if (request instanceof MultipartRequestWrapper) { 56 request = ((MultipartRequestWrapper) request).getRequest(); 57 } 58 59 RequestDispatcher rd = 60 swcontext.getContext().getRequestDispatcher(uri); 61 rd.forward(request, swcontext.getResponse()); 62 } 63 64 65 } 66 | Popular Tags |