[Lazarus] httpWebServer does not show images for some users
john.repucci at gmail.com
Sun Jul 8 16:03:26 CEST 2012
(Sorry about that - I forgot to change the Subject line.)
On Sun, Jul 8, 2012 at 9:01 AM, John Repucci <john.repucci at gmail.com> wrote:
>> The file serving module is also a module.
>> It is 'hidden', as there is no visible data module for you to put components on,
>> but in the background there is a module nonetheless.
>>> 'img' is suppose to be the location for my image files. (in this
>>> case, in the same directory as the application)
>> Well, img is the location of all files, including the index.html file ?
>> Which is why I put it as the default module: it first serves the index.html
>> file (implicitly, because there is no path, and hence the default is used),
>> and then the img file (explicitly, since it's URL starts with /img/).
>> I used the sources you sent to the mailing list, which I expect to be the
>> same as you are using ?
>> I cannot do more than explain how it works :-)
re: source - yes I am using the same source files. I removed all of
my previous files and used just the contents from the file I supplied
plus the additional lines you suggested.
Explanations are good, because I do not have a good idea how this
works and there is little documentation on http server application.
RegisterFileLocation, AllowDefaultModule and AllowDefaultModule are
not found in the chm help files and googling for them does not find
anything useful. If any documentation exists, please provide a link.
I would love to RTFM ("read the FINE manual").
Assuming that one module is better than two, I removed the
RegisterHTTPModule('Main', TMain); &
Application.DefaultModuleName:='main'; lines, but that did not help.
I was unable to get the http server to provide anything.
For this simple example, should I have two modules or should I only
the default module? If using only the default module is acceptable,
how would I use it?
re: the images directory - once I get this working (making an
assumption), I want to have all of my images located in a secondary
directory and all of my html files in the main (server root)
Eventually: ImageDir := GetCurrentDir + DirectorySeparator + 'image';
Do you (or anyone) have a working example of one or two http server
applications, preferable with images on the web page?
More information about the Lazarus