users@jersey.java.net

Re: [Jersey] Re: UriInfo bug or as designed?

From: Daniel Manzke <daniel.manzke_at_googlemail.com>
Date: Wed, 11 Feb 2009 19:06:44 +0100

Yeah it's not a bug. And it is also working without the port now.
For all the people who need the port. Try
UriInfo.getRequestUriBuilder().port(YOURPORT).build(); So you will get the
URI with Port included.


Bye,
daniel

2009/2/10 Paul Sandoz <Paul.Sandoz_at_sun.com>

>
> On Feb 7, 2009, at 11:26 PM, Markus KARG wrote:
>
> Daniel,
>
> query parameters is everything right to the question mark in the URL.
>
> The port 80 is omitted as it is the HTTP default port. The port is not a
> query parameter.
>
>
>
> And it is not a bug. Port 80 is the default port for HTTP so can be
> omitted. It looks like Grizzly is including the default port, but it is
> harmless. See here:
>
> http://tools.ietf.org/html/rfc1738#section-3.3
>
> Paul.
>
>
> Regards
> Markus
>
> *From:* Daniel Manzke [mailto:daniel.manzke_at_googlemail.com<daniel.manzke_at_googlemail.com>
> ]
> *Sent:* Samstag, 7. Februar 2009 21:13
> *To:* users_at_jersey.dev.java.net
> *Subject:* [Jersey] Re: UriInfo bug or as designed?
>
> Ok,
>
> I searched for the Java Doc of JAX-RS:
>
> java.net.URI
> *getRequestUri<http://www.jboss.org/file-access/default/members/resteasy/freezone/docs/1.0.0.GA/javadocs/javax/ws/rs/core/UriInfo.html#getRequestUri()>
> *()
> Get the absolute request URI including any query parameters.
>
> Does URI with ANY query parameter mean, that the port jas to be included?!
> :)
>
>
> Bye,
> Daniel
>
> 2009/2/7 Daniel Manzke <daniel.manzke_at_googlemail.com>
> Hi there,
>
> ok I got my webdav application up and running, but now I have a problem.
>
> It get different result when calling UriInfo.getRequestUri().
>
>
> Grizzly: http://localhost:80/filesystem
> Tomcat: http://localhost/filesystem
>
> You see the difference? :) The PORT is missing. :)
>
>
>
> Is the okay? Or is it a bug?
>
>
>
>
> Bye and a nice weekend from Germany,
> Daniel
>
>
>
> --
> Mit freundlichen Grüßen
>
> Daniel Manzke
>
>
>


-- 
Mit freundlichen Grüßen
Daniel Manzke