[erlang-questions] inets & EWSAPI (001001 001011)
Ingela Anderton Andin
Tue Jan 22 08:49:26 CET 2008
> On 18/01/2008, 001001 001011 <visionary_synthesis@REDACTED> wrote:
>> Dear Erlang-Community!
>> i have a very basic question regarding the
>> EWSAPI. i was able to start the webserver
>> from the inets-example directory and was
>> served the index-page in the htdocs-folder.
>> i created a link from the login page to my
>> own .html file containing several forms
>> (method=post) that are submitted.
>> and now i'm stuck. what is the best way to
>> create an entry point to the EWSAPI modules
>> in order to handle the request?
The modules referred to as EWSAPI modules are the modules
that implement part of the webserver as mod_get, mod_log, mod_esi etc
and it is possible to replace mod_* modules with your own variant or
extend with new mod_* modules. Which mod_* modules that are used
when processing a request is determined by the modules property
equvialent to the Apche like directive"Modules".
A mod_* module should implement the callbacks documented in
the httpd man page.
>> In your configuration file for the inets application, include the
>> ErlScriptAlias directive and list all modules which are allowed to be
>> invoked via HTTP. Once that is done, and URL of the form:
>> will result in the function Module:Function/2 being invoked.
You can also read about this in Inets Users Guide in the section
"Dynamic Web Pages"
and "ErlScriptAlias" and other properties of the web server are
documented in the httpd manualpage.
(Note: The above format is if you use Apache-style configuration files
for the HTTP server, from
inets-5.0, R12B it is also possible to use erlang-style property-lists
both directly and stored in a file
to start a HTTP server. Also note that there are more default values
Regards Ingela - OTP team
More information about the erlang-questions