I am trying to forward a request to any other URL that contains the hash symbol ('#'): < / P>
request.getRequestDispatcher ("/ some / path.jsp # somehash") forwarded (request, response); Tomcat, however, tells me that "the requested resource is not available" if I remove the hash from the URL, then everything works fine hash is not allowed or should I Am I not treating properly?
# symbol is a browser thing, not a server thing when you In the browser, type a URL with # , the browser does not send that part to the server, it sends the URL without it, then the name jumps back to the anchor.
When you ask the container that the URL is for you, then it is different for any other URL - # has no special meaning for it; It looks like a JSP page named /some/path.jsp#somehash , which is certainly not present.
You will need to put anchor logic to jump on the client in any way. Perhaps you can scroll some javascript to that point in the document on the resulting page.
Comments
Post a Comment