File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Request URL using Jersey Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Request URL using Jersey" Watch "Request URL using Jersey" New topic
Author

Request URL using Jersey

Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Is there a way to get the Request URL from where the webservice is being called? I used UriInfo but still it doesnt works.

I am using Jersey and Spring, both latest build.

Thanks in advance


Never try to be a hard-worker. Be a smart-worker.
My Blog
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42370
    
  64
Please read ItDoesntWorkIsUseless and TellTheDetails.


Ping & DNS - my free Android networking tools app
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Sorry Ulf. I had found the solution just before. I used @Context UriInfo as method argument and get the complete URL using getAbsolutePath() method.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Request URL using Jersey