It's quite horrible, but you can do casts like this:

HttpServletRequest awful = ((ServletCall)((HttpRequest)
request).getHttpCall()).getRequest();

This will, of course, break your application unless it is running in a very
specific Restlet configuration, and is probably inviting forward
incompatibilities.  If you are dealing with an existing Java API that simply
expects an HttpServletRequest as an argument, I would prefer to construct a
new HttpServletRequest from scratch and populate it with the needed data
acquired via Restlet API calls.

On the other hand, if the authentication API really won't work at all except
in a Servlet container (it has other Servlet environment dependencies) then
you might as well do the casts.

- Rob

On Tue, Jun 3, 2008 at 3:37 PM, Jennifer J. Chen <[EMAIL PROTECTED]> wrote:

> I need the original HttpServletRequest and HttpServletResponse.  The
> authentication will be performed in the resource class.  Is there anyway to
> extract this from the reslet request?
>

Reply via email to