Hi Stephan, hi all,

I've upated the tutorial pages (for both 1.0 and 1.1 documentation) in order to clarify the usage of the ROOT_URI constant.
Actually the tutorial code makes implicit reference to the code of the org.restlet.example module (especially the org.restlet.example.tutorial.Constant class). But as you say, this reference is not obvious.
I hope the things are clearer now.

Thanks for reporting this!

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


Hi Thierry,

as I startet with Restlet, I stumbled about the same stone. You should add a constant or something like that at the start of the example code in the example on www.restlet.org.

best regards
   Stephan

  
-----Ursprüngliche Nachricht-----
Von: "Thierry Boileau" <[EMAIL PROTECTED]>
Gesendet: 12.11.08 10:53:07
An: [email protected]
Betreff: Re: Developer: I can't host a static website

Hello,
 
 I wonder if you set up properly the ROOT_URI variable (something 
like "file://....").
 if you want to be sure, you can use the LocalReference#createFileRefer
ence method. It takes a directory path (something like "d:/temp/..." 
or "/tmp/...") as an argument.

 That is to say:
 return new Directory(getContext(), LocalReference.createFileReference(
"path to your directory"));


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

Hi This code is in Restlet tutorial // Create a componentComponent 
component = new Component();component.getServers().add(Protocol.HTTP, 
8182);component.getClients().add(Protocol.FILE);// Create an 
applicationApplication application = new Application() { @Override 
public Restlet createRoot() { return new Directory(getContext(), ROOT_
URI); }};// Attach the application to the component and start 
itcomponent.getDefaultHost().attach("", application);component.start()
; I can't have the navigated resource on my browser whatever the ROOT_

URI is, what is chances?
  

Reply via email to