From 5504175d007ca34ba572c50ea516cb2b11330757 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Sat, 26 May 2012 00:19:14 +0300 Subject: [PATCH] added eiffel code --- examples/tutorial/step_2.wiki | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/examples/tutorial/step_2.wiki b/examples/tutorial/step_2.wiki index a19cc015..77dc4ae7 100644 --- a/examples/tutorial/step_2.wiki +++ b/examples/tutorial/step_2.wiki @@ -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]]