File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to read query string or url after # Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to read query string or url after #" Watch "How to read query string or url after #" New topic
Author

How to read query string or url after #

Rishi Tyagi
Ranch Hand

Joined: Feb 14, 2002
Posts: 100
Hi,

I have a java servlet url which is shared with soem thirdparty, my servlet url is

http://<mydomain>/calback


Thirdparty is passing information to my servlet in below format
http://<mydomain>/calback#data=<data i need to read from this request>

Can someone advice how can i read this data being received after # in the invoked url

tried getAttributes(), getPathInfo(), getParameterNames(), getRequestURI() and getRequestURL() but none of them is returning me data passed to me url after #

Kindly advice how can i sortout this issue and read required data?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

The portion of the URL after the hash tag is not sent to the server. It is for client-side use only.

This was recently discussed in this topic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: How to read query string or url after #