Re: How to access user:password in servlet

2009-11-23 Thread Thierry Boileau
Hello Macel, from what I see in the code, these data are not taken into account by HTTP. After having a look at the HTTP and URI specifications, it appears that HTTP relies on the definition of the host term ([1] and [2]) as specified in the URI spec ([3]) which does not take into account the

Re: Expires Header and Conditional GET with status Not Modified

2009-11-23 Thread Thierry Boileau
Hello, I think the client can stil send a conditional request according to its knowledge of the remote representation (its expiration time). If the server estimates that the representation needs to be refreshed, then it sends its back to the client. Otherwise, a 304 response is sent. best

Re: Newbie question about passing JSON object in a get request

2009-11-23 Thread Thierry Boileau
Hi, I also add that this sounds quite odd to send an object in the URI. If you intend to use a GET method in order to not get the state of a resource, you're surely missing something and going on a wrong way. Best regards, Thierry Boileau If you're passing the JSON object as part of the URL

Re: URI pattern handling

2009-11-23 Thread Thierry Boileau
Hello Vlatko, you can have a look at this page of the wiki [1] (for restlet 2.0), especially the paragraph Matching of template variables. It allows you define variables in the URI pattern that catch al kinds of characters. By doing so you can define two kinds of routes:

Re: Web Hooks

2009-11-23 Thread Thierry Boileau
Hello, can you elaborate a bit more? What are your needs? Best regards, Thierry Boileau how can i use Web Hooks with Restlet? Thank you. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2423271

Re: How to access user:password in servlet

2009-11-23 Thread Stephan Koops
Hi Marcel, do you tried to observer the TCP/IP traffic directly? Are the credentials available there? best regards Stephan Macel Ruff schrieb: Hi, I want to transfer user and password credentials: var loginName = jack; var password = 1122; var xhr = new XMLHttpRequest();

Setting Http Authorization header (part 2)

2009-11-23 Thread Alex Dobjanschi
Hello Jerome and all Restlet fans! I have spent my last 2 days trying to set the authorization header to a certain value, using the restlet gwt api. However, I was unsuccessful, so I started looking at the source code. You specifically said in the previous message that an authorization header is

Re: How to access user:password in servlet

2009-11-23 Thread Macel Ruff
Hi, thanks for taking care. As xMLHttpRequest.open(GET, link, async, loginName, password); explicitely supports it, I had assumed it is the standard Ajax way to transfer the credentials. But as it is send in clear text in the URL (and deprecated according to you links) I now prefer to send

RE: Default routing mode change

2009-11-23 Thread Jerome Louvel
Hi all, Thanks for the valuable design feed-back. This indirectly relates to the lack of usage of interfaces in the Restlet API and the pros/cons of this design choice. I think this is important to keep those concerns in mind and reevaluate them in the next major API version (3.0). I’ve

RE: DomRepresentation setIndent bug

2009-11-23 Thread Jerome Louvel
Hi Remi, Thanks for spotting this. I’ve applied your fix in SVN trunk. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com De :

RE: suggest jsonRepresentation update

2009-11-23 Thread Jerome Louvel
Hi Neel, It’s would be hard to support all the JSON libraries around. Another one we have in our radar is Jackson for its better JSON - Object serialization mechanism: “Add support for Jackson” http://restlet.tigris.org/issues/show_bug.cgi?id=812 How would JSON-Lib compare to our

RE: memory leak in JaxbRepresentation

2009-11-23 Thread Jerome Louvel
Hi Sid, I've just look at the code and don't see why it wouldn't GC if the parent request does GC. Could you share more details or investigate more? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~

RE: Restlet HANGS

2009-11-23 Thread Jerome Louvel
Hi Mohamed, You should try to monitor your JVM to see which thread is blocked and where. Something like a thread dump would help see the root of your problem. Which version of Restlet are you using, in which environment? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~

RE: New Book - 'Restful Java Web Services'

2009-11-23 Thread Jerome Louvel
Hi Suneel, Thanks for posting this news. This looks like a good reference to compare the various technologies available for RESTful dev in Java. Restlet coverage looks solid, looking at the table of contents. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~

RE: Examples of org.restlet.routing.Validator?

2009-11-23 Thread Jerome Louvel
Hi Ben, Not yet, but it is very straightforward. Actually this feature existed in Restlet 1.1 but was hidden in the Route class. Looking at the API again, I noticed an issue: the validate() method should be public instead of protected. This is fixed in SVN trunk. You just need to call this

RE: Validator : not required attribute and fails if not found

2009-11-23 Thread Jerome Louvel
Hi Laurent, This isn't correct indeed. I've fixed the behavior and added a test case as well (see attached) in SVN trunk. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message

Re: RestletGWTSimpleExample - Error while handling an HTTP client call

2009-11-23 Thread Thierry Boileau
Hello josef, sorry for the delay of my answer. I've successfully tested the application using the current snapshot. However, as I've refactored the sample code using the ClientResource, I suggest you get the sample zip I've just uploaded. It is available here:

RE: Re: Web Hooks

2009-11-23 Thread webpost
I have a client and a server. If an event happend on the server, i want to send a notification to the client. I don't want to poll the server. I don't want to use HTTP Push or Long Polling. information: http://webhooks.pbworks.com/ or http://webhooks.pbworks.com/RESTful-WebHooks

RE: Dependency injection in Restlet 2.0 with Guice

2009-11-23 Thread Jerome Louvel
Hi Tim and Harald, The goal and main value is see is to ensure the maximum portability of a Restlet Application from one deployment environment to another (JSE/standalone, JEE, GAE, etc.). GAE/J only provides HTTP listening through the Servlet API, so we have to use our Servlet/Restlet

RE: POST ignored in RESTlet 2.0Mx

2009-11-23 Thread Jerome Louvel
Hi Dustin, We did fixed a related issue in the recent past. I would encourage upgrading to the newly released Restlet 2.0 M6 version. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com

Client API for HTTP_DIGEST Auth in 2.0M6

2009-11-23 Thread webpost
I just migrated our client and server from 2.0m3 to 2.0M6. All of the changes were fairly easy to figure out except those related to adding ChallengeResponse for HTTP_DIGEST authentication. Our code was based upon the example in the user guide (which is still the example in today's version.

RE: Re: Expires Header and Conditional GET with status Not Modified

2009-11-23 Thread webpost
Hello, yes, i know. The behaviour, you described, works fine, but I want more. I want to send back always a Expires Header! If the client does a Conditional GET, the server can send back a new representation with a new Expires header OR say Not Modified without Expires header, but if i do not

RE : Client API for HTTP_DIGEST Auth in 2.0M6

2009-11-23 Thread Jerome Louvel
Hi Rich, You should add the org.restlet.ext.crypto.jar to your classpath. Cheers, Jérôme Le 23 nov. 2009, 7:20 PM, webp...@tigris.org a écrit : I just migrated our client and server from 2.0m3 to 2.0M6. All of the changes were fairly easy to figure out except those related to adding

RE: RE : Client API for HTTP_DIGEST Auth in 2.0M6

2009-11-23 Thread webpost
Jerome, Thanks for the reply. Unfortuanately, I already have org.restlet.ext.crypto.jar on my classpath. Do you have any other ideas? Thanks Rich Hi Rich, You should add the org.restlet.ext.crypto.jar to your classpath. Cheers, Jérôme Le 23 nov. 2009, 7:20 PM, webp...@tigris.org

Restlet 2.0 Best Practices

2009-11-23 Thread webpost
Hi, I am evaluating Restlet 2.0 vs. Spring 3.0 for a new project that is starting soon. I have done a lot of reading on the website and have written a couple of small programs with Restlet 2.0M6 to get the feel for it. I am looking to hear from people who have been using it into production

FirstResource Example - What is Item

2009-11-23 Thread webpost
From the FirstResource example I can't resolve 'Item'. Should this be specified from one of the imports? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2423562

Re: Dependency injection in Restlet 2.0 with Guice

2009-11-23 Thread Tim Peierls
I like how Harald extends Router to be injector-aware in order to avoid requiring the explicit use of FinderFactory. In fact, I have been experimenting with a Router extension that adds two more methods: public TemplateRoute attach(String pathTemplate, Class? extends ServerResource

Re: FirstResource Example - What is Item

2009-11-23 Thread Bruno Harbulot
Hello, I'm not sure where you got your examples from (perhaps there's a packaging error somewhere), but it's in the same package, in the subversion repository: http://restlet.tigris.org/source/browse/restlet/trunk/modules/org.restlet.example/src/org/restlet/example/firstResource/ Best wishes,

RE: Dependency injection in Restlet 2.0 with Guice

2009-11-23 Thread Leigh L. Klotz, Jr.
Sorry for joining in the middle and not paying attention. Do you mean a scope annotation on the Resource class itself? I have so far not seen a need for any scope other than the implicit request scope. We do make use of objects from other scopes from within Resources, but I believe you're not

Re: Dependency injection in Restlet 2.0 with Guice

2009-11-23 Thread Tim Peierls
I meant whether you would find it useful/necessary to be able to bind something in request scope and have it injected into your resources. An artificial example off the top of my head: // binding code bind(Scratchpad.class).in(RequestScoped.class); // Resource code public class MyResource

Re: Restlet 2.0 Best Practices

2009-11-23 Thread Ben R Vesco
1) What connector are you using with Restlet in production? Tomcat due to ops guys' familiarity with it. 2) How are you dealing with Caching on the server side? Hibernate managed cache. 3)  Are you finding that the Services / Data Access Layers in Standard Web Apps don’t apply in the