Hi Martynas,
Sure, you need to use the fragment method to add a fragment:
...path("/persons/{givenName}%20{familyName}").fragment("this").build("John", "Doe");
HTH,
~Jakub
On Aug 5, 2013, at 10:10 PM, Martynas Jusevičius <martynas_at_graphity.org> wrote:
> Hey,
>
> is it possible to have URI templates that include fragment
> identifiers, and build URIs from them using base UriBuilder?
>
> For example, when context path is http://localhost:8080/webapp,
>
> getUriInfo().getBaseUriBuilder().path("/persons/{givenName}%20{familyName}#this").build("John",
> "Doe")
>
> results in "http://localhost:8080/webapp/persons/John%20Doe%23this".
> Notice the escaped hash, which is not desired.
>
> Is there a workaround for this? Or should I be using
> UriBuilder.fragment() instead?
>
> Thanks,
>
> Martynas
> graphityhq.com