users@jersey.java.net

[Jersey] Re: UriInfo injection at resource initialization time

From: Martin Matula <martin.matula_at_oracle.com>
Date: Wed, 09 Mar 2011 16:31:05 +0100

Hi Martynas,

On 9.3.2011 15:59, Martynas Jusevicius wrote:
>
>>> I had achieved the same using abstract Resource superclass (like in my
>>> last example) with
>>> - getPath() and getAbsolutePath() equivalents
>>> - constructor Resource(Resource parent) - effectively building a
>>> parent/child tree of Resource instances
>>> - Servlet-like doGet(), doPost() etc methods
>>> and the real HttpServlet mapping request URIs to Resource instances
>>> and executing the appropriate do..() methods.
I mean, how did you get the absolute URI outside of the request context?
I am guessing all the above initialization happened upon the first
request within it's context, no?
Martin