Skip to Content.
Sympa Menu

notify-dpml - r1089 - in trunk/main/planet/http: impl/src/main/net/dpml/http server test/src/test/net/dpml/http/test war/etc/web

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1089 - in trunk/main/planet/http: impl/src/main/net/dpml/http server test/src/test/net/dpml/http/test war/etc/web
  • Date: Tue, 14 Feb 2006 03:06:21 +0100

Author: mcconnell
Date: 2006-02-14 03:06:08 +0100 (Tue, 14 Feb 2006)
New Revision: 1089

Added:

trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerContext.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
Removed:
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandler.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ResolvingContextHandler.java
trunk/main/planet/http/war/etc/web/WEB-INF/
Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java

trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
trunk/main/planet/http/server/build.xml
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
trunk/main/planet/http/war/etc/web/index.html
Log:
filling out optional context features and tightening up the webapp demo

Deleted:
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandler.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandler.java
2006-02-13 02:09:38 UTC (rev 1088)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandler.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -1,118 +0,0 @@
-/*
- * Copyright 2006 Stephen McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.dpml.http;
-
-import net.dpml.transit.util.PropertyResolver;
-
-import net.dpml.logging.Logger;
-
-import org.mortbay.jetty.Handler;
-
-/**
- * Context handler with enhanced support for symbolic property
dereferencing.
- */
-public class ContextHandler extends ResolvingContextHandler implements
Comparable
-{
- /**
- * HTTP Context handler context defintion.
- */
- public interface Context
- {
- /**
- * Get the http context resource base. The value may contain symbolic
- * property references and should resolve to a local directory.
- *
- * @return the resource base
- */
- String getResourceBase();
-
- /**
- * Get the context path under which the http context instance will
- * be associated.
- *
- * @return the assigned context path
- */
- String getContextPath();
-
- /**
- * Get the internal context handler's handler.
- *
- * @return the handler
- */
- Handler getHandler();
-
- }
-
- private int m_priority = 0;
-
- public ContextHandler( Server server, Context context ) throws Exception
- {
- String base = context.getResourceBase();
- super.setResourceBase( base );
- String path = context.getContextPath();
- super.setContextPath( path );
- Handler handler = context.getHandler();
- super.setHandler( handler );
- }
-
- /**
- * Set the handler priority.
- * @param priority the priority value
- */
- public void setPriority( int priority )
- {
- m_priority = priority;
- }
-
- /**
- * Return the relative ordering of this object relative to the supplied
object.
- * If the supplied object is a ContextHandler evaluation will be based on
the
- * associated priority otherwise evaluation will be based on a default 0
priority
- * implied on the supplied object.
- *
- * @param other the other object
- * @return the comparative value
- */
- public int compareTo( Object other )
- {
- if( other instanceof ContextHandler )
- {
- ContextHandler handler = (ContextHandler) other;
- int priority = handler.m_priority;
- return compare( m_priority, priority );
- }
- else
- {
- return compare( m_priority, 0 );
- }
- }
-
- int compare( int a, int b )
- {
- if( a < b )
- {
- return -1;
- }
- else if( a == b )
- {
- return 0;
- }
- else
- {
- return 1;
- }
- }
-}

Added:
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerContext.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerContext.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerContext.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2006 Stephen McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.dpml.http;
+
+import java.util.Map;
+
+import org.mortbay.jetty.handler.ErrorHandler;
+
+/**
+ * Common http context handler context contract.
+ */
+public interface ContextHandlerContext
+{
+
+ /**
+ * Get the array of virtual hosts.
+ * @param hosts the default virtual host array (empty)
+ * @return the virtual host array.
+ */
+ //String[] getVitualHosts( String[] hosts );
+
+ /**
+ * Get the array of hosts server by the context.
+ * @param hosts the default host array (empty)
+ * @return the host array.
+ */
+ //String[] getHosts( String[] hosts );
+
+ /**
+ * Get the array of welcome files.
+ * @param values the default welcome file values
+ * @return the resolved array of welcome files
+ */
+ //String[] getWelcomeFiles( String[] values );
+
+ /**
+ * Get the classloader to assign to the context handler.
+ * @param classloader the default classloader
+ * @return the resolved classloader
+ */
+ ClassLoader getClassLoader( ClassLoader classloader );
+
+ /**
+ * Get the context path under which the http context instance will
+ * be associated.
+ *
+ * @return the assigned context path
+ */
+ String getContextPath();
+
+ /**
+ * Get the context handler display name.
+ * @param name the default name
+ * @return the resolved name
+ */
+ String getDisplayName( String name );
+
+ /**
+ * Get the mime type mapping.
+ * @param map the default value
+ * @return the resolved value
+ */
+ Map getMimeTypes( Map map );
+
+ /**
+ * Get the assigned error handler.
+ * @param handler the default handler
+ * @return the resolved handler
+ */
+ ErrorHandler getErrorHandler( ErrorHandler handler );
+}

Added: trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
2006-02-13 02:09:38 UTC (rev 1088)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006 Stephen McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.dpml.http;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+import net.dpml.transit.util.PropertyResolver;
+
+import net.dpml.logging.Logger;
+
+import net.dpml.configuration.Configuration;
+import net.dpml.configuration.ConfigurationException;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.MimeTypes;
+import org.mortbay.jetty.handler.ContextHandler;
+import org.mortbay.jetty.handler.ErrorHandler;
+
+/**
+ * Utility class that provides support for parameterization of a Jetty
context instance.
+ */
+class ContextHelper
+{
+ private Logger m_logger;
+
+ ContextHelper( Logger logger )
+ {
+ m_logger = logger;
+ }
+
+ /**
+ * Contextualize a handler using a supplied context.
+ * @param handler the handler to contextualize
+ * @param context the context instance
+ */
+ void contextualize( ContextHandler handler, ContextHandlerContext
context ) throws Exception
+ {
+ String path = context.getContextPath();
+ handler.setContextPath( path );
+ getLogger().debug( "setting context path: " + path );
+
+ ClassLoader classloader = context.getClassLoader( null );
+ if( null != classloader )
+ {
+ handler.setClassLoader( classloader );
+ }
+
+ String name = context.getDisplayName( null );
+ if( null != name )
+ {
+ handler.setDisplayName( name );
+ }
+
+ Map map = context.getMimeTypes( null );
+ if( null != map )
+ {
+ MimeTypes types = new MimeTypes();
+ types.setMimeMap( map );
+ handler.setMimeTypes( types );
+ }
+
+ ErrorHandler errorHandler = context.getErrorHandler( null );
+ if( null != errorHandler )
+ {
+ handler.setErrorHandler( errorHandler );
+ }
+ }
+
+ Logger getLogger()
+ {
+ return m_logger;
+ }
+}

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
2006-02-13 02:09:38 UTC (rev 1088)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -33,6 +33,12 @@
public interface Context
{
/**
+ * Get the array of ignore paths.
+ * @return the ignore path array
+ */
+ //String[] getIgnorePaths();
+
+ /**
* Return the append policy.
* @param value the default policy value
* @return the resolved value
@@ -87,6 +93,22 @@
* @return the resolved value
*/
int getRetainDays( int value );
+
+ /**
+ * Get the log latency policy. Ig true the request processing latency
will
+ * included in the reqwuest log messages.
+ * @param flag the log latency default value
+ * @return the resulted log latency policy
+ */
+ boolean getLogLatency( boolean flag );
+
+ /**
+ * Get the preference policy concerning address registration.
+ * @param flag the proxy preferred policy - if tue the proxy
+ * address will be used in preference to the request header address
+ * @return the resulted proxy preferred policy
+ */
+ boolean getUseProxyPreference( boolean flag );
}

/**
@@ -138,6 +160,12 @@
{
setRetainDays( retain );
}
+
+ boolean recordLatencyPolicy = context.getLogLatency( false );
+ setLogLatency( recordLatencyPolicy );
+
+ boolean useProxyAddressPolicy = context.getUseProxyPreference( false
);
+ setPreferProxiedForAddress( useProxyAddressPolicy );
}

/**

Deleted:
trunk/main/planet/http/impl/src/main/net/dpml/http/ResolvingContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ResolvingContextHandler.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ResolvingContextHandler.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -1,43 +0,0 @@
-/*
- * Copyright 2006 Stephen McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.dpml.http;
-
-import net.dpml.transit.util.PropertyResolver;
-
-import net.dpml.logging.Logger;
-
-/**
- * Context handler with enhanced support for symbolic property
dereferencing.
- */
-public class ResolvingContextHandler extends
org.mortbay.jetty.handler.ContextHandler
-{
- /**
- * Set the context reosurce base. The supplied path argument
- * may contain system property references as symbolic references in the
- * form ${name} which will be expanded prior to value assignment.
- *
- * @param path the base resource as a string
- */
- public void setResourceBase( String path )
- {
- if( null == path )
- {
- throw new NullPointerException( "path" );
- }
- String resolved = PropertyResolver.resolve( path );
- super.setResourceBase( resolved );
- }
-}

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -24,12 +24,12 @@
/**
* Context handler with enhanced support for symbolic property
dereferencing.
*/
-public class ResourceContextHandler extends ResolvingContextHandler
+public class ResourceContextHandler extends
org.mortbay.jetty.handler.ContextHandler
{
/**
* HTTP static resource vontext handler parameters.
*/
- public interface Context
+ public interface Context extends ContextHandlerContext
{
/**
* Get the http context resource base. The value may contain symbolic
@@ -38,26 +38,20 @@
* @return the resource base
*/
String getResourceBase();
-
- /**
- * Get the context path under which the http context instance will
- * be associated.
- *
- * @return the assigned context path
- */
- String getContextPath();
}

private int m_priority = 0;

- public ResourceContextHandler( Context context ) throws Exception
+ public ResourceContextHandler( Logger logger, Context context ) throws
Exception
{
+ ContextHelper helper = new ContextHelper( logger );
+ helper.contextualize( this, context );
+
String base = context.getResourceBase();
super.setResourceBase( base );
- String path = context.getContextPath();
- super.setContextPath( path );
+ logger.debug( "resource path: " + base );
+
ResourceHandler handler = new ResourceHandler( "static", "/" );
super.setHandler( handler );
}
-
}

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -29,12 +29,12 @@
/**
* Servlet context handler.
*/
-public class ServletContextHandler extends ResolvingContextHandler
+public class ServletContextHandler extends
org.mortbay.jetty.handler.ContextHandler
{
/**
* HTTP static resource vontext handler parameters.
*/
- public interface Context
+ public interface Context extends ContextHandlerContext
{
/**
* Get the http context resource base. The value may contain symbolic
@@ -43,39 +43,31 @@
* @return the resource base
*/
String getResourceBase();
-
- /**
- * Get the context path under which the http context instance will
- * be associated.
- *
- * @return the assigned context path
- */
- String getContextPath();
}

- private final Logger m_logger;
-
private int m_priority = 0;

public ServletContextHandler( Logger logger, Context context,
Configuration config ) throws Exception
{
- m_logger = logger;
+ super();

+ ContextHelper helper = new ContextHelper( logger );
+ helper.contextualize( this, context );
+
String base = context.getResourceBase();
super.setResourceBase( base );
- String path = context.getContextPath();
- super.setContextPath( path );
- Handler handler = buildHandler( config );
+
+ Handler handler = buildHandler( logger, config );
super.setHandler( handler );
}

- private Handler buildHandler( Configuration config ) throws
ConfigurationException
+ private Handler buildHandler( Logger logger, Configuration config )
throws ConfigurationException
{
- getLogger().debug( "configuration " + config );
+ logger.debug( "configuration " + config );
Configuration servlets = config.getChild( "servlets" );
ArrayList servletList = new ArrayList();
Configuration[] servletConfigs = servlets.getChildren( "servlet" );
- getLogger().debug( "servlet count: " + servletConfigs.length );
+ logger.debug( "servlet count: " + servletConfigs.length );
for( int i=0; i<servletConfigs.length; i++ )
{
Configuration servletConfig = servletConfigs[i];
@@ -87,7 +79,7 @@
ArrayList mappingList = new ArrayList();
Configuration mappings = config.getChild( "mappings" );
Configuration[] servletMappings = mappings.getChildren( "map" );
- getLogger().debug( "mapping count: " + servletMappings.length );
+ logger.debug( "mapping count: " + servletMappings.length );
for( int i=0; i<servletMappings.length; i++ )
{
Configuration servletMap = servletMappings[i];
@@ -100,9 +92,4 @@
ServletMapping[] mappingArray = (ServletMapping[])
mappingList.toArray( new ServletMapping[0] );
return new ServletHandler( servletArray, mappingArray );
}
-
- private Logger getLogger()
- {
- return m_logger;
- }
}

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -17,10 +17,18 @@

import java.net.URI;
import java.util.ArrayList;
+import java.util.Map;
+import java.security.PermissionCollection;
+import java.io.File;

import net.dpml.transit.util.PropertyResolver;

+import net.dpml.logging.Logger;
+
import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.security.SecurityHandler;
+import org.mortbay.jetty.servlet.SessionHandler;
+import org.mortbay.jetty.servlet.ServletHandler;

/**
* Servlet context handler.
@@ -30,30 +38,105 @@
/**
* HTTP static resource vontext handler parameters.
*/
- public interface Context
+ public interface Context extends ContextHandlerContext
{
/**
- * Get the context path under which the http context instance will
- * be associated.
- *
- * @return the assigned context path
+ * Get the war artifact uri.
+ * @return the uri identifying the war artifact
*/
- String getContextPath();
+ URI getWar();

/**
- * Get the war artifact uri.
- * @return the uri identifying the war artifact
+ * Get the assigned temp directory.
+ * @param dir the default temp directory
+ * @return the resolved temp directory
*/
- URI getWar();
+ File getTempDirectory( File dir );
+
+ /**
+ * Get the resource alias map.
+ * @param map the default mapping
+ * @return the resolved map
+ */
+ Map getResourceAliases( Map map );
+
+ /**
+ * Get the war extraction policy.
+ * @param policy the default policy (true)
+ * @return the resolved policy
+ */
+ boolean getExtractionPolicy( boolean policy );
+
+ /**
+ * Get the assigned permission collection.
+ * @param permissions the default permissions value
+ * @return the resolved permissions collection
+ */
+ PermissionCollection getPermissions( PermissionCollection
permissions );
+
+ /**
+ * Get the assigned security handler.
+ * @param handler the default value
+ * @return the resolved handler
+ */
+ SecurityHandler getSecurityHandler( SecurityHandler handler );
+
+ /**
+ * Get the assigned session handler.
+ * @param handler the default value
+ * @return the resolved handler
+ */
+ SessionHandler getSessionHandler( SessionHandler handler );
+
+ /**
+ * Get the assigned servlet handler.
+ * @param handler the default value
+ * @return the resolved handler
+ */
+ ServletHandler getServletHandler( ServletHandler handler );
}

private int m_priority = 0;

- public WebAppContextHandler( Context context ) throws Exception
+ public WebAppContextHandler( Logger logger, Context context ) throws
Exception
{
- String path = context.getContextPath();
- setContextPath( path );
- getSessionHandler().setSessionManager( new
org.mortbay.jetty.servlet.HashSessionManager() );
- setWar( context.getWar().toString() );
+ ContextHelper helper = new ContextHelper( logger );
+ helper.contextualize( this, context );
+
+ SecurityHandler securityHandler = context.getSecurityHandler( new
SecurityHandler() );
+ setSecurityHandler( securityHandler );
+ setHandler( securityHandler );
+
+ SessionHandler sessionHandler = context.getSessionHandler( new
SessionHandler() );
+ securityHandler.setHandler( sessionHandler );
+ setSessionHandler( sessionHandler );
+
+ ServletHandler servletHandler = context.getServletHandler( new
ServletHandler() );
+ sessionHandler.setHandler( servletHandler );
+ setServletHandler( servletHandler );
+
+ URI uri = context.getWar();
+ setWar( uri.toASCIIString() );
+
+ File temp = context.getTempDirectory( null );
+ if( null != temp )
+ {
+ setTempDirectory( temp );
+ }
+
+ Map map = context.getResourceAliases( null );
+ if( null != map )
+ {
+ setResourceAliases( map );
+ }
+
+ boolean extractionPolicy = context.getExtractionPolicy( true );
+ setExtractWAR( extractionPolicy );
+
+ PermissionCollection permissions = context.getPermissions( null );
+ if( null != permissions )
+ {
+ setPermissions( permissions );
+ }
}
}

Modified: trunk/main/planet/http/server/build.xml
===================================================================
--- trunk/main/planet/http/server/build.xml 2006-02-13 02:09:38 UTC (rev
1088)
+++ trunk/main/planet/http/server/build.xml 2006-02-14 02:06:08 UTC (rev
1089)
@@ -61,10 +61,10 @@
<!--
Add a web application.
-->
- <component key="apps" type="net.dpml.http.WebAppContextHandler">
+ <component key="webapp" type="net.dpml.http.WebAppContextHandler">
<context>
+ <entry key="contextPath" value="/"/>
<entry key="war"
value="link:war:dpml/planet/http/dpml-http-app"/>
- <entry key="contextPath" value="/"/>
</context>
</component>
<!--
@@ -86,7 +86,7 @@
<component key="servlets" type="net.dpml.http.ServletContextHandler">
<context>
<entry key="resourceBase" value="$${dpml.data}"/>
- <entry key="contextPath" value="/demo"/>
+ <entry key="contextPath" value="/data"/>
</context>
<configuration>
<servlets>

Modified:
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
===================================================================
---
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-02-13 02:09:38 UTC (rev 1088)
+++
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-02-14 02:06:08 UTC (rev 1089)
@@ -19,6 +19,7 @@

package net.dpml.http.test;

+import java.io.File;
import java.net.URI;

import junit.framework.TestCase;
@@ -27,6 +28,11 @@
import net.dpml.part.Component;
import net.dpml.part.ControlException;

+import net.dpml.metro.PartsManager;
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ComponentHandler;
+
+
/**
* Test a simple component case.
*
@@ -43,9 +49,13 @@
{
URI uri = new URI( "link:part:dpml/planet/http/dpml-http-server" );
Controller control = Controller.STANDARD;
- Component component = control.createComponent( uri );
+ ComponentHandler component = (ComponentHandler)
control.createComponent( uri );
try
{
+ PartsManager parts = component.getPartsManager();
+ ComponentHandler webapp = parts.getComponentHandler( "webapp" );
+ File temp = new File( "target/test/temp" );
+ webapp.getContextMap().put( "tempDirectory", temp );
component.getProvider().getValue( false );
}
catch( ControlException e )

Modified: trunk/main/planet/http/war/etc/web/index.html
===================================================================
--- trunk/main/planet/http/war/etc/web/index.html 2006-02-13 02:09:38
UTC (rev 1088)
+++ trunk/main/planet/http/war/etc/web/index.html 2006-02-14 02:06:08
UTC (rev 1089)
@@ -58,7 +58,8 @@
</p>

<ul>
-<li>a <a href="/docs">DPML site docs</a></li>
+<li>a <a href="/docs">Installed DPML site docs</a></li>
+<li>a <a href="/data">DPML Data Directory</a></li>
</ul>
</p>





  • r1089 - in trunk/main/planet/http: impl/src/main/net/dpml/http server test/src/test/net/dpml/http/test war/etc/web, mcconnell at BerliOS, 02/13/2006

Archive powered by MHonArc 2.6.24.

Top of Page