ServerResource#getInfo utility

2009-08-03 Thread webpost
Hi, I have read in the API that the default behavior of getInfo in ServerResource is to call the get method. But I have business code in the get and I don't want to call this code when the client make a POST, so I have overrided the getInfo to return null and that works (actually). But I

Content negotiation, is vriants list important ?

2009-08-03 Thread webpost
Hi everybody, I'm playing with Restlet's ServerResources and content negotiation with the code below who declare that my resources accepts text/xml and application/json. But what's happend if the Accept header allow these two variants ? It seems that Restlet use the first variant in the

GAE + DomRepresentation.getDocument = access denied

2009-08-03 Thread Olivier Bruchez
I'm using the GAE classes (version 2.0 Milestone 3 of Restlet). I have this line in my code: Document doc = (new DOMReader()).read(representation.getDocument()); where Document and DOMReader are from the org.dom4j package. The problem here is that getDocument() uses ByteUtils.getStream(),

RE: Re: ServerResource or Restlet

2009-08-03 Thread webpost
Hi, Hoo yes, thank you. You have clarified my question. Now, I have just to discover how to use ServerResource with Spring and how to easily map an URL http://server/restlet/form/{id}; to a FormResource with a given id. --

RE: Re: JAX RS ExceptionMappers by MessageBodyWriter

2009-08-03 Thread Nicolas Rinaudo
Ah, yes, very good point. I feel a bit silly now :) That's a bit of a pain, since it means that you have to manually check for the requested charset in each method that returns a Representation though. I liked the idea of just using the one specified in the request's media type and catching

Re: A simple URI problem -- followup

2009-08-03 Thread TKM
It is likely that my problem has to do with how I am defining my application in Tomcat. I'm not using a war file and in my server.xml file, i specify the default context Context path= docBase=myApplication debug=5 So, there is probably something that Tomcat is doing with a typical uri reference

RE: Philosophical question: is ServerResource a resource?

2009-08-03 Thread webpost
http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#tab_5_1 resource = the intended conceptual target of a hypertext reference and A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time. so yes

RE: Server.stop() hangs eternally after serving huge XML files

2009-08-03 Thread webpost
Im ran it using Grizzly and Restlet 1.2m2. Got some strange exceptions after stopping the client and server. expect to read 'successfull stop' 2009-jul-31 17:47:23 org.restlet.ext.grizzly.GrizzlyServerHelper start INFO: Starting the Grizzly [HTTP] server 2009-jul-31 17:47:23

Philosophical question: is ServerResource a resource?

2009-08-03 Thread webpost
Hi, First of all, let me assure that I really don't want to start a flame war ;-) My goal is just to have a better understand of REST and RESTLET. As I am delving into the REST world, which includes using RESTLET to have a concrete grasp on the concepts, I've been noticing that the question on

Restlet Filters before/after

2009-08-03 Thread Sanjay Acharya
If we define a filter say, class ExceptionThrowingFilter extends Filter { @Override protected void afterHandle(Request request, Response response) { System.out.println(After Processing requestI am never called); } } In the event of the RuntimeException is thrown in the