Difference between revisions of "Xebra Create Webapps"

(Create a new webapp)
(Add support for XML-RPC)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Xebra]]
 
[[Category:Xebra]]
 +
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]
  
 
=Create a new webapp=
 
=Create a new 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 (see also [[Xebra Webapp 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.
+
# Setup an initial Eiffel project for your webapp. For that matter you can use this [https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/linux/create_website.sh script] which creates all necessary files. Make sure to assign a free port to your webapp (see also [[Xebra Webapp Config File]]). The webapp has to be created in the same folder that is specified in the servers config file at unmanaged_webapps. See [[Xebra Server Config File]] for more information.
 
# Run the server (see [[Xebra Server Administration]]) 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!".
 
# Run the server (see [[Xebra Server Administration]]) 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!".
# Create xeb files for your webapp. See [[Xebra Documentation|Xebra Tag Libraries]] for more info about xeb tags (see also [[Xebra Write Xeb File | Tutorial]]). 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 xeb files for your webapp. See [[Xebra Documentation|Xebra Tag Libraries]] for more info about xeb tags (see also [[Xebra Write Xeb File | Tutorial]]). Note that you have to let the server re-translate 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 re-translated if it is set to Development Mode (see [[Xebra Server Administration]] for more info).
 
# Create the eiffel classes.
 
# Create the eiffel classes.
  
 
=Add support for XML-RPC=
 
=Add support for XML-RPC=
* [[Xebra Create XML-RPC Webapp]]
+
* [[Xebra Create XML-RPC Webapp]] (xml_rpc is currently disabled)
 
+
  
 
=Manually translate a webapp=
 
=Manually translate a webapp=
 
To manually translate, generate and compile your webapp use the following commands
 
To manually translate, generate and compile your webapp use the following commands
 +
 +
Linux
 
<code>
 
<code>
 
cd $XEBRA_DEV/httpd/htdocs/yourwebapp/
 
cd $XEBRA_DEV/httpd/htdocs/yourwebapp/
  
 
#Translate
 
#Translate
$XEBRA_DEV/eiffel_projects/xebra_translator/EIFGENs/W_code/xebra_translator -n yourwebapp
+
$XEBRA_DEV/eiffel_projects/xebra_translator/EIFGENs/xebra_translator/W_code/xebra_translator -n yourwebapp -i . -o . -l $XEBRA_DEV/eiffel_projects/xebra_translator
                                                      -i . -o . -t $XEBRA_DEV/eiffel_projects/xebra_translator/ -d 10
+
  
 
#Compile servlet_gen
 
#Compile servlet_gen
ec -config .generated/servlet_gen/servlet_gen.ecf -target servlet_gen -c_compile -stop
+
ec -experiment -config .generated/servlet_gen/servlet_gen.ecf -target servlet_gen -c_compile -stop
  
 
#Execute servlet_gen
 
#Execute servlet_gen
.generated/servlet_gen/EIFGENs/servlet_gen/W_code/servlet_gen .
+
.generated/servlet_gen/EIFGENs/servlet_gen/W_code/servlet_gen -o .
  
 
#Compile webapp
 
#Compile webapp
ec -config yourwebapp.ecf -target yourwebapp -c_compile -stop
+
ec -experiment -config yourwebapp.ecf -target yourwebapp -c_compile -stop
 +
</code>
  
 +
Windows
 +
<code>
 +
cd %XEBRA_DEV%\httpd\htdocs\yourwebapp\
 +
 +
#Translate
 +
%XEBRA_DEV%\eiffel_projects\xebra_translator\EIFGENs\xebra_translator\W_code\xebra_translator -n yourwebapp -i . -o . -l %XEBRA_DEV%\eiffel_projects\xebra_translator
 +
 +
#Compile servlet_gen
 +
ec -experiment -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.exe .
 +
 +
#Compile webapp
 +
ec -experiment -config yourwebapp.ecf -target yourwebapp -c_compile -stop
 
</code>
 
</code>
  
Optionally, you can add the "-clean" option for ec and the "-force" option for translator to force a complete recompilation.
+
Optionally, you can add the "-clean" option for ec and the "-f" option for translator to force a complete recompilation.

Latest revision as of 07:23, 1 September 2009

About | Installation | Documentation | Tutorials | Frequently Asked Questions

Create a new webapp

  1. Setup an initial Eiffel project for your webapp. For that matter you can use this script which creates all necessary files. Make sure to assign a free port to your webapp (see also Xebra Webapp Config File). The webapp has to be created in the same folder that is specified in the servers config file at unmanaged_webapps. See Xebra Server Config File for more information.
  2. Run the server (see Xebra Server Administration) 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!".
  3. Create xeb files for your webapp. See Xebra Tag Libraries for more info about xeb tags (see also Tutorial). Note that you have to let the server re-translate 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 re-translated if it is set to Development Mode (see Xebra Server Administration for more info).
  4. Create the eiffel classes.

Add support for XML-RPC

Manually translate a webapp

To manually translate, generate and compile your webapp use the following commands

Linux

cd $XEBRA_DEV/httpd/htdocs/yourwebapp/
 
#Translate
$XEBRA_DEV/eiffel_projects/xebra_translator/EIFGENs/xebra_translator/W_code/xebra_translator -n yourwebapp -i . -o . -l $XEBRA_DEV/eiffel_projects/xebra_translator
 
#Compile servlet_gen
ec -experiment -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 -o .
 
#Compile webapp
ec -experiment -config yourwebapp.ecf -target yourwebapp -c_compile -stop

Windows

cd %XEBRA_DEV%\httpd\htdocs\yourwebapp\
 
#Translate
%XEBRA_DEV%\eiffel_projects\xebra_translator\EIFGENs\xebra_translator\W_code\xebra_translator -n yourwebapp -i . -o . -l %XEBRA_DEV%\eiffel_projects\xebra_translator
 
#Compile servlet_gen
ec -experiment -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.exe .
 
#Compile webapp
ec -experiment -config yourwebapp.ecf -target yourwebapp -c_compile -stop

Optionally, you can add the "-clean" option for ec and the "-f" option for translator to force a complete recompilation.