[opencms-dev] Detecting URL in browser location bar?

Sebastian Himberger sebastian.himberger at gmx.de
Sat May 6 10:37:23 CEST 2006


Hi Joe,

just for the case you haven't got any further with this problem. Maybe 
gettings the original HttpRequest may help solving your problem. The 
request/response objects in OpenCms controlled JSPs are wrapped by an 
CmsFlexRequest and CmsFlexResponse. You can get the original 
HTTP-Request this way:

<%@ page import="org.opencms.flex.*" %>
HttpServletRequest origRequest = 
CmsFlexController.getController(request).getTopRequest();
out.println("Flex Request: " + request.getRequestURL() + "<br/>");
out.println("Original Request: " + origRequest.getRequestURL() + "<br/>");

Also be aware that if you're using mod_proxy there is ( as far as i 
know) no way to get the complete original request. That's because a new 
one is created from the apache.

I hope this helps

best regards
Sebastian




More information about the opencms-dev mailing list