File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

How to read query string or url after #

Rishi Tyagi
Ranch Hand

Joined: Feb 14, 2002
Posts: 100

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


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

Joined: Jan 10, 2002
Posts: 63839

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How to read query string or url after #
It's not a secret anymore!