I don't know how to specify method annotation to catch resources only
with fragments specified / or to catch ones with specific fragments
like
@Path (please trigger if the request is ended with fragment identifier) or
@Path (please trigger if request is ended with specific fragment identifier)
I suspect that it might be solved with appropriate reg-exp, but i
couldn't that time, so I'm interested in the right answer as well.
I solved the problem with the following approach
public catchEverything(@Context UriInfo info) {
// querying info.getQueryParameters() , info.getRequestUri() and so on.
// forward to actual method for process specific fragments
}
On Sun, Mar 15, 2009 at 4:30 AM, Ty <[email protected]> wrote:
> Hi,
> I can't seem to get a route to work for a URL that has a fragment identifier
> component e.g. http://site/page#fragment
>
> I am using restlet 1.2M1 and I have tried:
> @Path("page#{fragment}")
> @GET
> @Produces("text/plain")
> public String getFragment(@Context UriInfo uriInfo, @PathParam("fragment")
> String fragment)
> {
> ...
> }
>
> the log says it is serving up the http://site/page resource rather than
> routing to the method above.
>
> I've also looked around to see if there is a @Fragment or @FragmentParam or
> something like that; but there doesn't seem to be anything. A search of the
> jersey wiki also yields nothing about fragments.
>
> Does anyone know how to support fragments in jax-rs?
>
> Thanks,
> T
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1324413
>
--
Best regards,
~ Xasima Xirohata ~
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1326619