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 -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -----Message d'origine----- De : [email protected] [mailto:[email protected]] Envoyé : vendredi 26 février 2010 18:22 À : [email protected] Objet : Re: Restlet JAX-RS question Hi Fabio, hi Jerome, hi Thierry, cool Fabio, that you want allow the the Servlet artifacts in JAX-RS. Every help is welcome. I think it is important, that the JAX-RS extension has no dependency to the Servlet API, so we need to have another way. @ Jerome and Theirry: Do you think it useful to create an "extension extension", that has all that needs dependencies to the Servlet API? Than I have an idea how to implement it. Or do you have another ideas? Are there other ideas what also could be included, that means could be annotated with @Context? best regards Stephan Fabio Mancinelli schrieb: > Hi Stephan, > > I am writing to you to ask a little advice. > I was thinking about writing a patch to the JAX-RS extension in order > to allow the injection of the HttpServletRequest and > HttpServletRespone objects using the @Context annotation. > > Could you point me to the code where injection is done and if I should > be aware of some architectural details you used for implementing the > injection mechanism? > > Thank you. > > Regards, > Fabio > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24526 33 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2464857

