Home > SAP Enterprise Portal > SAP Portal HTTP or HTTPS?

SAP Portal HTTP or HTTPS?

22 February, 2006

Want to tell if your iView is running over HTTP or HTTPS?

Try this:

WARNING: Untested code ahead!

HttpServletRequest servletRequest = componentRequest.getServletRequest();
String requestURL = servletRequest.getRequestURL().toString();
String protocol = requestURL.substring(0, requestURL.indexOf(":"));

if(protocol.equals(“http”))
{
// do HTTP stuff
}
else
{
// do HTTPS stuff
}

Advertisements
Categories: SAP Enterprise Portal
%d bloggers like this: