Dec 10

This error occurs because the File Protocol has not been added to your Restlet Component.

How to add a Protocol to your Restlet application using Spring is explained here.

written by objects \\ tags: , ,

Dec 10

To add a single Protocol you can set the client property of the Component to the required Protocol. For example to wire up a Component and add the file:// protocol you would use the following.

   <bean id="component" class="org.restlet.ext.spring.SpringComponent">
      <property name="server">
         <bean class="org.restlet.ext.spring.SpringServer">
            <constructor-arg value="http" />
            <constructor-arg value="8080" />
      <property name="client">
         <util:constant static-field=""/>
      <property name="defaultTarget" ref="router" />

written by objects \\ tags: , ,

Dec 07

There is a problem with the embedded Tomcat server used by GWT in Hosted Mode resulting in the status code in the response always being 200, and the location reference being null.

To workaround this bug you need to add a dummy entity to the response on the server side. This ensures the correct status code and location are received by the client.

On the server side:

getResponse().setStatus(Status.SUCCESS_CREATED, "Widget added");

// add the following workaround
   new StringRepresentation(

written by objects \\ tags: , , , ,