You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/06/16 22:22:10 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/modules/input NamingInputModule.java
vgritsenko 2004/06/16 13:22:10
Modified: src/java/org/apache/cocoon/components/modules/input
NamingInputModule.java
Log:
Add web.xml example
Revision Changes Path
1.2 +12 -5 cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/NamingInputModule.java
Index: NamingInputModule.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/NamingInputModule.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NamingInputModule.java 16 Jun 2004 20:00:07 -0000 1.1
+++ NamingInputModule.java 16 Jun 2004 20:22:10 -0000 1.2
@@ -15,11 +15,10 @@
*/
package org.apache.cocoon.components.modules.input;
+import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -43,9 +42,17 @@
*
* <p>Example usage:
* <pre>
- * <map:generate src="{naming:java:comp/env/url}"/>
+ * <map:generate src="{naming:java:comp/env/greeting}"/>
+ * </pre>
+ * This lookups <code>greeting</code> entry from the environment of the webapp.
+ * Webapp's web.xml should define this entry:
+ * <pre>
+ * <env-entry>
+ * <env-entry-name>greeting</env-entry-name>
+ * <env-entry-value>Hello, World</env-entry-value>
+ * <env-entry-type>java.lang.String</env-entry-type>
+ * </env-entry>
* </pre>
- * This lookups <code>env/url</code> entry from the environment of the webapp.
*
* @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
* @version CVS $Id$