0

In my sample application i am displaying some records, based on # am scrolling down to a particular topic. But to edit that message user has to logon. But while constructing destination url in signin pagebased on request object of servlet am not getting the # in url.

URL looks like www.mydomain:8080/SMP/Account/display/topic#M7

   public static String getFullURL(HttpServletRequest request) {
    StringBuffer requestURL = request.getRequestURL();//**http://xyz:8080/SMP/Account/display/topic**
    String queryString = request.getQueryString();
  .....
   }

FYI i have a restriction on setting referer. Is there any other-way to get full url.

unwichtich
  • 13,712
  • 4
  • 53
  • 66
mallikarjun
  • 1,862
  • 5
  • 23
  • 47

1 Answers1

2

You cannot get the url fragment identifier from the HttpServletRequest as its not actually passed along to the server, it is for the client only.

A quick Google for HttpServletRequest fragment identifier should confirm that, including:

How to get the URL fragment identifier from HttpServletRequest

How to detect Fragment identifiers in Url Mappings?

etc

Community
  • 1
  • 1
Mr Zorn
  • 1,903
  • 1
  • 14
  • 25