// Since an in-protocol-resource URL must be a ResourceURL, the
// "javax.portlet.faces.PortletMode" and "javax.portlet.faces.WindowState" parameters must
// be removed from the URL (if present) because you can change a PortletMode or WindowState
// in a ResourceRequest.
bridgeResourceURL.removeParameter(Bridge.PORTLET_MODE_PARAMETER);
bridgeResourceURL.removeParameter(Bridge.PORTLET_WINDOWSTATE_PARAMETER);
// The Bridge Spec indicates that the "javax.portlet.faces.Secure" parameter must be
// removed but must also be used to set the security of the ResourceURL below.
String secureParam = bridgeResourceURL.getParameter(Bridge.PORTLET_SECURE_PARAMETER);
bridgeResourceURL.setSecure(BooleanHelper.isTrueToken(secureParam));