When the Geoportal document rest service (/geoportal/rest/document?f=html&id=XXX) constructs the URL Links for details and metadata attributes, it prematurely truncates the baseContextPath if the name of the context appears in the server hostname. For example, when http://geoportal.myhost.com/geoportal is expected, http://geoportal is received. This renders the links in that service invalid.
The issue lies with the com.esri.gpt.framework.context.RequestContext class's resolveBaseContextPath(HttpServletRequest request) method. It is doing String manipulation on the requestURL, performing a substring action from 0 to the index of the context plus the context length. A more correct way to perform the operation is to reconstruct the URL using the information form the HttpServletRequest object. I have attached a fix I put together for our local install.
Log in to post a comment.