• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to read query string or url after #

 
Rishi Tyagi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic