FYI, a bug report was entered for this issue and later fixed by Thierry: "Autowire appears to be building invalid uriPattern" http://restlet.tigris.org/issues/show_bug.cgi?id=584 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 : Max Powers [mailto:[EMAIL PROTECTED] Envoye : jeudi 28 aout 2008 03:22 A : [email protected] Objet : RE: attached URI isn't correct I was able to get this working, but only if I disable autowire in the servlet, and update my restlet.xml file to include the /app for the URI. <?xml version="1.0"?> <component xmlns="http://www.restlet.org/schemas/1.1/Component" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.restlet.org/schemas/1.1/Component"> <defaultHost> <attach uriPattern="/app/content" targetClass="some.package.SomeClass" /> <attach uriPattern="/app/service" targetClass="some.other.package.SomeOtherClass" /> </defaultHost> </component> It would still be very handy though if I could use autowire so that restlet will prepend the /app to the URI for me (so this isn't 1 more file that needs to change when contextPath changes from /app to /app1) Thanks Max From: Max Powers [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2008 8:53 PM To: [email protected] Subject: RE: attached URI isn't correct Some copy & paste errors, corrected below --------------------------------------------------------------- Hi I'm in the process of upgrading our application from rest 1.0 to rest 1.1. I have created a restlet.xml file as follows <?xml version="1.0"?> <component xmlns="http://www.restlet.org/schemas/1.1/Component" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.restlet.org/schemas/1.1/Component"> <defaultHost> <attach uriPattern="/content" targetClass="some.package.SomeClass" /> <attach uriPattern="/service" targetClass="some.other.package.SomeOtherClass" /> </defaultHost> </component> Problem is that when the server starts and I send in a request, I see the following in the log file [INFO] 2008-08-27 20:22:42,291 INFO [/app] - rest: [Noelios Restlet Engine] - Attaching restlet: [EMAIL PROTECTED] to URI: /app/service/content [INFO] 2008-08-27 20:22:42,291 INFO [/app] - rest: [Noelios Restlet Engine] - Attaching restlet: [EMAIL PROTECTED] to URI: /app/service/service Which is leading to a 404, as I was expecting the uriPattern to be matching /app/service or /app/content not /app/service/service or /app/service/content I am somewhat new to the innerworkings of restlet, so any pointers would be greatly appreciated Thanks Max

