Re: using log4j

2006-11-02 Thread Vincent
Hi Jerome, > If you are not used to the new JDK's logging feature, I would first > recommend to try using it. It is very powerful. > I agree the jdk logger is powerful, but so is log4j. I personally prefer log4j over the standard logging API; one of the reasons is that I use log4j's SMTPAppende

Handlers for search urls

2006-11-02 Thread Vincent
Hi all, What would be the best approach to attach a handler to search urls (i.e. urls of the form '/accounts?balance_less_than=1')? My first attempt was to attach the handler to "/accounts\\?[.]+", but this doesn't work as the pattern matching is done on request.getRelativePart() ('/accounts'

Re: New snapshot of beta 20

2006-11-02 Thread Vincent
> An intermediary snapshot is available: > http://www.restlet.org/downloads/current.zip What happened to org.restlet.ext.jar? -Vincent.

New snapshot of beta 20

2006-11-02 Thread Jerome Louvel
Hi all, An intermediary snapshot is available: http://www.restlet.org/downloads/current.zip Best regards, Jerome Louvel --- [Bugs fixed] - Fixed bug causing the ServerServlet to create an extra HTTP server connector if one is available on the classpath. Reported by Sean Landis. - Fixed bug

RE: toString shouldn't change the object's state

2006-11-02 Thread Jerome Louvel
Hi Vincent, Agreed, let's reuse the safer "getValue() : String" method introduced in StringRepresentation and deprecate toString(). Checked in SVN. Best regards, Jerome > -Message d'origine- > De : news [mailto:[EMAIL PROTECTED] De la part de Vincent > Envoyé : jeudi 2 novembre 2006 1

toString shouldn't change the object's state

2006-11-02 Thread Vincent
Hi Jerome, I came across this as I was running my code in the debugger this morning: Request.getEntityAsString calls org.restlet.ext.data.InputRepresentation.toString(), which calls getStream(), which sets the stream to null after returning it. It's all fine and dandy until you run your code in

RE: using log4j

2006-11-02 Thread Jerome Louvel
Hi Sumit, You need to use a parent Application instead of a raw Restlet. You can disable logging using Application.getLogService().setEnabled(false) but it is enabled by default. Please have a look at the updated tutorial: http://www.restlet.org/tutorial#part07 and at http://java.sun.com/j2se/1.