|   |   | 
| Line 2: | Line 2: | 
|  |  |  |  | 
|  | =Create a webapp= |  | =Create a webapp= | 
| − | # Setup an initial Eiffel project for your webapp. For that matter you can use this [https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/create_website.sh script] which creates all necessary files. Make sure to assign a free port to your webapp (seealso [[XebraWebapp Config File]]). The webapp has to be created in the same folder that is specified in the servers config file at webapps_root. See [[Xebra Server Config File]] for more information.
 | + | * see [[Xebra Create Webapps|Create Webapps]] | 
| − | # Run the server and browse to http://localhost:55000/yourwebapp. The server will translate and compile your webapp. Once compiled, you should see a page displaying "Yourwebapp works!".
 | + |   | 
| − | # Createxeb files for your webapp. See [[Xebra Xeb-Files]]for a documentation about xeb files. Note that you have to let the server retranslate your webapp everytime you change xeb-files or add new xeb-files. This can be done by just pressing F5 in the browser. The server automatically detects that the webapp has to be retranslated if it is set to Development Mode (see [[Xebra Server Administration]] for more info).
 | + |  | 
| − | # Create the eiffel classes.
 | + |  | 
|  |  |  |  | 
|  | =Run Xebra Server= |  | =Run Xebra Server= | 
| − | 
 |  | 
|  | * see [[Xebra Server Administration]] |  | * see [[Xebra Server Administration]] | 
|  |  |  |  | 
| − | # Note that you should have compiled the translator before you run the server.  
 |  | 
| − | # If you have not done so, open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini and adapt translator, compiler, and webapps_root to your configuration (see [[Xebra Server Config File]]).
 |  | 
| − | # 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 (this is due to a bug in the NET library that has not been fixed yet).
 |  | 
| − | # Open the Execution Parameters dialog and set "config.ini -d 10" as argument (see [[Xebra Server Administration]] for more info about run arguments).
 |  | 
| − | # Compile and run
 |  | 
| − | # Browse to http://localhost:55000/helloworld/. The server now translates, generates, compiles and finally runs the helloworld application.
 |  | 
| − | 
 |  | 
| − | =Manually translate a webapp=
 |  | 
| − | To manually translate, generate and compile your webapp use the following commands
 |  | 
| − | <code>
 |  | 
| − | cd $XEBRA_DEV/httpd/htdocs/yourwebapp/
 |  | 
| − | 
 |  | 
| − | #Translate
 |  | 
| − | $XEBRA_DEV/eiffel_projects/xebra_translator/EIFGENs/W_code/xebra_translator -n yourwebapp -i . -o . -t $XEBRA_DEV/eiffel_projects/xebra_translator/ -d 10
 |  | 
| − | 
 |  | 
| − | #Compile servlet_gen
 |  | 
| − | ec -config .generated/servlet_gen/servlet_gen.ecf -target servlet_gen -c_compile -stop
 |  | 
| − | 
 |  | 
| − | #Execute servlet_gen
 |  | 
| − | .generated/servlet_gen/EIFGENs/servlet_gen/W_code/servlet_gen .
 |  | 
| − | 
 |  | 
| − | #Compile webapp
 |  | 
| − | ec -config yourwebapp.ecf -target yourwebapp -c_compile -stop
 |  | 
| − | 
 |  | 
| − | </code>
 |  | 
| − | 
 |  | 
| − | Optionally, you can add the "-clean" option for ec and the "-force" option for translator to force a complete recompilation.
 |  | 
|  |  |  |  | 
|  | =XML-RPC= |  | =XML-RPC= | 
|  | * [[Xebra Create XML-RPC Webapp]] |  | * [[Xebra Create XML-RPC Webapp]] |