/** * This is a work around for servlet containers creating a new application dispatcher * instead of using our request dispatcher, so missing RFS JSP pages are not requested to * OpenCms and the dispatcher is unable to load the included/forwarded JSP file.<p> * * @see javax.servlet.http.HttpServletRequestWrapper#getServletPath() */ @Override public String getServletPath() { // unwrap the request to prevent multiple unneeded attempts to generate missing JSP files // m_controller.getTopRequest() does not return the right request here when forwarding // this method is generally called exactly once per request on different servlet containers // only resin calls it twice ServletRequest req = getRequest(); while (req instanceof CmsFlexRequest) { req = ((CmsFlexRequest)req).getRequest(); } String servletPath = null; if (req instanceof HttpServletRequest) { servletPath = ((HttpServletRequest)req).getServletPath(); } else { servletPath = super.getServletPath(); } // generate missing JSP file CmsJspLoader jspLoader = getJspLoader(); if (jspLoader != null) { jspLoader.updateJspFromRequest(servletPath, this); } return servletPath; }
/** * This is a work around for servlet containers creating a new application dispatcher * instead of using our request dispatcher, so missing RFS JSP pages are not requested to * OpenCms and the dispatcher is unable to load the included/forwarded JSP file.<p> * * @see javax.servlet.http.HttpServletRequestWrapper#getServletPath() */ @Override public String getServletPath() { // unwrap the request to prevent multiple unneeded attempts to generate missing JSP files // m_controller.getTopRequest() does not return the right request here when forwarding // this method is generally called exactly once per request on different servlet containers // only resin calls it twice ServletRequest req = getRequest(); while (req instanceof CmsFlexRequest) { req = ((CmsFlexRequest)req).getRequest(); } String servletPath = null; if (req instanceof HttpServletRequest) { servletPath = ((HttpServletRequest)req).getServletPath(); } else { servletPath = super.getServletPath(); } // generate missing JSP file CmsJspLoader jspLoader = getJspLoader(); if (jspLoader != null) { jspLoader.updateJspFromRequest(servletPath, this); } return servletPath; }