Notes
Use Xebra revision 78995 for this tutorial.
This tutorial was tested with EiffelStudio 6.4.7.8600 ($ISE_EIFFEL) and eiffel_src ($EIFFEL_SRC)
revision 78995.
The env vars $EIFFEL_SRC, $ISE_EIFFEL, $ISE_PLATFORM
and $ISE_LIBRARY are expected to be set.
Windows
Checkout Xebra
Setup Apache
- Download apache httpd-2.2.11 windows binary from http://httpd.apache.org/download.cgi
- Install (Choose Custom Installation and install Build
Headers and Libraries as well)
- Copy mod_xebra.so
to your Apache2.2\modules folder.
- Add the following lines to Apache2.2\conf\httpd.conf:
- LoadModule xebra_module modules/mod_xebra.so
- AddHandler mod_xebra .xeb
- XebraServer_port "55000"
- XebraServer_host "localhost"
- LogLevel debug
- (If apache is installed as a service, stop the service Start
apache: open a console, browse to Apache2.2\bin
and run httpd
- Browse to http://localhost/test.xeb.You
should see the Fail Whale and a message saying "Cannot connect
to XebraServer. See apache error log."
- In order to be able to browse to the pre-created websites,
copy the content of the folder
xebra\httpd\htdocs to Apache2.2\htdocs.
Compile the Xebra Translator
- Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator-voidunsafe.ecf
- Compile
Run the Xebra Server
- Open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini
and adapt translator, compiler,
and webapps_root to your configuration.
- Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
- Go to the Exceptions Handling dialog and disable
DEVELOPER_EXCEPTION.
- Open the Execution Parameters dialog and set config.ini -d 10 as argument.
- Compile and run
- Browse to http://localhost/helloworld/hello.xeb.
The server now translates, generates, compiles and finally runns the
xebrawebpp application.
Ubuntu 9.04
Checkout Xebra
Setup Apache
Note: Mod_xebra does currently not run with the apache
distribution that comes with ubuntu.
- Download apache unix source httpd-2.2.11 from http://httpd.apache.org/download.cgi
- Extract
- Define $APACHE2 where you want to
install apache, e.g. to $XEBRA_DEV/httpd
- Run the following commands:
- CFLAGS="-ggdb"./configure --prefix={insert path
here}
- make install
- Compile the module by running
- cd $XEBRA_DEV/c_projects/mod_xebra
- $APACHE2/bin/apxs -c -Wc,-ggdb
-I$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include mod_xebra.c
mod_xebra.h
- Install the module to apache by running
- sudo $APACHE2/bin/apxs -i mod_xebra.la
- Add the following lines to Apache2.2\conf\httpd.conf:
- LoadModule xebra_module modules/mod_xebra.so
- AddHandler mod_xebra .xeb
- XebraServer_port "55000"
- XebraServer_host "localhost"
- LogLevel debug
- Restart apache (if necessary, you need to stop and start
instead of restart)
- sudo$ APACHE2/bin/apachectl restart
Make sure no other apache is running, e.g. run
- Browse to http://localhost/test.xeb.You
should see the Fail Whale and a message saying "Cannot connect
to XebraServer. See apache error log."
- In order to be able to browse to the pre-created websites,
copy the content of the folder
xebra/httpd/htdocs to $APACHE2/htdocs.
- Hint: keep an eye on the apache error log tail
-f $APACHE2/logs/error_log
Compile the Xebra Translator
- Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator-voidunsafe.ecf
- Compile
Run the Xebra Server
- Open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini
and adapt translator, compiler,
and webapps_root to your configuration.
- Open estudio in a terminal and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
- Go to the Exceptions Handling dialog and disable
DEVELOPER_EXCEPTION.
- Open the Execution Parameters dialog and set config.ini -d 10 as argument.
- Compile and Run
- Browse to http://localhost/helloworld/hello.xeb.
The server now translates, generates, compiles and finally runns the
application.