cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Titus <ati...@fwdco.com>
Subject Re: Any way to get access to request and response parameters and cookies?
Date Sat, 29 Nov 2014 01:57:06 GMT
you can

import javax.ws.rs.core.Context;

and then

@Context
ServletContext rsContext;


This will result in the normal ServletContext getting injected. From there
you can get the request info, etc.




On Thu, Nov 27, 2014 at 10:05 PM, Colbert Philippe <
colbert.philippe@gmail.com> wrote:

> I am using Java with Apache CXF to write the backend for single-page web
> site (like AngularJS and others).   In my REST service function, I need
> access to the header of the http request (i.e. parameters and cookies) and
> I need access to the response header also (i.e. parameters and cookies).
>  I
> need to read and possibly write parameters and cookies.   The reason for
> this are important!   I need to implement security features and session
> management.   Those are important reasons indeed!
>
>
>
> Is there a way of getting access to both of these structures from within a
> web service function in Apache CXF RESTfull code?
>
>
>
> If it is not possible at this point, I strongly recommend that you
> implement a solution.    A solution might be to create  some new dependency
> injection annotations that would give access to these structures like
> @RequestCookie,   @RequestParam,   @ResponseCookie,   @ResponseParam
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message