The server-side session concept is not part of the REST architectural style
and makes it impossible to achieve many of the benefits of REST (for
example, being able to swap a client on the fly from server to server in a
cluster without sharing or transferring server side state).  Getting
parameters off the query string and putting them in the session sounds like
a practice that the Servlet model covers well ... I'm not sure what value
Restlet adds to this kind of design.
Still, to interoperate with some JEE code where you really need this
ability, first -- run in a JEE container using ServerServlet, and second,
use ServletCall.getRequest(restletRequest) to access the HttpServletRequest.
 From there you should be able to "talk" to the JEE Servlet API and
interoperate with the Session.

Here's a thread where somebody had a valid use case to do just that:

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

- Rob

On Mon, Feb 16, 2009 at 8:28 AM, Ruben Hernando <pr-rherna...@informa.es>wrote:

>
> Hi!
>
> I need some equivalent to the traditional *HttpServletRequest*.getSession(),
> because I'd have to insert some parameters into the session. *
> org.restlet.Handler.getRequest()* does'nt implement any "getSession()"
> method, so I need a way to do it.
>
> thanks

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

Reply via email to