Hi Rob,
 
There is already this method available (added recently):
http://www.restlet.org/documentation/snapshot/ext/com/noelios/restlet/ext/se
rvlet/ServletCall.html#getRequest(org.restlet.data.Request)
 
It only retrieves the Servlet request if the Restlet request comes from a
Servlet adapter. It misses the logic that you suggested for standalone
deployment. Also, feel free to move the method into a new utility class if
that can make usage more intuitive.
 
IMO, no need to create another extension, the existing Servlet one can
contain several features:
 - the Servlet adapter/connector
 - utility classes
 - etc. 
 
Best regards,
Jerome
 

  _____  

De : Rob Heittman [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 10 juin 2008 14:16
À : discuss@restlet.tigris.org
Objet : Re: from the org.restlet.data.Request, get the HttpServletRequest


Not a bad idea.  I'm wondering how we could name it so as not to confuse
people about the servlet extension vs. the servlet wrapper.  I had thought
of putting it the servlet extension because that is the only piece of
Restlet that already depends on the servlet API, but that might cause some
unintended drama with service discovery, as you point out!  Definitely this
calls for Jerome's wisdom.


On Tue, Jun 10, 2008 at 5:01 AM, Bruno Harbulot
<[EMAIL PROTECTED]> wrote:


Very good points. Just a small comment: isn't the Servlet extension what
allows Restlets to be "wrapped" into a Servlet environment (I don't actually
use it)? I think perhaps this utility should be in a separate extension,
since it would make it possible to use Servlet-based code from Restlet, but
might not require Restlet to use the Servlet connector.



Reply via email to