users@jersey.java.net

URI fragments

From: Geoff hendrey <geoff_hendrey_at_yahoo.com>
Date: Tue, 25 Aug 2009 22:47:33 -0700 (PDT)

Hi All,

I am trying to access a fragment of a URI. For example, http://server:port/path#fragment

The docs for ContainerRequest.getRequestURI indicate: "Get the absolute request URI. This includes query parameters and any supplied fragment."

I've checked with curl in "--trace" mode to insure the fragment is actually sent to the server, so I am sure it is being sent as part of the URI.

However, I don't get the fragment. I've tried virtually everything I can think of to get the fragment. Here is a partial list of what I've tried (on both HttpServletRequest, and ContainerRequest):

                log.debug(req.getRequestUri().getRawFragment());
                log.debug(req.getRequestUri().getPath());
                log.debug(req.getAbsolutePath());
                log.debug(req.getPath());
                log.debug(req.getRequestUri().getRawPath());
                log.debug(req.getRequestUri().getRawQuery());

Can anyone tell me how to get the fragment?

 -geoff