added eiffel code

This commit is contained in:
Jocelyn Fiat
2012-05-26 00:19:14 +03:00
parent 8283979a1e
commit 5504175d00

View File

@@ -1,11 +1,13 @@
Back to the [[step_1.wiki|step 1]]
or go to [[step_3.wiki|step 3]]
----
= Tutorial Step 2 =
* '''Goal''': Build a simple Hello World application
* '''Requirements''':
** know how to compile with Eiffel (EiffelStudio).
** [[step_1.wiki|Previous step]] completed
** [[step_1.wiki|Previous step]] completed
== "hello" project ==
@@ -19,6 +21,28 @@ or go to [[step_3.wiki|step 3]]
** target "hello" provides a very simple implementation (But by default, it is using port 80 with Eiffel Web Nino, which might already be busy by other application)
** target "hello_custom" which uses almost the same code, but in addition, you can use the ewf.ini file to precise the port number (9999 for this example)
* Eiffel code
class
HELLO_APPLICATION
inherit
WSF_DEFAULT_RESPONSE_SERVICE
create
make_and_launch
feature {NONE} -- Initialization
response (req: WSF_REQUEST): WSF_PAGE_RESPONSE
-- Computed response message.
do
create Result.make
Result.put_string ("Hello World")
end
end
----
Back to the [[step_1.wiki|step 1]]