Re: Spring context and Resource

2007-02-26 Thread Jonathan Hall
: RE: Spring context and Resource Hi all, Thanks for the discussion. I've added a SpringFinder class into the Spring extension package with the Javadocs based on solution 2. Best regards, Jerome -Message d'origine- De : Jonathan Hall [mailto:[EMAIL PROTECTED] Envoyé : samedi 24

Filter chaining

2007-03-05 Thread Jonathan Hall
Hi, What is the solution for filtering particularly when using Spring and still using the Restlet approach? After looking at the API and examples, I can't seem to find one. At the minute, it seems it relies on setting setNext, which is not ideal. !-- Maps the URI (entry key) to Resources

Re: Filter chaining

2007-03-05 Thread Jonathan Hall
could attach your Router to your last Filter in the chain, then normally attach the Resources to the Router. Best regards, Jerome -Message d'origine- De : Jonathan Hall [mailto:[EMAIL PROTECTED] Envoyé : lundi 5 mars 2007 11:38 À : discuss@restlet.tigris.org Objet : Filter

Servlet Context

2007-03-06 Thread Jonathan Hall
Hi, I was wondering if a way to access the ServletContext could be added to the code. This would be useful for Spring and I presume other IoC frameworks. It would not tie Restlet to any other libraries or harm it as far as I can see. As per shloks example, it would require changes to

Re: Servlet Context

2007-03-07 Thread Jonathan Hall
param-value /WEB-INF/resources.xml /param-value /context-param and the previous code. This seems to be a popular way to load Spring Contexts. Just a thought. Cheers, Jonathan Hall Jerome Louvel wrote: Hi Jonathan, For this use case, couldn't you leverage the SpringContext

StackOverflowError

2007-03-08 Thread Jonathan Hall
Hi, Just before I start to debug. Has anyone load tested an application yet? I'm getting StackOverflowError on 1.0rc5: Happens after about 1k requests on 1.6. SEVERE: Unhandled exception or error intercepted java.lang.StackOverflowError at

Re: StackOverflowError

2007-03-09 Thread Jonathan Hall
Hi Piyush, Seems a sneaky start() in the handle method of the demo at http://www.restlet.org/downloads/restlet-1.0rc1.zip was the critter. Running very nice now :) Best Regards, Jonathan Piyush Purang wrote: Perhaps this helps? http://63.246.22.60/browse/CONF-7573 On 3/8/07, *Jonathan

Re: New Restlet web site

2007-03-09 Thread Jonathan Hall
Under DocumentationLearnExamples link to the wiki examples Demo app to run stats on, for the blog wars. (joke) (Tables for layout are naughty mmkay) Congrats, Jonathan Hall Jerome Louvel wrote: Hi again, Thierry Boileau and I are very happy to roll out a fully redesigned web site. We looking

HttpRequest not retreiving a custom entity

2007-05-07 Thread Jonathan Hall
()).getRequestEntity()); this.entityAdded = true; } return super.getEntity(); } Is it possible to modify the code or allow an accessor for entityAdded. Cheers, Jonathan Hall

Re: HttpRequest not retreiving a custom entity

2007-05-07 Thread Jonathan Hall
-Message d'origine- De : Jonathan Hall [mailto:[EMAIL PROTECTED] Envoyé : lundi 7 mai 2007 08:41 À : discuss@restlet.tigris.org Objet : HttpRequest not retreiving a custom entity Hi, I have a usecase where I want to replace the entity in a request. However this does not work due

Re: PUT example?

2007-05-10 Thread Jonathan Hall
, for put: @Override public boolean allowPut() { return true; } @Override public void put(Representation entity) { } Jonathan Hall

URI matching again

2007-06-08 Thread Jonathan Hall
Hi, Is it possible to do this: /user /user/{id} /user/list The problem comes from the app thinking list is just a {id} variable. I thought router.setRoutingMode(Router.FIRST) sounded like it would pick the route I wished by the order they were attached. In which case this would work:

Re: Easy Spring Integration with Restlet

2007-07-19 Thread Jonathan Hall
find it works well and that spring extensions do satisfy my needs (even though they need some tweaking). Best regaards, Jonathan Hall Valdis Rigdon wrote: Adam Taft wrote: Ultimately, no matter how we get there, Resource needs to be a stateless in order to work well with Ioc. Having used

Re: JSP to generate Representation

2007-07-20 Thread Jonathan Hall
Niice :) I'd be interested in using this. Jonathan Hall Michael Terrington wrote: Hi Leigh, I've ported facelets to run without JSF and integrated with Restlet for generating representations. JSTL core is supported by that so it may deliver what you want. Take a look at http

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Hi, try something like: ClientInfo clientInfo = new ClientInfo(); clientInfo.setAcceptedMediaTypes(new ArrayListPreferenceMediaType().); clientInfo.getAcceptedMediaTypes().add(new PreferenceMediaType(MediaType.APPLICATION_JAVA_OBJECT)); request.setClientInfo(clientInfo); jon Stanczak Group

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Whoops, clientInfo.setAcceptedMediaTypes(new ArrayListPreferenceMediaType().); should be: clientInfo.setAcceptedMediaTypes(new ArrayListPreferenceMediaType()); Jonathan Hall wrote: Hi, try something like: ClientInfo clientInfo = new ClientInfo(); clientInfo.setAcceptedMediaTypes(new

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
. Bleeding edge and all that :0) Stanczak Group wrote: I don't have a request.setClientInfo() in my request object. Do I have an older version? I'm using 1.0.4. Jonathan Hall wrote: Whoops, clientInfo.setAcceptedMediaTypes(new ArrayListPreferenceMediaType().); should

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
are in the request.getClientInfo().getAcceptedMediaTypes() are set and remove them accordingly. Stanczak Group wrote: So how do I use 1.0 to get objects? Jonathan Hall wrote: Ah, I am running from http://www.restlet.org/downloads/archives/1.1/ Jerome wrote: Now that the 1.0 code base seems to be quite stable

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
(MediaType.TEXT_PLAIN)) { result = new StringRepresentation(Testing); } Stanczak Group wrote: Should I even be using object? Stanczak Group wrote: So how do I use 1.0 to get objects? Jonathan Hall wrote: Ah, I am running from http://www.restlet.org/downloads/archives/1.1/ Jerome

Re: Vacations

2007-08-22 Thread Jonathan Hall
Congratulations, hope you have a great wedding and honeymoon. Jerome Louvel wrote: Dear Restlet community, I'll be offline until the 11th of September for my wedding and a few weeks of vacations. Happy coding and discussions on Restlet. The perspectives of the project have never been so

Re: Why use SpringContext?

2007-08-23 Thread Jonathan Hall
org.restlet.ext.spring_2.0 has SpringFinder. So it's a case of : bean id=my class=org.restlet.ext.spring.SpringFinder lookup-method name=createResource bean=myResource/ /bean bean id=myResource class=com.blah.myResource scope=prototype/ I use restlet via a servlet, I have to

Re: tunnelFilter in tomcat container - how ???

2007-08-23 Thread Jonathan Hall
As a quicky, Instead of Form form = new Form(entity); What about Form form = getRequest().getEntityAsForm(); Just wondering if new Form(entity) is buggy. regis regis wrote: I made some new progress, this error error is thrown when the entity object is not available entity.isAvailable()

Re: tunnelFilter in tomcat container - how ???

2007-08-24 Thread Jonathan Hall
Hi regis, Your previous zip looks a bit involved to be honest. Pull everything out (spring, hibernate, everthing,etc) anything that isn't realted to your problem, and build the most simple testcase you can. I'm really busy at the moment but I'll do my best to try to help :) Jon regis regis

Re: Sax Server Examples?

2007-08-24 Thread Jonathan Hall
Hey Justin, this is pretty much a new api., and as such is growing. I'm really enjoying using it. But you need to give people more than six hours to answer a question. I do not presume to speak for most, but I feel most have working jobs and help purely out of community spirit. If you need a

Re: Bad implementation of Status error checking

2008-01-16 Thread Jonathan Hall
... That, plus what Joshua Tuberville quoted from RFC 2616: ... applications MUST understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class Note the use of the word MUST. Hence,

Re: I had finished Using Ajax in Restlet draft,pls review

2008-02-13 Thread Jonathan Hall
step. You have linked the full source zip, so if needed, people can extract the full source from that. hope this helps, Jonathan Hall cleverpig wrote: I post this draft in wiki.restlet.org--Using AJAX in Restlet:http://wiki.restlet.org/docs_1.1/g1/43-restlet/52-restlet.html I will start

Confused with locale

2008-03-11 Thread Jonathan Hall
Hi, I've been looking at getting the preferred locale and I have a couple of questions. I see that getPreferredVariant() uses apaches content negotiation algorithm (http://httpd.apache.org/docs/2.2/en/content-negotiation.html#algorithm) which includes using the Accept-Language header:

Re: Confused with locale

2008-03-12 Thread Jonathan Hall
.); } // Update the representation metadata rep.setMediaType(variant.getMediaType()); rep.getLanguages().addAll(variant.getLanguages()); } return rep; } } * On Tue, Mar 11, 2008 at 7:11 PM, Jonathan Hall [EMAIL PROTECTED] wrote: Hi, I've been looking

Re: Confused with locale

2008-03-12 Thread Jonathan Hall
(ClientInfo, ListVariant, Language) On Wed, Mar 12, 2008 at 2:28 PM, Jonathan Hall [EMAIL PROTECTED] wrote: Hi Thierry, Say I had the client send multiple languages: Accept-Language: en-gb,fr;q=0.7,en;q=0.3 If using a variant with multiple languages, the code given wouldn't satisfy

Re: Confused with locale

2008-03-13 Thread Jonathan Hall
On Wed, Mar 12, 2008 at 6:54 PM, Jonathan Hall [EMAIL PROTECTED] wrote: Thanks for the reply Thierry. Ah I see, you can only have one language per variant. I was in a different mindset adding multiple languages per variant. So, with one language per variant am I correct in thinking

Re: Context param with Directory in Spring

2008-03-14 Thread Jonathan Hall
Sorry, I forgot to say I use the maven 1.1 snapshot Jonathan Hall wrote: Hi, I'm trying to serve static files using Directory in a Spring way, but I have a problem when it comes to the Context param. In http://restlet.tigris.org/issues/show_bug.cgi?id=334 Jerome wrote: Directory and other

Re: Request for an Object

2008-03-14 Thread Jonathan Hall
Hi Justin, If I understand you, you want to return html,text and an object for a resource? Simplest form public class MyResource extends Resource { public MyResource(Context context, Request request, Response response) { super(context, request, response);

Re: Context param with Directory in Spring

2008-03-15 Thread Jonathan Hall
. Are there Spring experts reading? Best regards, Jerome -Message d'origine- De : Jonathan Hall [mailto:[EMAIL PROTECTED] Envoyé : vendredi 14 mars 2008 21:09 À : discuss@restlet.tigris.org Objet : Context param with Directory in Spring Hi, I'm trying to serve static files using

Any OSGi + Restlet examples?

2008-05-20 Thread Jonathan Hall
Can anyone tell me the state of OSGi in Restlet? I've not used OSGi before but I am interested in having a fiddle. I notice 1.1M4 says there is greater support, but I don't have a clue how to start. I'd be grateful for any examples, tutorials or a push in the right direction. Jon

Re: Guice and 1.1m5

2008-08-14 Thread Jonathan Hall
Maybe down to: Important Context Changes dated 29/07/2008 - the Context instance given to an application (or any Restlet actually) will be the one effectively used. If parameters are set, they will be directly and permanently accessible. If none is given, a null context will be returned by

Re: bad experience with restlets

2008-09-19 Thread Jonathan Hall
Some thoughts on the docs. The wiki's menu is a mass of expanded links and most are todos with noway of knowing, without clicking every single one, that they have content. It is truly awful to navigate. Should developer notes really be kept on the wiki? eg

EJB 3

2008-10-18 Thread Jonathan Hall
Hi, I'm evaluating my current stack and am interested using EJB3. Naturally, I still want to use restlet :). If anyone is doing this, I'd be grateful if you shared your setup and any issues you've run across. thanks, Jon

Re: which is better way for web application using RESTlet?

2008-11-14 Thread Jonathan Hall
re OSGi, I found that I had to battle with the infancy of running in an OSGi environment far more than being productive. I'd consider waiting until things stabilise a bit more. Mileage varies of course. If you do consider that route, S2AP (might have rebranded) from the spring folks helped a

Re: which is better way for web application using RESTlet?

2008-11-18 Thread Jonathan Hall
now ... I'd stick with either the Servlet or Standalone modes for production applications. I have been able to do some cool stuff with Restlet under Eclipse OSGi though -- nice to be able to swap plugins around the Restlet bits. On Fri, Nov 14, 2008 at 11:14 AM, Jonathan Hall [EMAIL PROTECTED

Re: Restlet 1.2 M2 released

2009-04-01 Thread Jonathan Hall
Excellent! I'm looking forward to seeing if the new Resource API simplifies development. Jerome Louvel wrote: Hi all, The second 1.2 milestone is out! A complete coverage is available in our blog: http://blog.noelios.com/2009/04/01/restlet-12-m2-released/

Re: Restlet 1.2 M2 released

2009-04-02 Thread Jonathan Hall
be quite happy to get your feed-back, positive or not :) Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Jonathan Hall [mailto:jonrh...@gmail.com] Envoyé

Re: Google AppEngine and Restlet

2009-04-10 Thread Jonathan Hall
This came up today on the GAE list, you may want to chime in when the adapation is done so people get the latest information: http://groups.google.com/group/google-appengine-java/browse_thread/thread/f601350cd8f4d385/c8dc407d77e5562d?lnk=gstq=rest#c8dc407d77e5562d ... You can also run Restlets

Re: Multiple content types

2009-06-08 Thread Jonathan Hall
/firstStepsServlet/Hello.js the Variant type in the HelloWorldResource is of MediaType.TEXT_PLAIN Thanks for Your help *From:* Jonathan Hall (via Nabble) [mailto:ml-user+125526-1692215...@... http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=3043073i=0] *Sent:* Friday, June 05, 2009 1:29

Re: Last-Modified Header

2009-06-10 Thread Jonathan Hall
Hi Sherif, For custom headers whatever name you give, entity.modificationDate, will be used. However, what you probably meant to do is use setModificationDate(new Date()) on the entity/response representation. ie. representation.setModificationDate(new Date()); Jon Sherif Ahmed wrote:

Re: Confusion with filter

2009-06-12 Thread Jonathan Hall
You should be returning securityFilter not the router. Then the securityFilter does it's thing and moves onto the next restlet chain (router) jon Marc Lerma wrote: I'm also confused about the use of filters. I'm trying to apply a security filter in order to check whether the user is

Re: Does Restlet support this kind of functionality?

2009-08-20 Thread Jonathan Hall
Hi, I haven't used them but I believe these are known as matrix uris and they are supported. See the Reference class and Form class. http://restlet.tigris.org/issues/show_bug.cgi?id=227 has more info on it. jon Johnson wrote: hi, in the Restful Web Service book, one feature was mentioned

TunnelService - additional tunnel for quirky browser accept headers

2009-12-15 Thread Jonathan Hall
I wish to propose another tunnel which is a bit more practical in dealing with browser Accept header quirks. At present, browsers implement the accept header oddly. to quote Jon Blower's recent email to the list: Firefox 3: Accept header is

Re: MIME Accept Type filter

2009-12-16 Thread Jonathan Hall
FYI I filed this bug to jQuery over a year ago http://dev.jquery.com/ticket/3408 jon Thierry Boileau wrote: Hi Andrzej could you use the dataType argument instead of the beforeSend one? $.ajax({type: 'GET', url: myUrl, success: onAjaxSuccess, error: onAjaxError,

Re: Many representation handling in a resource

2010-01-07 Thread Jonathan Hall
http://wiki.restlet.org/developers/172-restlet/226-restlet.html Xavier M. wrote: Hello, I would like to know if there is an exampel where in the same resource we can find for instance several @get methods with different kinds of representations. If so, we could provide for the same

Re: Accepted media type quality is always 1.0

2010-07-27 Thread Jonathan Hall
I've just upgraded to the latest snapshot and getVariants() is showing empty for anything but the internal connector. Related? http://restlet.tigris.org/issues/show_bug.cgi?id=1156 On 26/07/10 06:54, Christian Bauer wrote: It works with the built-in server connector but fails with the Simple

Re: 405 on unsupported media type

2010-08-27 Thread Jonathan Hall
I believe that's a 415. Jon On 27/08/10 19:33, Avi Flax wrote: Hi all, I'm using 2.0 jse. I've got a method that has this signature: @Post(form) public Representation accept(Form form) throws ResourceException { Everything generally works fine, but when I send a request with an

Deprecated Request.getEntityAsForm()

2010-09-10 Thread Jonathan Hall
Hi, I was wondering the reason why Request.getEntityAsForm() is now deprecated? I realise you can use getQuery() in a resource, but what about Filters, where that method doesn't exist. I can use new Form(getRequest().getEntity()), but it seems a step backward for such a common usecase. Jon

Re: Restlet Framework 2.0.1released

2010-09-13 Thread Jonathan Hall
Same issue here. On 09/09/10 15:24, Tal Liron wrote: Just a quick note on changed behavior I noticed in 2.0.1 -- If you throw a ResourceException that has a cause, the cause is now sent to the status service for processing into a new status. If you don't have explicit support for this,

Re: method not found 405 on multipart/form-data post?

2010-09-28 Thread Jonathan Hall
Hi Keith, This is all set in org.restlet.service.MetadataService. form is a MediaType.APPLICATION_WWW_FORM , which explains why the multipart is returning a 405. A multipart (MediaType.MULTIPART_FORM_DATA ) request doesn't seem to be in the MetadataService, so you could add your own. From

Re: method not found 405 on multipart/form-data post?

2010-10-01 Thread Jonathan Hall
Hi Keith, Glad you found a temp fix. I'm not sure what the problem is, the boundary should be fine. I tested it here with a multipart message and it works as expected (and shows the boundary info). Just to be sure, you are adding the extension to the current Application in use? I am using a