RE: How to Force URL Encoding Before URI Matching?

2010-11-12 Thread Thierry Boileau
Hello, one way is to filter the incoming requests. You can place a filter before the router which aims at updating the URLs. For example, when configuring an subclass of Application: public Restlet createInboundRoot() { Router router = new Router(getContext()); Filter filter = new

GWT Serialization problem

2010-11-12 Thread webpost
Hi, I'm having problems following the First application example in http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet/version/live. There seems to be something going wrong with the GWT serialization of the Contact object on the server. I can see the GET request

RE: Using GWT extension takes over the content negotiation!

2010-11-12 Thread webpost
Ok, I don't know if this is idiomatic Restlet, but I solved the issue by doing this: @Override public Restlet createInboundRoot() { getMetadataService().addExtension(x-java-serialized-object+gwt, MediaType.APPLICATION_JAVA_OBJECT_GWT); ... And annotating the

RE: Re: setStatus() 500 error with newline in description

2010-11-12 Thread webpost
Thank you for your help Stephan! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2681134

RE: GWT Serialization problem

2010-11-12 Thread webpost
Sorry, duplicate of http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2681028 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2681263

RE: Using GWT extension takes over the content negotiation!

2010-11-12 Thread Thierry Boileau
Hello, you can do a little bit shorter getMetadataService()​.addExtension(​gwt, MediaType.APPLICATIO​N_JAVA_OBJECT_GWT); and @Get(xml|gwt) However, this sounds like a bug. When requesting the xml variant you should be returned an XML representation. Could you make a try with the 2.0.3 release?

POST method not working (Error 405)

2010-11-12 Thread webpost
I'm trying to submit a post request and have the current @Post annotation set in my handler class on the server. I'm getting an error 405 returned though stating that this method isn't allowed. Is the annotation the only thing I have to set or am I missing something? I'm using the post

Re: Serving static files via CLAP protocol

2010-11-12 Thread Thierry Boileau
Hello Alex, the main message is the following: WARNING: The protocol used by this request is not declared in the list of client connectors. (CLAP) A component declares a list of server (such as HTTP) and client connectors (could be HTTP, CLAP, FILE, etc) which are used by the hosted

HTTP POST - error 405 Method not allowed

2010-11-12 Thread webpost
I'm trying to submit a post request and have the current @Post annotation set in my handler class on the server. I'm getting an error 405 returned though stating that this method isn't allowed. Is the annotation the only thing I have to set or am I missing something? I'm using the post

RE: POST method not working (Error 405)

2010-11-12 Thread Thierry Boileau
Hello, could you give a little bit more details? What kind of client are you using, do you use some extensions of the Restlet framework? Best regards, Thierry Boileau --

RE: POST method not working (Error 405)

2010-11-12 Thread webpost
Here is a snippet of the client code: ... final Representation rep = form.getWebRepresentation(); ClientResource householdResource = new ClientResource(http://localhost:8080/REST/household;); final Representation representation = householdResource.post(rep); ... The code on the server looks

Error when posting to webapp running on 2.1MS1

2010-11-12 Thread webpost
I get this exception when trying to send a message: SEVERE: Allocate exception for servlet RestletServlet java.lang.ClassNotFoundException: org.restlet.engine.http.ServerCall at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at

Jax-RS POST MediaType.MULTIPART_FORM_DATA Problem

2010-11-12 Thread Simon Temple
Method arguments set with @FormParam are always null I'm using 2.0.3 My jax-rs resource code looks like this: @POST @Consumes( javax.ws.rs.core.MediaType.MULTIPART_FORM_DATA ) @Produces( javax.ws.rs.core.MediaType.TEXT_HTML ) public Response setAsMultiPartFormData( @FormParam(

RE: POST method not working (Error 405)

2010-11-12 Thread webpost
FIXED the error by doing this: It seems my annotations aren't being picked for some reason so in the constructor for my resource handler I have added this code. // Declare the kind of representations supported by this resource. final SetMethod allowedMethods = new HashSetMethod();

Re: Best way to get automatic JavaScript minification in Restlet

2010-11-12 Thread Tim Peierls
I just filed issue 1198 which has one file Java program that demonstrates the problem. http://restlet.tigris.org/issues/show_bug.cgi?id=1198 http://restlet.tigris.org/issues/show_bug.cgi?id=1198--tim On Mon, Nov 8, 2010 at 9:03 PM, Tim Peierls t...@peierls.net wrote: On Wed, Jul 28, 2010 at

RE: Jax-RS POST MediaType.MULTIPART_FORM_DATA Problem

2010-11-12 Thread Simon Temple
I tried adding breakpoints to the internal providers: org.restlet.ext.jaxrs.internal.provider.MultipartProvider org.restlet.ext.jaxrs.internal.provider.FileUploadProvider They don't get called. When ParameterList$FormParamGetter.getParamValue() is called to get the form values it returns null.