Hi.

2015-12-11 13:13 GMT+01:00 Floyd Shackelford <[email protected]>:
>
> @Path("/foo")
> @Produces(MediaType.TEXT_PLAIN)
> public class Foo {
>
> @GET
> @Path("/bar")
>   public String bar() {
>     return "hello world"
>   }
> }
>
> How do I get HttpServletRequest, HttpServletResponse, etc. from within my
> advice without changing bar's signature?
>

I *think* that by using an ITD, you can introduce fields of those types
annotated with @Context in Foo, which would then get injected by JAX-RS (as
long as everything in your "etc." is part of the context). It's been a
while since I last used ITDs, so I'm not sure if the fields are actually
added to Foo directly; if they aren't, it won't work, of course.

Regards,
Frank
_______________________________________________
aspectj-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to