title: How do you access URL text following the # sign through Java?
body: <p>Using Java (.jsp or whatever) is there a way where I can send a request for this page:</p>
  
  <p><a href="http://www.mystore.com/store/shelf.jsp?category=mens#page=2" rel="nofollow noreferrer">http://www.mystore.com/store/shelf.jsp?category=mens#page=2</a></p>
  
  <p>and have the Java code parse the URL and see the #page=2 and respond accordingly?</p>
  
  <p>Basically, I'm looking for the Java code that allows me to access the characters following the hash tag.</p>
  
  <p>The reason I'm doing this is that I want to load subsequent pages via AJAX (on my shelf) and then allow the user to copy and paste the URL and send it to a friend. Without the ability of Java being able to read the characters following the hash tag I'm uncertain as to how I would manipulate the URL with Javascript in a way that the server would be able to also read without causing the page to re-load.</p>
  
  <p>I'm having trouble even figuring out how to access/see the entire URL (<a href="http://www.mystore.com/store/shelf.jsp?category=mens#page=2" rel="nofollow noreferrer">http://www.mystore.com/store/shelf.jsp?category=mens#page=2</a>) from within my Java code...</p>