Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1326 - in development/main/planet/facilities/http: blocks blocks/demo examples examples/hello examples/hello/etc examples/hello/src examples/hello/src/main/net/dpml/planet/playground examples/hello/src/main/net/dpml/playground impl/src/main/net/dpml/http/impl test/src/main/test/http

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1326 - in development/main/planet/facilities/http: blocks blocks/demo examples examples/hello examples/hello/etc examples/hello/src examples/hello/src/main/net/dpml/planet/playground examples/hello/src/main/net/dpml/playground impl/src/main/net/dpml/http/impl test/src/main/test/http
  • Date: Thu, 30 Dec 2004 07:48:48 +0100

Author: niclas
Date: Thu Dec 30 07:48:48 2004
New Revision: 1326

Added:
development/main/planet/facilities/http/examples/hello/
- copied from r1319,
development/main/planet/facilities/http/blocks/demo/
development/main/planet/facilities/http/examples/hello/README.TXT
- copied, changed from r1325,
development/main/planet/facilities/http/blocks/demo/README.TXT
development/main/planet/facilities/http/examples/hello/build.xml
- copied, changed from r1325,
development/main/planet/facilities/http/blocks/demo/build.xml
development/main/planet/facilities/http/examples/hello/etc/
- copied from r1325,
development/main/planet/facilities/http/blocks/demo/etc/
development/main/planet/facilities/http/examples/hello/src/
- copied from r1325,
development/main/planet/facilities/http/blocks/demo/src/

development/main/planet/facilities/http/examples/hello/src/main/net/dpml/playground/
- copied from r1319,
development/main/planet/facilities/http/blocks/demo/src/main/net/dpml/planet/playground/

development/main/planet/facilities/http/examples/hello/src/main/net/dpml/playground/HelloComponent.java
- copied unchanged from r1325,
development/main/planet/facilities/http/blocks/demo/src/main/net/dpml/planet/playground/HelloComponent.java
Removed:
development/main/planet/facilities/http/blocks/demo/

development/main/planet/facilities/http/examples/hello/src/main/net/dpml/planet/playground/
Modified:
development/main/planet/facilities/http/blocks/index.xml
development/main/planet/facilities/http/examples/hello/etc/config.xml
development/main/planet/facilities/http/examples/index.xml

development/main/planet/facilities/http/impl/src/main/net/dpml/http/impl/ForwardHandler.java

development/main/planet/facilities/http/test/src/main/test/http/package.html
Log:
Re-arranging the Http facility.

Modified: development/main/planet/facilities/http/blocks/index.xml
==============================================================================
--- development/main/planet/facilities/http/blocks/index.xml (original)
+++ development/main/planet/facilities/http/blocks/index.xml Thu Dec 30
07:48:48 2004
@@ -104,22 +104,6 @@
</dependencies>
</project>

- <project basedir="demo">
- <info>
- <group>dpml/http</group>
- <name>dpml-http-demo</name>
- <version>1.0.0</version>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-http-impl" />
- <include key="servletapi" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
<project basedir="static">
<info>
<group>dpml/http</group>

Copied: development/main/planet/facilities/http/examples/hello/README.TXT
(from r1325, development/main/planet/facilities/http/blocks/demo/README.TXT)
==============================================================================
--- development/main/planet/facilities/http/blocks/demo/README.TXT
(original)
+++ development/main/planet/facilities/http/examples/hello/README.TXT Thu
Dec 30 07:48:48 2004
@@ -1,27 +1,36 @@

-HTTP DEMO README
-----------------
+HTTP HELLO DEMO README
+----------------------

-The demo project demonstrates the setup of a http server and context within
which
-he handle 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:
+ 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"
artifact="block:avalon/http/avalon-http-server#SNAPSHOT"/>
- <x:include name="static-context"
artifact="block:avalon/http/avalon-http-static#SNAPSHOT"/>
- <x:component name="hello" class="net.dpml.playground.HelloComponent"/>
+ <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).
+ 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>
@@ -30,61 +39,63 @@
</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/src/java you will be redirected to
http://localhost/src/main.
+ 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>/src/java</from>
- <to>/src/main</to>
+ <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'.
+ 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="/hello"/>
+ <parameter name="context-path" value="/demo/hello"/>
<parameter name="target" value="/demo/hello"/>
</parameters>
</target>

-</targets>
+
+ To build the server do the following:

-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

- $ cd avalon <--- your root avalon/trunk directory
- $ ant <--- build al of avalon
- $ cd planet\facilities\http\blocks
- $ ant
- $ cd demo
+ To test the server you can either execute the generated block from the
local
+ file system of from magic's repository.

-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:

-Executing the block from the local filesystem:
+ $ metro target/deliverables/blocks/dpml-http-demo-1.0.0.block
-config target/config.xml

- $ merlin target\deliverables\blocks\avalon-http-demo-SNAPSHOT.block
-config etc\config.xml
+ 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;

-Executing the block from the repository (the following assumes that you have
merlin.repository
-referencing the magic repository)
+ $ metro artifact:block:dpml/http/examples/hello/hello#2.0.0 -config
artifact:conf:dpml/http/examples/hangman/webapp

- $ merlin artifact:block:avalon/http/avalon-http-demo#SNAPSHOT -config
etc\config.xml
+ To check the running applicaion, open a browser and enter the following
url;

-Open a browser and enter the following url:
+ http://localhost:8080

- http://localhost:8080
+ You should see the contents of the local directory in your browser.

-You should see the contents of the local directory in your browser.
+ http://localhost:8080/hello

- http://localhost:8080/hello
+ You should see a simple "Hello" message created by the HelloComponent.

-You should see a simple "Hello" message created by the HelloComponent.
+<The DPML documentation team>

-SJM

Copied: development/main/planet/facilities/http/examples/hello/build.xml
(from r1325, development/main/planet/facilities/http/blocks/demo/build.xml)
==============================================================================
--- development/main/planet/facilities/http/blocks/demo/build.xml
(original)
+++ development/main/planet/facilities/http/examples/hello/build.xml Thu
Dec 30 07:48:48 2004
@@ -16,7 +16,7 @@
* limitations under the License.
-->

-<project name="dpml-http-demo" default="install" basedir="."
+<project name="dpml-http-hello" default="install" basedir="."
xmlns:magic="antlib:net.dpml.magic"
xmlns:x="plugin:dpml/magic/dpml-magic-core" >

<magic:import uri="artifact:template:dpml/magic/standard"/>
@@ -33,7 +33,7 @@
<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"
activation="startup" />
+ <x:component name="hello" class="net.dpml.playground.HelloComponent" />
<x:include name="authentication" uri="${hash.uri}"/>
</x:block>


Modified:
development/main/planet/facilities/http/examples/hello/etc/config.xml
==============================================================================
--- development/main/planet/facilities/http/blocks/demo/etc/config.xml
(original)
+++ development/main/planet/facilities/http/examples/hello/etc/config.xml
Thu Dec 30 07:48:48 2004
@@ -29,7 +29,7 @@

<target path="/demo/authentication/realm">
<parameters>
- <parameter name="filename" value="blocks/demo/etc/user.realm" />
+ <parameter name="filename" value="user.realm" />
</parameters>
</target>


Modified: development/main/planet/facilities/http/examples/index.xml
==============================================================================
--- development/main/planet/facilities/http/examples/index.xml (original)
+++ development/main/planet/facilities/http/examples/index.xml Thu Dec 30
07:48:48 2004
@@ -20,6 +20,22 @@

<import index="../../index.xml" />

+ <project basedir="hello">
+ <info>
+ <group>dpml/http/examples/hello</group>
+ <name>dpml-http-hello</name>
+ <version>2.0.0</version>
+ <type>jar</type>
+ </info>
+ <dependencies>
+ <include key="dpml-http-impl" />
+ <include key="servletapi" />
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
<project basedir="hangman/api">
<info>
<group>dpml/http/examples/hangman</group>

Modified:
development/main/planet/facilities/http/impl/src/main/net/dpml/http/impl/ForwardHandler.java
==============================================================================
---
development/main/planet/facilities/http/impl/src/main/net/dpml/http/impl/ForwardHandler.java
(original)
+++
development/main/planet/facilities/http/impl/src/main/net/dpml/http/impl/ForwardHandler.java
Thu Dec 30 07:48:48 2004
@@ -38,7 +38,7 @@
*/
public class ForwardHandler
extends org.mortbay.http.handler.ForwardHandler
- implements Startable
+ implements Startable, Configurable
{
private Logger m_Logger;
private HttpContextService m_Context;

Modified:
development/main/planet/facilities/http/test/src/main/test/http/package.html
==============================================================================
---
development/main/planet/facilities/http/test/src/main/test/http/package.html
(original)
+++
development/main/planet/facilities/http/test/src/main/test/http/package.html
Thu Dec 30 07:48:48 2004
@@ -1,5 +1,5 @@
<body>
<p>
- Servlet containing an embedded merlin kernel.
+ Servlet containing an embedded Metro kernel.
</p>
</body>



  • svn commit: r1326 - in development/main/planet/facilities/http: blocks blocks/demo examples examples/hello examples/hello/etc examples/hello/src examples/hello/src/main/net/dpml/planet/playground examples/hello/src/main/net/dpml/playground impl/src/main/net/dpml/http/impl test/src/main/test/http, niclas, 12/30/2004

Archive powered by MHonArc 2.6.24.

Top of Page