> Note that no external configuration file is needed. If you want to
> customize the mapping between file extensions and metadata (media
> type, language or encoding), you can use the Application's
> "localService" property.
Updated in the latest tutorial version, it's is "metadataService" now.
> which implies that it is looking for a file called index (no
> extension).
>
> How to change this such that I get either a directory listing
> or index.html (or variants) by default please?
> Or how to specify an explicit file
The Directory Handler disables the content negotiation by default which
causes this problem. I will restored the previous behavior in beta 21. For
now, please use:
public Restlet createRoot()
{
Directory directory = new Directory(getContext(), ROOT_URI);
directory.setNegotiateContent(true);
return directory;
}
Also, you can change the default name via "metadataService.indexName"
property.
Best regards,
Jerome