Thanks Jakub!
Regards,
Tom.
-----Original Message-----
From: Jakub.Podlesak_at_Sun.COM [mailto:Jakub.Podlesak_at_Sun.COM]
Sent: Tuesday, January 08, 2008 15:57
To: users_at_jersey.dev.java.net
Cc: Tom Deckers (tdeckers)
Subject: Re: ServletContext
Hi Tom,
you should be able to get it injected
to your resource:
class A {
@javax.annotation.Resource ServletContext context;
@GET public String getMe() {
return context.toString();
}
}
~Jakub
On Tue, Jan 08, 2008 at 02:42:09PM +0100, Tom Deckers (tdeckers) wrote:
> Hi,
>
>
>
> I can't seem to find a way to access the ServletContext when deploying
> Jersey in a Tomcat container. I assume this is intentional to hide
the
> plumbing and since a Servlet container is not required. Is this
> assumption correct? Any chance access to ServletContext can be
provided
> when it is available in the application?
>
>
>
> Thanks!
> Tom Deckers.
>
--
Jakub Podlesak
http://blogs.sun.com/japod