Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1383 - development/main/planet/facilities/http/examples/hello

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1383 - development/main/planet/facilities/http/examples/hello
  • Date: Tue, 04 Jan 2005 09:48:21 +0100

Author: mcconnell
Date: Tue Jan 4 09:48:21 2005
New Revision: 1383

Modified:
development/main/planet/facilities/http/examples/hello/README.TXT
Log:
correct out-of-date content

Modified: development/main/planet/facilities/http/examples/hello/README.TXT
==============================================================================
--- development/main/planet/facilities/http/examples/hello/README.TXT
(original)
+++ development/main/planet/facilities/http/examples/hello/README.TXT Tue
Jan 4 09:48:21 2005
@@ -1,101 +1,101 @@
-
-HTTP HELLO DEMO README
-----------------------
-
- The "hello" project demonstrates the setup of a http server and context
- within which it handles the serving of static and dynamic content. The
- block for this project is declared with the build.xml file and covers the
- inclusion of the http server block, the inclusion of a context containing
- a static handler, redirect handler, model handler and a number of error
- handlers. Finally, the block contains a component that we use to handle
- some dynamic content:
-
- <target name="build" depends="standard.build">
- <x:property name="server.uri" key="dpml-http-server" feature="uri"/>
- <x:property name="static.uri" key="dpml-http-static" feature="uri"/>
- <x:property name="hash.uri" key="dpml-http-hash-basic" feature="uri"/>
-
- <x:block name="demo">
- <x:include name="server" uri="${server.uri}"/>
- <x:include name="static-context" uri="${static.uri}"/>
- <x:component name="hello" class="net.dpml.playground.HelloComponent" />
- <x:include name="authentication" uri="${hash.uri}"/>
- </x:block>
- </target>
-
- The block is configured using the a targets file. The file includes
three
- target overrides, one dealing with the context definition, the second
- demonstrating some redirection capability, and the third demonstrating
http
- path to component path mapping.
-
- The static content handler is configured to use the current directory as
the
- default root content basedir (signified by the context-path and
- resource-base element value).
-
- <target path="/demo/static-context/context">
- <configuration>
- <context-path>/</context-path>
- <resource-base>.</resource-base>
- </configuration>
- </target>
-
- The following target overrides the configuration for a url forwarding
- handler. It simply forwards a 'from' path to a 'to' path. For example,
if
- you enter a url such as http://localhost/hello you will be redirected to
- http://localhost/demo/hello.
-
- <target path="/demo/static-context/forward-handler">
- <configuration>
- <forwards>
- <forward>
- <from>/hello</from>
- <to>/demo/hello</to>
- </forward>
- </forwards>
- </configuration>
- </target>
-
- The following target override directs incomming urls with the path
'/hello'
- to the component at the address '/demo/hello'.
-
- <target path="/demo/static-context/model-handler">
- <parameters>
- <parameter name="context-path" value="/demo/hello"/>
- <parameter name="target" value="/demo/hello"/>
- </parameters>
- </target>
-
-
- To build the server do the following:
-
- $ cd dpml.net <--- your root svn/development/main/ directory
- $ ant -f setup.xml <--- build Magic/Transit bootstrap code, if not
done
- $ ant <--- build all of Metro, if not done
-
- $ cd planet/facilities/http/examples/demo
-
- To test the server you can either execute the generated block from the
local
- file system of from magic's repository.
-
- Executing the block from the local filesystem:
-
- $ metro target/deliverables/blocks/dpml-http-demo-1.0.0.block
-config target/deliverables/confs/hello.conf
-
- But why not utilize the extremely powerful artifact: protocol, and the
fact
- that everything is built as artifacts. This provides command-lines that
are
- independent of where on the local file system the command is executed;
-
- $ metro
artifact:block:dpml/http/examples/hello/dpml-http-hello#2.0.0 -config
artifact:conf:dpml/http/examples/hello/hello
-
- To check the running applicaion, open a browser and enter the following
url;
-
- http://localhost:8080
-
- You should see the contents of the local directory in your browser.
-
- http://localhost:8080/hello
-
- You should see a simple "Hello" message created by the HelloComponent.
-
-<The DPML documentation team>
-
+
+HTTP HELLO DEMO README
+----------------------
+
+ The "hello" project demonstrates the setup of a http server and context
+ within which it handles the serving of static and dynamic content. The
+ block for this project is declared with the build.xml file and covers the
+ inclusion of the http server block, the inclusion of a context containing
+ a static handler, redirect handler, model handler and a number of error
+ handlers. Finally, the block contains a component that we use to handle
+ some dynamic content:
+
+ <target name="build" depends="standard.build">
+ <x:property name="server.uri" key="dpml-http-server" feature="uri"/>
+ <x:property name="static.uri" key="dpml-http-static" feature="uri"/>
+ <x:property name="hash.uri" key="dpml-http-hash-basic" feature="uri"/>
+
+ <x:block name="demo">
+ <x:include name="server" uri="${server.uri}"/>
+ <x:include name="static-context" uri="${static.uri}"/>
+ <x:component name="hello" class="net.dpml.playground.HelloComponent" />
+ <x:include name="authentication" uri="${hash.uri}"/>
+ </x:block>
+ </target>
+
+ The block is configured using the a targets file. The file includes
three
+ target overrides, one dealing with the context definition, the second
+ demonstrating some redirection capability, and the third demonstrating
http
+ path to component path mapping.
+
+ The static content handler is configured to use the current directory as
the
+ default root content basedir (signified by the context-path and
+ resource-base element value).
+
+ <target path="/demo/static-context/context">
+ <configuration>
+ <context-path>/</context-path>
+ <resource-base>.</resource-base>
+ </configuration>
+ </target>
+
+ The following target overrides the configuration for a url forwarding
+ handler. It simply forwards a 'from' path to a 'to' path. For example,
if
+ you enter a url such as http://localhost/hello you will be redirected to
+ http://localhost/demo/hello.
+
+ <target path="/demo/static-context/forward-handler">
+ <configuration>
+ <forwards>
+ <forward>
+ <from>/hello</from>
+ <to>/demo/hello</to>
+ </forward>
+ </forwards>
+ </configuration>
+ </target>
+
+ The following target override directs incomming urls with the path
'/hello'
+ to the component at the address '/demo/hello'.
+
+ <target path="/demo/static-context/model-handler">
+ <parameters>
+ <parameter name="context-path" value="/demo/hello"/>
+ <parameter name="target" value="/demo/hello"/>
+ </parameters>
+ </target>
+
+
+ To build the server do the following:
+
+ $ cd dpml.net <--- your root svn/development/main/ directory
+ $ ant -f setup.xml <--- build Magic/Transit bootstrap code, if not
done
+ $ ant <--- build all of Metro, if not done
+
+ $ cd planet/facilities/http/examples/demo
+
+ To test the server you can either execute the generated block from the
local
+ file system of from magic's repository.
+
+ Executing the block from the local filesystem:
+
+ $ metro target/deliverables/blocks/dpml-http-hello-2.0.0.block
-config target/deliverables/confs/hello.conf
+
+ But why not utilize the extremely powerful artifact: protocol, and the
fact
+ that everything is built as artifacts. This provides command-lines that
are
+ independent of where on the local file system the command is executed;
+
+ $ metro
artifact:block:dpml/http/examples/hello/dpml-http-hello#2.0.0 -config
artifact:conf:dpml/http/examples/hello/hello
+
+ To check the running applicaion, open a browser and enter the following
url;
+
+ http://localhost:8080
+
+ You should see the contents of the local directory in your browser.
+
+ http://localhost:8080/hello
+
+ You should see a simple "Hello" message created by the HelloComponent.
+
+<The DPML documentation team>
+



  • svn commit: r1383 - development/main/planet/facilities/http/examples/hello, mcconnell, 01/04/2005

Archive powered by MHonArc 2.6.24.

Top of Page