If i have an url like http://www.someurl.com/index.jsp#someAnchor
can and how can i get the value of the anchor???
use request.getQueryString() and then parse out everything after the #, there are several ways to do this. One easy way:
Code:String query = request.getQueryString(); int index = query.lastIndexOf('#'); String anchor = query.substring(index);