This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 63195

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]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to read query string or url after #
It's not a secret anymore!