The response provides support for the encoding of Portal-specific URIs. The response object can encode URIs, for example, to change the portal’s display mode or to request a specific portal or community page.
The following methods exist in the PortalServletResponse to support the encoding of Portal-specific URLs:
String encodePortalURL(String url)Encodes a portal URL with the session ID and portal-specific parameters
String encodePortalURL(String url,PortalContext context)Encodes a portal URL with the specified portal context. This lets you change thePortalContextassociated with the request.

