include images in the page

Josef Fydl <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
I have  SWI-Prolog (Multi-threaded, 64 bits, Version 6.6.4)

Wrote test program 
:- use_module(library(http/thread_httpd)).
:- use_module(library(http/http_dispatch)).
:- use_module(library(http/http_error)).
:- use_module(library(http/html_write)).
:- use_module(library(http/http_path)).
:- use_module(library(http/http_files)).


:- multifile http:location/3.
:- dynamic   http:location/3.
:- multifile user:file_search_path/2.
:- dynamic 	user:file_search_path/2.




http:location(images,	'images', []).

user:file_search_path(icons,		'/Users/joseffrydl/Desktop/proKatu/praveTed/icons').

:- http_handler(images(.), serve_files_in_directory(icons), [prefix]).




port(8881).
start :-
    port(Port),server(Port).


stop :-
    port(Port),
    http_stop_server(Port, []).


server(Port) :-
        http_server(http_dispatch, [port(Port)]).
invoke  it with
http://localhost:8881/images/empilotmainlogo.png
and got

Not Found

The requested URL /images/empilotmainlogo.png was not found on this server



Can you please tekk me what I do wrong?

I think I folow  Serving plain files from the SWI-Prolog HTTPD
with no success.

Thanks Josef Frydl


-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.