RE: Re: Multiple content types

2009-07-01 Thread Sherif Ahmed
)); getVariants().add(new Variant(MediaType.APPLICATION_JSON)); } Hi Sherif, .js is javascript .json is json :0) There is no need to add js or json to the MetadataService as it comes with a bunch of common ones already. Remove that line, and try http://localhost:8080

Last-Modified Header

2009-06-10 Thread Sherif Ahmed
I've been trying to add Last-Modified Header via the following code in a Filter afterHandle method Form responseHeaders = (Form) response.getAttributes().get(org.restlet.http.headers); if (responseHeaders == null) { responseHeaders = new Form();

RE: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
response or completely process the response. Ideas/Best Practices to accomplish this without having to get the HttpServletRequest/Response objects to do this would be great Hi Sherif, For custom headers whatever name you give, entity.modificationDate, will be used. However, what you

RE: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Brilliant.. The more I use Restlet the more I am liking it indeed. Now does Restlet has a framework to take care of Gzip encoding results when the Request headers indicate that the request is from a client that supports this encoding (all modern browsers do) I've been trying to add

RE: Re: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Cool, This works as you indicate. However implementing this way has a downside. Would be nice that the framework could take care of sending a 304 even without having to get a concrete Representation which has a date set. The idea is to avoid creating a Representation if the Resource has not

RE: Multiple content types

2009-06-08 Thread Sherif
in the HelloWorldResource is of MediaType.TEXT_PLAIN Thanks for Your help From: Jonathan Hall (via Nabble) [mailto:ml-user+125526-1692215...@n2.nabble.com] Sent: Friday, June 05, 2009 1:29 PM To: Sherif Subject: Re: Multiple content types Have a look at http://www.restlet.org