Hi Tamas, Glad you solved it!
Take care, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Tamás Cservenák Envoyé : vendredi 10 octobre 2008 14:21 À : [email protected] Objet : Re: [1.1RC2] Directory in ServletServer environment Humm, again me :) Just to say than _now_ i understand Jerome's pointer to this mail: http://restlet.tigris.org/servlets/ReadMsg?list=discuss&&msgNo=5234 The use of META-INF/service is not possible in this case, since there is an exception about the ClientHelper constructor :( Since i already subclassed ServetServer (to make it Plexus aware), i simply did this: protected Component createComponent() { Component result = super.createComponent(); result.getClients().add( new ServletWarClient( result.getContext(), getServletContext() ) ); return result; } And it helped. Everything works now... Again, sorry for the noise... ~t~ On Fri, Oct 10, 2008 at 1:51 PM, Tamás Cservenák <[EMAIL PROTECTED]> wrote: > Humm, sorry for the noise. I just found this log entry: > > WARN [org.restlet] - No available client connector supports the > required protocols: 'WAR' . Please add the JAR of a matching connector > to your classpath. > > Btw, i thought it is part of the > com.noelios.restlet:com.noelios.restlet.ext.servlet:1.1-RC2 artifact? > It is on classpath... > > ~t~ > > > On Fri, Oct 10, 2008 at 12:54 PM, Tamás Cservenák <[EMAIL PROTECTED]> wrote: >> Hello there, >> >> i am having problem to make the Directory restlet work. The >> environment is ServletServer, and as i see the from the sources, the >> WAR Client is automatically installed to Component. Here are the >> snippets from code: >> >> createRoot() >> == >> // create a new root router >> Router rootRouter = new Router( getContext() ); >> ... >> Directory docs = new Directory( getContext(), "war:///docs" ); >> docs.setListingAllowed( false ); >> docs.setNegotiateContent( false ); >> rootRouter.attach("/docs/", docs); >> >> == >> >> The servlet is mounted to "/*", and i saw a lot of mail messages >> regarding this setting (people having problems). >> >> I know that "/docs" should not be listable, but even direct requests >> for resources returns 404. Excerpt from the logs: >> >> ... >> jvm 1 | 2008-10-10 12:43:12,757 WARN [/nexus] - Getting variants >> for : war:///ext-2.2/resources/css/ext-all.css >> jvm 1 | 2008-10-10 12:43:12,757 WARN [/nexus] - Converted target >> URI: war:///ext-2.2/resources/css/ext-all.css >> jvm 1 | 2008-10-10 12:43:12,757 WARN [/nexus] - Getting variants >> for : war:///ext-2.2/resources/css/xtheme-gray.css >> jvm 1 | 2008-10-10 12:43:12,758 WARN [/nexus] - Converted target >> URI: war:///ext-2.2/resources/css/xtheme-gray.css >> jvm 1 | 2008-10-10 12:43:12,757 WARN [/nexus] - Getting variants >> for : war:///ext-2.2/adapter/ext/ext-base.js >> jvm 1 | 2008-10-10 12:43:12,758 WARN [/nexus] - Converted target >> URI: war:///ext-2.2/adapter/ext/ext-base.js >> ... >> >> So, to summarize: it seems to me something broken in restlet 1.1RC2, >> since i am completely unable to publish static resources from a WAR. >> >> Note: the WAR is currently _unpacked_ (it is run unzipped from >> container [a Jetty 6.1.11]), but it will probably have to run also in >> packed form. Is WAR client able to transparently handle >> packed/unpacked wars? >> >> -- >> Thanks, >> ~t~ >> > > > > -- > Thanks, > ~t~ > -- Thanks, ~t~

