On Thu, Mar 25, 2010 at 12:35 PM, Jerome Louvel
<[email protected]> wrote:
> Hi guys,
>
> Sorry for being late to the discussion.
>
> The dependency on the Servlet API is an issue indeed, but I think you should
> be able to achieve what you want by injecting the Restlet request/response
> and then from that retrieving the Servlet request/response.
>
> org.restlet.ext.servlet.internal.ServletCall class has this static method to
> help:
> getRequest(org.restlet.Request) : HttpServletRequest
>
> In order to make this more obvious, I've just added to SVN trunk a
> ServletUtils class to the Servlet extension with two static methods to
> easily retrieve the Servlet request/response.
>
> Best regards,
> Jerome Louvel
> --

Hi,

I don't know if you have seen it, but I contributed a patch...
Actually I inject directly the HttpServletRequest using something that
maybe is similar to what you describe there (hence, the ext.servlet
dependency)

By injecting the Restlet Request we would remove the dependency and we
provide a way for retrieving the HttpServletRequest in the JAX-RS
resources. It is indeed a good idea! And is almost implemented in the
patch I sent (it's just a matter of removing some lines, providing
that the rest is good :))

Thanks for the feedback!

-Fabio

P.S.: Link to the patch : http://restlet.tigris.org/issues/show_bug.cgi?id=722

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2464893

Reply via email to