1 24 package org.riotfamily.common.web.dwr; 25 26 import javax.servlet.http.HttpServletRequest ; 27 import javax.servlet.http.HttpServletRequestWrapper ; 28 29 38 public class PathShiftingRequestWrapper extends HttpServletRequestWrapper { 39 40 private String servletPath; 41 42 private String pathInfo; 43 44 public PathShiftingRequestWrapper(HttpServletRequest request, int offset) { 45 super(request); 46 String s = request.getPathInfo(); 47 this.pathInfo = s.substring(offset); 48 this.servletPath = request.getServletPath() + s.substring(0, offset); 49 } 50 51 public String getServletPath() { 52 return this.servletPath; 53 } 54 55 public String getPathInfo() { 56 return this.pathInfo; 57 } 58 59 } 60 | Popular Tags |