GWT-Cryto library

2008-12-22 Thread Xavier M.
Hello, Just a post to make notice of the GWT-Crypto library. It is a quite old (one year old)) project which enables crypto on the client side, actually on a GWT client. I wonder if this could not be useful for the restlets project for securing data transfer between client and server along the othe

Router class not matching a URI with corresponding Template correctly

2008-12-22 Thread prashantideal
Hi All, I am new to Restlets even after working for around last 8 months on restlets. :-) I am facing a problem with my application. Description is as follows: In my application class I have two REST URIs as given below: (1st) "/language/{var1}/{var2}/" (2nd) "/language/{var1}/{var2}/java/"

Re: securing Restlet

2008-12-22 Thread Stephan Koops
Ho Rhett, but doesn't the current Guard implementation obviate the need for both sessions and cookies, and yet provide us with basic authentication? if yes, then a solution for providing customizable form-based login could be to extend its capabilities to allow

Re: GWT-Cryto library

2008-12-22 Thread Stephan Koops
Hi Xavier, what's the adventage against HTTPS? best regards Stephan Xavier M. schrieb: > Hello, > Just a post to make notice of the GWT-Crypto library. It is a quite > old (one year old)) project which enables crypto on the client side, > actually on a GWT client. I wonder if this could not

Re: How to open a writer against the client

2008-12-22 Thread Stephan Koops
Hi Ido, you could subclass the clas org.restlet.resource.OutputRepresentation and implement the method write(OutputStream). In this method you put your data into the OutputStream. If you want to copy from another InputStream, you could use the method org.restlet.util.ByteUtil.write(InputStream,

Re: GWT-Cryto library

2008-12-22 Thread Xavier Méhaut
to crypt only part of data when not on a https connection 2008/12/22 Stephan Koops > Hi Xavier, > > what's the adventage against HTTPS? > > best regards > Stephan > > Xavier M. schrieb: > > Hello, > > Just a post to make notice of the GWT-Crypto library. It is a quite > > old (one year old)) pr

Restlet 1.1 HTTP digest support

2008-12-22 Thread vidya vadke
Hi all, Can anyone tell me whether restlet 1.1 supports HTTPS digest? If yes, it would be really great to get a pointer to a simple example. Thanks, -Vidya -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=989570

Re: Router class not matching a URI with corresponding Template correctly

2008-12-22 Thread Thierry Boileau
prashantid...@gmail.com a écrit : > Hi All, > > I am new to Restlets even after working for around last 8 months on restlets. > :-) > > I am facing a problem with my application. > > Description is as follows: > > In my application class I have two REST URIs as given below: > > (1st) "/language/{v

RE: Re: Router class not matching a URI with corresponding Template correctly

2008-12-22 Thread prashantideal
Hi thboileau, Did you reply for my question? I could not see any thing different than my original question. Thanks Prashant > prashantid...@gmail.com a écrit : > > Hi All, > > > > I am new to Restlets even after working for around last 8 months on > > restlets. :-) > > > > I am facing a proble

Re: Router class not matching a URI with corresponding Template correctly

2008-12-22 Thread Thierry Boileau
Hello prashant, you can specify the type of a single variable as follow: Route route = router.attach("/language/{var1}/{var2}/", restlet1); route.getTemplate().getVariables().put("var1", new Variable(Variable.TYPE_ALPHA)); I also send you a sample application that illustrates this. best regard

Re: how to redirect to another resource?

2008-12-22 Thread Thierry Boileau
Hello renfeng, did you try to call the following methods on the request object? - request.getResourceRef().getBaseRef() - request.getHostRef() - request.getRootRef() Otherwise, you can get the servletContext by casting the context: ServletContextAdapter c = (ServletContextAdapter) cont

Re: How to open a writer against the client

2008-12-22 Thread Thierry Boileau
Hello Ido, what kind of representation were you using? a FileRepresentation? best regards, Thierry Boileau > Hello Everyone, > > I have a problem: I need to send as a response to the client a big XML file - > can be even more than 30MB. > > What I need, I suppose, is to open an output writer and

Re: Restlet 1.1 HTTP digest support

2008-12-22 Thread Thierry Boileau
Hello Vidya, you can have a look at this page of the wiki: http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/46-restlet/112-restlet.html which is accessible from the documentation page of the Restlet 1.1 release on the Restlet web site (http://www.restlet.org/documentation/1.1/ and follow

Re: a question about resolving urls for resources.

2008-12-22 Thread Thierry Boileau
Hello Antonio, just to complete Michael's answer. You seem to define 4 distincts resources (I mean subclass of org.restlet.Resource) as follow: - MailListResource attached to "mail_list" uri pattern - MailResource attached to ... - MailAttachmentListResource attached to ... - MailAttachmentRe

Response message before redirection

2008-12-22 Thread Mohamed Abdel-Aziz Bayoumi
Hello Dear Developers, I'm developing a simple Restlets application that allows users to upload files, which i process then provide them with links to download the output processed files... I'm using a main Restlet that is an HTTP representation including a form for upload and a summary table with

Re: securing Restlet

2008-12-22 Thread Rhett Sutphin
Hi Stephan, On Dec 22, 2008, at 3:20 AM, Stephan Koops wrote: > Ho Rhett, > but doesn't the current Guard implementation obviate the need for > both > sessions and cookies, and yet provide us with basic > authentication? > if yes, > then a solution for providing customiz

Re: securing Restlet

2008-12-22 Thread Stephan Koops
Hi Rhett, > > There is a way, but HTML and HTTP is not enough: You need JavaScript > > to send a XMLHttpRequest. But you can't use http state 401 for > > return, because the browser should prompt (search for "401" on > > http://www.w3.org/TR/XMLHttpRequest/) > > for the users credentials, a

Re: securing Restlet

2008-12-22 Thread Stephan Koops
Hi Rémi, cool. Jerome, Thierry: Could we add it to the code base, if the security is refactored? best regards Stephan > I have made a cookie authentication for restlet. > > Here is the code. Few things might not be clean but it works quite > fine. > > I hope it helps. > > Rémi __

Re: securing Restlet

2008-12-22 Thread Rhett Sutphin
Hi Stephan, On Dec 22, 2008, at 12:02 PM, Stephan Koops wrote: > Hi Rhett, > >>> There is a way, but HTML and HTTP is not enough: You need JavaScript >>> to send a XMLHttpRequest. But you can't use http state 401 for >>> return, because the browser should prompt (search for "401" on >>> http://w

Re: securing Restlet

2008-12-22 Thread Rob Heittman
Hi Rhett, Depending on the browser (I forget which ones exactly) you can sometimes push empty credentials into an XmlHttpRequest to effectively log out the user. But now, we are far down the path of horrible hacks :-) The caching of HTTP Basic credentials into XmlHttpRequest is inconsistently i

Re: securing Restlet

2008-12-22 Thread Stephan Koops
Hi Rhett, > Oh, so when you pass credentials using XmlHttpRequest, the browser > automatically caches them? That's cool. I didn't know that worked. > I guess this has the same downside as normal browser-based > authentication, then -- it's impossible to log out without quitting > the bro

question about spring example and uri extension parsing/best practices.

2008-12-22 Thread matt
Hi there Firstly I love restlet and much thanks to the people who work on it and i have been able to get up to speed really quickly. I have two questions. One is where to find a complete example of the spring-restlet integration. I tried the cvs repo on the wiki and for some reason could never

RE: Re: Router class not matching a URI with corresponding Template correctly

2008-12-22 Thread prashantideal
Hi Thierry, Thank you very much for your response. Whatever you explained its fine. But problem in my application is, I have to write code to match the incoming formatted URI with a template(stored in a collection). I am using Template.match(String) method in my code to match formatted URI with