Pages

Wednesday, January 5, 2011

Get Current URL in XPage

In traditional Web Application it is kind of simple to get the current url using location.href.

In case of XPages the following is the method to get the current url in XPages

context.getUrl().toString();

Hope this helps :)

2 comments:

  1. btw, if you need to get only params from your URL, it is fine to use [param] object

    ReplyDelete
  2. I am not able to figure out how to use the [param] object.. can u plz help me out with it

    ReplyDelete