How to get URL in External call ??
I am using
String URL=context.getRequest().getRequestURI();
But My getting the page location.But I am not getting the Actual URL of Address bar.
Supose that I have dynamic URL like that
/t5/forums/replypage/board-id/livesite/message-id/11723
and I want to get this url in our External class.
When I said "[real example]" - I meant one that you are actually working with.
You don't know what you'd get from the URL you just provided because you don't know if that's a LiveSite page (unlikely), nor do you have the result from attempting to retrieve the URL via code.
So - provide an actual example of something you are working with - showing both what you are getting via your code and what you were looking to get from your code. Then, someone here might be able to provide a more useful response to your query.
I want to set the current page url on our hole site with sone special tag like <link rel="canonical" href="/t5/forums/replypage/board-id/livesite/message-id/11725"> which will come inside <head> tag.
So I am using MetaInfoSetter metaInfoSetter=new MetaInfoSetter(); class to import this tag in header. but I am not able to get the URL throug specific method which is provided by HP autonomy library.
you can use context.getRequest().getRequestURL() to have the service reconstruct the full thing for you including query string, but if you're just going to split it up again, you might as well just be specific about which part you want.
context.getRequest().getRequestURL(). is returing the physical path of page. and I am using custemize url rewrite so how to get the URL from url bar not the location of page.
If you're using a custom piece of code to rewrite URLs then how do you expect us to be able to tell you how it works?
I'm with @rpoulin on this, we can't be expected to know your custom code.
However, for our LiveSite implementation (which uses site map aliases) I simply get the page path and look up the appropriate alias within the site map.