Static files: no available connector for FILE

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Static files: no available connector for FILE

Matt-14
"WARNING: No available server connector supports the required protocols: FILE .
Please add the JAR of a matching connector to your classpath."

Which jar file contains the connector implementation for the FILE protocol?
Here is what I'm including:

org.restlet.jar
com.noelios.restlet.jar
com.noelios.restlet.ext.simple_3.1.jar
org.simpleframework_3.1/org.simpleframework.jar




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Static files: no available connector for FILE

keke-2
Have you add FILE protocol into your Component?
Like

component.getClients.add(Protocol.FILE)

On Sun, Nov 16, 2008 at 12:54 PM, Matt <[hidden email]> wrote:
"WARNING: No available server connector supports the required protocols: FILE .
Please add the JAR of a matching connector to your classpath."

Which jar file contains the connector implementation for the FILE protocol?
Here is what I'm including:

org.restlet.jar
com.noelios.restlet.jar
com.noelios.restlet.ext.simple_3.1.jar
org.simpleframework_3.1/org.simpleframework.jar







--
Cheers,
Keke
-----------------
We paranoid love life
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Static files: no available connector for FILE

Matt-14
keke <iamkeke <at> gmail.com> writes:

>
>
> Have you add FILE protocol into your Component? Like
> component.getClients.add(Protocol.FILE)
>
> On Sun, Nov 16, 2008 at 12:54 PM, Matt <restdev <at> randomcreation.com> wrote:
> "WARNING: No available server connector supports the required protocols: FILE .
> Please add the JAR of a matching connector to your classpath."
> Which jar file contains the connector implementation for the FILE protocol?
> Here is what I'm including:
> org.restlet.jar
> com.noelios.restlet.jar
> com.noelios.restlet.ext.simple_3.1.jar
> org.simpleframework_3.1/org.simpleframework.jar
>
>
> -- Cheers,Keke-----------------We paranoid love life
>

Yes, here is my Component initialization:

public class HTTPServer
 {
   public static final String ROOT_URI = "file:///Users/matt/Workspace/devster/src/client/js/";
   public static void main( String[] args ) throws Exception
   {
     Component component = new Component();
     component.getServers().add( Protocol.HTTP, 8182 );
     component.getServers().add( Protocol.FILE );
 
    component.getDefaultHost().attach( "/app", new App() );
    component.getDefaultHost().attach( "/files",
                 new Application(component.getServers().getContext().createChildContext()) {
      public Restlet createRoot()
      {
        Directory path = new Directory(getContext(), ROOT_URI);
        path.setListingAllowed( true );
        return path;
      }

    } );
     component.start();
   }
 }




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Static files: no available connector for FILE

Thierry Boileau
Hi Matt,

Just replace
>component.getServers().add( Protocol.
with
component.getClients().add(Protocol.FILE);

The FILE protocol has been designed to be a client protocol (see the javadocs => http://www.restlet.org/documentation/1.1/api/org/restlet/data/Protocol.html#FILE).


Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


Have you add FILE protocol into your Component? Like 
component.getClients.add(Protocol.FILE)

On Sun, Nov 16, 2008 at 12:54 PM, Matt <restdev <at> randomcreation.com> wrote:
"WARNING: No available server connector supports the required protocols: FILE .
Please add the JAR of a matching connector to your classpath."
Which jar file contains the connector implementation for the FILE protocol?
Here is what I'm including:
org.restlet.jar
com.noelios.restlet.jar
com.noelios.restlet.ext.simple_3.1.jar
org.simpleframework_3.1/org.simpleframework.jar


-- Cheers,Keke-----------------We paranoid love life

    

Yes, here is my Component initialization:

public class HTTPServer 
 {
   public static final String ROOT_URI = "file:///Users/matt/Workspace/devster/src/client/js/";
   public static void main( String[] args ) throws Exception
   {
     Component component = new Component();
     component.getServers().add( Protocol.HTTP, 8182 );
     component.getServers().add( Protocol.FILE );
 
    component.getDefaultHost().attach( "/app", new App() );
    component.getDefaultHost().attach( "/files", 
                 new Application(component.getServers().getContext().createChildContext()) {
      public Restlet createRoot()
      {
        Directory path = new Directory(getContext(), ROOT_URI);
        path.setListingAllowed( true );
        return path;
      }

    } );
     component.start();
   }
 }
Loading...