[opencms-dev] how to access url displayed in browser's address bar

Joe Desbonnet jdesbonnet at gmail.com
Tue Sep 5 12:15:23 CEST 2006


No -- it's not the right answer. As far as I can tell this information
is no longer available in the usual properties of the usual servlet
objects due to the reverse proxying etc.

I came across the same problem a while ago when incorporating Google
Maps into an OpenCms project. Google requires that you get a key which
is tied to a specific site+directory, so knowing what's in the
brower's location bar whould be helpful. I still don't have an answer,
but I didn't spend too long on it.

I suspect the solution may lie in looking at the extra header lines in
the request... Or maybe some sort of javascripty solution (yech!)


Joe.



On 9/5/06, Andras Balogh <andras at reea.net> wrote:
> Hello,
>
> I'm not sure if I understand you 100% but You can check the:
> HttpServletRequest getPathInfo()
> http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServletRequest.html#getPathInfo()
>
> Best wishes,
> Andras.
>
> Arian Abrahantes Quintana wrote:
> > Dear All:
> >
> >
> > I've been using opencms for a while I still consider myself a newbie. Hope that some of you can help me.
> >
> > Due proxies and other stuff in opencms the url is rewritten. I am able to access the full url content in the cms object request and I need to match it with the one displayed on the browser. So far I couldn't access the url displayed on the browser. I am doing on the case that somebody tries to fake the address to get into the server, i.e. writing the address by typing directly in the address bar.
> >
> > I am aware that via javascript I can access history in the browser but many users, including myself, disable javascript operation on theirs browsers. I have found a few things in some java mailing list but they are browser dependent.
> >
> > hope anyone can help m. best regards,
> >
> > arian
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> >
> >
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>



More information about the opencms-dev mailing list