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

Arian Abrahantes Quintana Arian.Abrahantes.Quintana at cern.ch
Tue Sep 5 12:41:58 CEST 2006


hi andras and joe:
 
I know we can do better ;-). Indeed I tried first, later wrote to the list. I didn't mean to boder you guys. but build it myself is not the solution. I need to catch exactly what's in the address bar. Joe wrote clearly the point of why is not working and that was what I tried to explain (reverse proxies and that stuff). If nothing come out I'll try to export the javascript variable to jsp. Is this posible?.
 
thxs a lot,
 
arian

________________________________

From: opencms-dev-bounces at opencms.org on behalf of Andras Balogh
Sent: Tue 9/5/2006 12:23 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] how to access url displayed in browser's address bar



Hello,

    Come-on,  You can do better than that ! :)
There are lot of methods in HttpServletRequest  and in ServletRequest to
build the full URL:
http://java.sun.com/products/servlet/2.1/api/javax.servlet.ServletRequest.html
getScheme() ->http
getServerName() ->  mywebsite.org

getPathInfo ()-> /path/to/file.html

Other methods to check:
getQueryString()
getContextPath()
getServletPath()

Best wishes,
Andras


Arian Abrahantes Quintana wrote:
> hi andras,
> 
> sort of that but getPathInfo or other Methods within HttpServletRequest is not returning the full url -seems to be a URI-, instead of:
> 
> http://mywebsite.org/path/to/file.html
> 
> returns,
> 
> /path/to/file.html
> 
> Let me see if I make myself clear.
> 
> I'd like to code in opencms or java something to work like this: http://www.js-examples.com/page/javascripts__example.html?view=495 <http://www.js-examples.com/page/javascripts__example.html?view=495>
> 
> as you see the javascript goes directly to the bowser address bar.
> 
> thank you for your help I'll keep looking,
> 
> 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5815 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060905/06b3f584/attachment.bin>


More information about the opencms-dev mailing list