* /gptConfig/catalog/parameter@key="reverseProxy.baseContextPath"
* @return the base context path
*/
public static String resolveBaseContextPath(HttpServletRequest request) {
if (request == null) return "";
StringAttributeMap params = null;
RequestContext ctx = (RequestContext)request.getAttribute(REFERENCEKEY);
if (ctx != null) {
params = ctx.getCatalogConfiguration().getParameters();
} else {
params = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getParameters();
}
String basePath = Val.chkStr(params.getValue("reverseProxy.baseContextPath"));
if (basePath.length() == 0) {
StringBuffer requestURL = request.getRequestURL();
String ctxPath = request.getContextPath();
basePath = requestURL.substring(0,requestURL.indexOf(ctxPath)+ctxPath.length());
}