Request path elements of the original HTTP request may be accessed by the Portal request. The context path, servlet path and path info are obtained from the original request URI and exposed via the Portal request.

The following methods exist in the PortalServletRequest to access this information:

getContextPath
getServletPath
getPathInfo
getPortalContextPath
getPortalServletPath
getPortalPathInfo

For example, suppose the Portal Context is set as follows:

Portal Context Path

/portal

Portal Servlet Path

/*.jsp

Page Template Context Path

/templates

Page Template Servlet Path

/html/shared.jsp

In such a case, a request for /portal/myportal/home.jsp results in the following path elements:

contextPath

/templates

servletPath

/html/shared.jsp

pathInfo

null

portalContextPath

/portal

portalServletPath

/myportal/home.jsp

portalPathInfo

null


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices