Re: USing Freemarker with ServletAdapter

2012-02-29 Thread Thierry Boileau
Hello Alex, did you try to update the list of client connectors registered by the Component? You can make a call such as Component#getClients().add(Protocol.CLAP); Best regards, Thierry Boileau Hi, I am integrating Guice and Restlet in an approach that involves using ServletAdapter instead

Re: 2.1M7 - Internal HTTP Connector - Overload Error

2012-02-29 Thread Thierry Boileau
Hello all, I would like to add that you can still keep your server running by using one of the provided server connectors such as jetty or simple. Juste complete the classpath (don't update your code) with the extension jar and its dependencies : org.restlet.ext.extension.jar, and

Re: Jetty + Webapp

2012-02-29 Thread Thierry Boileau
Hello all, I think this could be a little bit simpler. The first step is to code your application without regarding the way you will serve it. By design, Application is the right unit of code desired, you are basically required to complete the createInboundRoot method : @Override public

Re: Re: Netty, JSON and Chunked Encodings

2012-02-29 Thread Thierry Boileau
Hello Grant, I'm not sure I follow. The problem isn't that it doesn't send chunked encoding. It's that it thinks all JSON messages are chunked due to the JacksonRepresentation not setting the size value correctly. Actually, using chunked encoding for representations is not a problem, and as

Re: @Post generic parameter conversion bug/missing feature

2012-02-29 Thread Thierry Boileau
Hello all, thanks for claiming this : I've entered a new issue http://restlet.tigris.org/issues/show_bug.cgi?id=1378. Best regards, Thierry Boileau Did anybody log an issue for this? I didn't see one, but I don't want to log a dup. -- View this message in context:

Re: how to set ETag response header from ServerResource annotated method?

2012-02-29 Thread Thierry Boileau
Hello Andy, do you mean that the response will get the entity a little bit later in your code? Are you trying to set the Tag in the doInit method? Best regards, Thierry Boileau I'd like to set an ETag response header while processing a request within my ServerResource subclass. I tried

Re: how to set ETag response header from ServerResource annotated method?

2012-02-29 Thread Tim Peierls
I think Andy is talking about a ServerResource subclass with an annotated method returning a value that will later be converted into a Representation. In that case there is no existing Representation on which to call setTag. The way I handle this is to override toRepresentation, something like

Re: how to set ETag response header from ServerResource annotated method?

2012-02-29 Thread Thierry Boileau
Hi Tim, perfect. As usual. :) Best regards, Thierry Boileau I think Andy is talking about a ServerResource subclass with an annotated method returning a value that will later be converted into a Representation. In that case there is no existing Representation on which to call setTag. The way

Re: USing Freemarker with ServletAdapter

2012-02-29 Thread Alex Harvey
Hi Thierry, I understand how to set the protocol on Component. My problem is more fundamental than that I think. When working with ServletAdapter, I don't have a reference to Component anywhere at hand that I can find. The only Restlet framework classes that I'm manipulating in my HttpServlet

Re: USing Freemarker with ServletAdapter

2012-02-29 Thread Thierry Boileau
Hi Alex, thanks for the details. Basically, the ClientResource needs a dedicated client inside its context (in a wide sense). When hosted by a Component, such Context (in the sense of instance of Context class or subclass) is provided by the Component itself (it is a ComponentContext), which at

Re: Gwt 2.4 + restlet2.1RC2 return null

2012-02-29 Thread Thierry Boileau
Hello Gabriel, I think this is due to the constraint called Same origin policy (cf http://en.wikipedia.org/wiki/Same_origin_policy). Your web pages are served on localhost with port , which is considered as distinct of your Rest backend listening on port 8112. That does not means that you

RE: Re: Using MetadataService to specify the default media type

2012-02-29 Thread Thierry Boileau
Hello all, by the way, we've just fixed a bug in the 2.1 branch and 2.2 trunk regarding the choice of the right annotated method, when handling request's entities (such as @Put, not @Get). Best regards, Thierry Boileau --

RE: concurrency problem with attributes in request

2012-02-29 Thread amir balaie
Anybody? Any Idea? Why nobody helps me? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2928120

RE: Re: Gwt 2.4 + restlet2.1RC2 return null

2012-02-29 Thread Gabriel Pulido
Hello Thierry, Thank you for pointing me to the correct direction. So I figure out that one of the solutions could be to deploy the restlet backend and the gwt on the same server and same port, however as you says, this could not be always true, as I would like that my restlet backend could