Arul Dhesiaseelan wrote:
> Hi Paul,
>
> Thanks for your help.
>
> I tried this code in both 0.7 and 0.8.
>
> I get NPE at r.getPathInfo() when I GET "perrequest/constructor" in
> Jersey 0.7.
Yes, that was not implemented in 0.7.
> All three cases work like a charm in 0.8.
>
Great.
> Something like shown below won't work even in 0.8?
>
> @Path("singleton")
> @Singleton
> public static class SingletonResource {
> @Context
> HttpServletRequest r;
>
> public SingletonResource(@Context HttpServletRequest r) {
> this.r = r;
> r.getSession().setAttribute("test", "true");
> }
>
> @ProduceMime("text/plain")
> @GET
> public String get() {
> //return r.getPathInfo();
> return (String)r.getAttribute("test");
> }
> }
>
Not yet! Tis a bug i need to fix.
Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109