Re: setting a status description never shows up in the response?

2008-03-06 Thread Jeff Brekke
Thanks for the reply. I've create a maven 2 project with a test to show the problem. I've uploaded the project and opened issue #458. http://restlet.tigris.org/issues/show_bug.cgi?id=458 I listed it under the jetty connector, but the servlet one seems wrong as well.

Re: Trouble with serving static files when using Tomcat.

2008-03-06 Thread Rob Heittman
Hi Rob, That code looks sane to me in principle. Just a thought, are you supplying the real full filesystem path to LocalReference.createFileReference("/path_to/imgdir/")? Using paths relative to your webapp root won't work ... You probably don't actually need the trailing slash in component.get

Re: restlet + spring --- managed resources

2008-03-06 Thread keke
If you like Groovy, you might would like to give a try at GroovyRestlet's Spring Integration feature. For detail information see here http://groovy.codehaus.org/GroovyRestlet On Thu, Mar 6, 2008 at 10:47 PM, Brian Donnovan <[EMAIL PROTECTED]> wrote: > Hi everyone, > i´m trying to setup restlet w

Trouble with serving static files when using Tomcat.

2008-03-06 Thread Robert Bruggner
Hi All, I'm having a little trouble getting my restlet application to serve static files (files and directories) when deploying via Tomcat and was wondering if anyone had any suggestions (I'm a bit of a newbie too - please bear with me). I've created an Application class (myApplication) that ex

Re: Yes, Virginia, REST *is* "stateless" (was: Session)

2008-03-06 Thread William Pietri
John D. Mitchell wrote: A better way, IME, to think of this stuff is using the notion of "proposals" but we're now fully divorced from anything Restlet specific so I'll shut up now. Please don't! Getting people to adopt a framework with a different paradigm requires making it easy for the

Shut down a Restlet server using kill?

2008-03-06 Thread Aaron Crow
Is it ok to shut down a Restlet server using Unix kill? What does Restlet do in this case? And does anyone have any good advice on what the application code might do to handle this event properly?

Re: Issue 428 ("POST seems to throw a 500 error code")

2008-03-06 Thread Aaron Crow
Hi Jerome, Thanks! This worked for me (got rid of the Stream Closed INFOs on every request): org.restlet.Component.level=WARNING Currently using 1.0.7. Will consider upgrading. Yes, I think the organization of the Logger could be better in this case. Just thinking that it seemed very natural

Re: Detecting requested variant based upon file extension

2008-03-06 Thread Thierry Boileau
Hi Chuck, These setters have been introduced in Restlet 1.1: http://www.restlet.org/documentation/1.1/api/org/restlet/data/ClientInfo.html Restlet 1.0 allows you to handle the set directly: - request.getClientInfo.getAcceptedMediaTypes().add(...) - request.getClientInfo.getAcceptedMediaTypes().c

Re: Detecting requested variant based upon file extension

2008-03-06 Thread Chuck Mortimore
> I think you mean request.getClientInfo.setAcceptedMediaTypes(...) and > request.getClientInfo.setAcceptedLanguages(...) . > > Let me now, if you are ready; I need this filter also. I don't actually see that setter in the API. Any other advise? http://www.restlet.org/documentation/1.0/api/

Re: Streaming multiple large data files through Restlet

2008-03-06 Thread Adam Rosien
I've just used the Jetty Restlet extension, which I believe uses Jetty 6.1. I'm not sure about the internals of the NIO mappings though. The new Grizzly server in 1.1 may be more appropriate for NIO. Truthfully I've only used InputRepresentation connected to a stream that is reading/writing to ou

Re: Streaming multiple large data files through Restlet

2008-03-06 Thread Jon Blower
Thanks Adam, Do you need to use a particular version of Jetty to support NIO? I'm hazy on Jetty details, but do I understand correctly that if you use NIO then you won't use Jetty's servlet framework but you'll access Jetty at a lower level? Good news that you've achieved good scalability. Did

Re: restlet + spring --- managed resources

2008-03-06 Thread Rhett Sutphin
Hi Brian, On Mar 6, 2008, at 10:04 AM, Brian Donnovan wrote: thanks for the hint, i will try it that way! just one thing, i looked at the springresource class and it seems to not have much in common with the original resource class. the great thing of the resource class were the hooks for ge

Re: Streaming multiple large data files through Restlet

2008-03-06 Thread Adam Rosien
At Sharpcast we use Restlet+Jetty as a front-end for our storage platform and found it to be quite scalable. The basic technique is to wrap your generated data into a Representation (for example, as a ChannelRepresentation for NIO or InputRepresentation for an InputStream) and return it from your

Re: restlet + spring --- managed resources

2008-03-06 Thread Brian Donnovan
Florian Schwarz tngtech.com> writes: > > Hi Brian, > > you can manage Restlets and (Restlet-) resources with the > org.restlet.ext.spring extension in a spring context. Use this classes > (SpringComponent, SpringResource ...) as your base classes and it is > simple to configure them with Spr

Re: restlet + spring --- managed resources

2008-03-06 Thread Florian Schwarz
Hi Brian, you can manage Restlets and (Restlet-) resources with the org.restlet.ext.spring extension in a spring context. Use this classes (SpringComponent, SpringResource ...) as your base classes and it is simple to configure them with Spring and use it's dependency injection mechanisms.

Streaming multiple large data files through Restlet

2008-03-06 Thread Jon Blower
Dear all, We have an existing RESTful web application that involves clients downloading multiple streams of data simultaneously. Our current implementation is based on servlets and we are experiencing scalability problems with the number of threads involved in serving multiple large data streams

restlet + spring --- managed resources

2008-03-06 Thread Brian Donnovan
Hi everyone, i´m trying to setup restlet with spring, i´m wondering, what is the best practise with restlet resources? from my resource (eg. UserResource) í try to retrieve the requested data from a db, so what i´m trying to figure out is, whether its possible to manage the resources in spring cont

Yes, Virginia, REST *is* "stateless" (was: Session)

2008-03-06 Thread John D. Mitchell
On Wed, Mar 5, 2008 at 11:52 PM, Jahid <[EMAIL PROTECTED]> wrote: [...] > Actually in other words, RESTlet is not really stateless, You mean "REST" there, not "Restlet", I presume. REST *is* "stateless" -- it's just that Dr. Roy is using that word in a very specific meaning. The fundamental not

Re: Session

2008-03-06 Thread Rob Heittman
Hi Jahid, Perhaps you could describe your use case, so that the list could suggest approaches that might best leverage the Restlet library and the REST architectural style. - Rob On Thu, Mar 6, 2008 at 2:52 AM, Jahid <[EMAIL PROTECTED]> wrote: > So, > > Actually in other words, RESTlet is not r

jar protocol implementation?

2008-03-06 Thread Bruno Dumon
Hi, I'm trying to use the JAR protocol with the Restlet client API, but it seems there is no implementation available for this protocol. Am I overlooking something? TIA -- Bruno Dumon http://outerthought.org/ Outerthoughthttp://www.daisycm

RE: Problem with Override annotation in tutorial examples

2008-03-06 Thread Jerome Louvel
Hi Marcus, You are welcome. Thanks for following up with the solution. It might help other users facing similar issues. Best regards, Jerome > -Message d'origine- > De : news [mailto:[EMAIL PROTECTED] De la part de Marcus > Envoyé : jeudi 6 mars 2008 05:19 > À : discuss@restlet.tigris

RE: first send headers, than create message body?

2008-03-06 Thread Jerome Louvel
Stephan, I think this is the same design mistake that was made by the Servlet API. Let me have a look at the related EG discussion. Best regards, Jerome > -Message d'origine- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 6 mars 2008 10:30 > À : discuss@restlet.t

Re: Detecting requested variant based upon file extension

2008-03-06 Thread Thierry Boileau
Hi Chuck, I send you a sample code where a resource generates a representation according to the file extension. It doesn't rely on a Filter, but seems to work. the code illustrate 2 cases, the first one where the Resource knows the mappings between extensions and metadata, the second one where the

RE: Issue 428 ("POST seems to throw a 500 error code")

2008-03-06 Thread Jerome Louvel
Hi Aaron, We still use Simple in production even though we are planning to move to the Grizzly connector soon. Are you using the latest version (1.0.8 or 1.1 M2)? We have reduced the level of some Simple log messages. Now regarding the logger, it appears the SimpleProtocolHandler uses the Serve

Re: first send headers, than create message body?

2008-03-06 Thread Stephan Koops
Hello Jerome, yes, I know this way and using it. But for this case the JAX-RS proposal requires, that it is possible to create the http headers and the body in *the same* method. public void methodname(StreamingOutput so, ...) { Response jaxRsResponse = ... // create response headers.

RE: first send headers, than create message body?

2008-03-06 Thread Jerome Louvel
Hi Stephan, > is it possible to code in Restlet, that I create a message > head, than start to send it and afterwoods start to create > the entity data (the message body) in one method, without > creating a new Representation subclass that does it? > I think not, or does I miss something? Thi

Re: How to use JSONP in Restlet?

2008-03-06 Thread cleverpig
thanks! I got it! This link is more detail than before: Implement JSONP in your Asp.net Application: http://weblogs.asp.net/rashid/archive/2007/09/28/implement-jsonp-in-your-asp-net-application.aspx I implemented it with Restlet and json.ext. On Wed, Mar 5, 2008 at 5:50 PM, Jerome Louvel <[EMAIL P

Re: Detecting requested variant based upon file extension

2008-03-06 Thread Stephan Koops
Hello Chuck, Thanks - I'll crank out a filter. One quick question...it's clear to me how I'd get the extension, and how to lookup the metadata, but it's not clear how to propagate that to the resource. How do I properly set the variant. I think you mean request.getClientInfo.setAcceptedMediaTy

Re: Detecting requested variant based upon file extension

2008-03-06 Thread Thierry Boileau
Hello Chuck, if you are serving static files, you should use the Directory Restlet and customize the MetadataService service of your application. Let me complete the answer later if you intend to serve your file dynamically. best regards, Thierry Boileau On Thu, Mar 6, 2008 at 2:53 AM, Chuck Mo