portals-portalapps-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r771536 - in /portals/applications/webcontent/trunk: webcontent-jar/ webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/ webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/ we...
Date Tue, 05 May 2009 03:29:48 GMT
Author: ate
Date: Tue May  5 03:29:47 2009
New Revision: 771536

URL: http://svn.apache.org/viewvc?rev=771536&view=rev
Log:
JS2-972: commons-logging unsuited for cross-context webapplication invocation usage - migrating
to slf4j
- cleaning out many remaining commons-logging usages
- adding a simple ServletContextListener for setting up relative log4j logging in the webcontent
war
- cleaning up dependencies

Added:
    portals/applications/webcontent/trunk/webcontent-war/src/main/java/
    portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
  (with props)
    portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/
    portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties
  (contents, props changed)
      - copied, changed from r771262, portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/log4j.properties
Removed:
    portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/log4j.properties
Modified:
    portals/applications/webcontent/trunk/webcontent-jar/pom.xml
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/AbstractRewriter.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingClasspathRewriterController.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingRewriterController.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/RulesetRewriterImpl.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/SwingParserAdaptor.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/neko/NekoParserAdaptor.java
    portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/xml/SaxParserAdaptor.java
    portals/applications/webcontent/trunk/webcontent-war/pom.xml
    portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/portlet.xml
    portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/web.xml

Modified: portals/applications/webcontent/trunk/webcontent-jar/pom.xml
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/pom.xml?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/pom.xml (original)
+++ portals/applications/webcontent/trunk/webcontent-jar/pom.xml Tue May  5 03:29:47 2009
@@ -38,9 +38,6 @@
     <javax.servlet.version>2.4</javax.servlet.version>
     <org.apache.portals.bridges.common.version>1.0.4</org.apache.portals.bridges.common.version>
     <org.apache.portals.bridges.velocity.version>1.0.4</org.apache.portals.bridges.velocity.version>
-    <xalan.version>2.4.1</xalan.version>
-    <xerces.version>2.3.0</xerces.version>
-    <xml-apis.version>2.0.2</xml-apis.version>
     <slf4j.version>1.5.6</slf4j.version>
     <junit.version>3.8.1</junit.version>
     <nekohtml.version>0.9.5</nekohtml.version>
@@ -95,16 +92,6 @@
       <version>${slf4j.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>${slf4j.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-      <version>${slf4j.version}</version>
-    </dependency>
-    <dependency>
       <groupId>castor</groupId>
       <artifactId>castor</artifactId>
       <version>${castor.version}</version>
@@ -126,6 +113,18 @@
       </exclusions>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>${junit.version}</version>

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/AbstractRewriter.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/AbstractRewriter.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/AbstractRewriter.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/AbstractRewriter.java
Tue May  5 03:29:47 2009
@@ -20,8 +20,9 @@
 import java.io.Writer;
 import java.net.URL;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * AbstractRewriter
  *
@@ -30,7 +31,7 @@
  */
 public abstract class AbstractRewriter implements Rewriter
 {
-    protected final static Log log = LogFactory.getLog(AbstractRewriter.class);
+    protected final static Logger log = LoggerFactory.getLogger(AbstractRewriter.class);
     
     private String baseUrl = null;
     private boolean useProxy = false; 

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingClasspathRewriterController.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingClasspathRewriterController.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingClasspathRewriterController.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingClasspathRewriterController.java
Tue May  5 03:29:47 2009
@@ -22,8 +22,8 @@
 import java.io.Reader;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * RewriterServiceImpl
@@ -36,7 +36,7 @@
        extends MappingRewriterController
        implements RewriterController
 {
-    protected final static Log log = LogFactory.getLog(MappingClasspathRewriterController.class);
+    protected final static Logger log = LoggerFactory.getLogger(MappingClasspathRewriterController.class);
 
     public MappingClasspathRewriterController( String mappingFile ) throws RewriterException
     {

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingRewriterController.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingRewriterController.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingRewriterController.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/MappingRewriterController.java
Tue May  5 03:29:47 2009
@@ -28,8 +28,8 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.portals.applications.webcontent.rewriter.html.SwingParserAdaptor;
 import org.apache.portals.applications.webcontent.rewriter.rules.Ruleset;
 import org.apache.portals.applications.webcontent.rewriter.xml.SaxParserAdaptor;
@@ -47,7 +47,7 @@
  */
 public class MappingRewriterController implements RewriterController
 {
-    protected final static Log log = LogFactory.getLog(MappingRewriterController.class);
+    protected final static Logger log = LoggerFactory.getLogger(MappingRewriterController.class);
     final static String CONFIG_MAPPING_FILE = "mapping";
     final static String CONFIG_BASIC_REWRITER = "basic.class";
     final static String CONFIG_RULESET_REWRITER = "ruleset.class";

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/RulesetRewriterImpl.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/RulesetRewriterImpl.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/RulesetRewriterImpl.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/RulesetRewriterImpl.java
Tue May  5 03:29:47 2009
@@ -18,8 +18,8 @@
 
 import java.util.Iterator;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.portals.applications.webcontent.rewriter.rules.Attribute;
 import org.apache.portals.applications.webcontent.rewriter.rules.Rule;
@@ -35,7 +35,7 @@
  */
 public class RulesetRewriterImpl extends BasicRewriter implements RulesetRewriter
 {
-    protected final static Log log = LogFactory.getLog(RulesetRewriterImpl.class);
+    protected final static Logger log = LoggerFactory.getLogger(RulesetRewriterImpl.class);
     
     private Ruleset ruleset = null;
     private boolean removeComments = false;

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/SwingParserAdaptor.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/SwingParserAdaptor.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/SwingParserAdaptor.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/SwingParserAdaptor.java
Tue May  5 03:29:47 2009
@@ -25,8 +25,8 @@
 import javax.swing.text.html.HTML;
 import javax.swing.text.html.HTMLEditorKit;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.portals.applications.webcontent.rewriter.ParserAdaptor;
 import org.apache.portals.applications.webcontent.rewriter.Rewriter;
 import org.apache.portals.applications.webcontent.rewriter.RewriterException;
@@ -39,7 +39,7 @@
  */
 public class SwingParserAdaptor implements ParserAdaptor
 {
-    protected final static Log log = LogFactory.getLog(SwingParserAdaptor.class);
+    protected final static Logger log = LoggerFactory.getLogger(SwingParserAdaptor.class);
 
     private SwingParserAdaptor.Callback callback = null;
     private String lineSeparator;

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/neko/NekoParserAdaptor.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/neko/NekoParserAdaptor.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/neko/NekoParserAdaptor.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/html/neko/NekoParserAdaptor.java
Tue May  5 03:29:47 2009
@@ -19,8 +19,8 @@
 import java.io.Reader;
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.xerces.xni.parser.XMLDocumentFilter;
 import org.apache.xerces.xni.parser.XMLInputSource;
 
@@ -48,7 +48,7 @@
  */
 public class NekoParserAdaptor implements ParserAdaptor
 {
-    protected final static Log log = LogFactory.getLog(NekoParserAdaptor.class);
+    protected final static Logger log = LoggerFactory.getLogger(NekoParserAdaptor.class);
     
     /*
      * Construct a cyberneko HTML parser adaptor

Modified: portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/xml/SaxParserAdaptor.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/xml/SaxParserAdaptor.java?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/xml/SaxParserAdaptor.java
(original)
+++ portals/applications/webcontent/trunk/webcontent-jar/src/main/java/org/apache/portals/applications/webcontent/rewriter/xml/SaxParserAdaptor.java
Tue May  5 03:29:47 2009
@@ -29,8 +29,8 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.portals.applications.webcontent.rewriter.ParserAdaptor;
 import org.apache.portals.applications.webcontent.rewriter.Rewriter;
 import org.apache.portals.applications.webcontent.rewriter.RewriterException;
@@ -48,7 +48,7 @@
  */
 public class SaxParserAdaptor implements ParserAdaptor
 {
-    protected final static Log log = LogFactory.getLog(SaxParserAdaptor.class);
+    protected final static Logger log = LoggerFactory.getLogger(SaxParserAdaptor.class);
     private String lineSeparator;
 
     private Rewriter rewriter;

Modified: portals/applications/webcontent/trunk/webcontent-war/pom.xml
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/pom.xml?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/pom.xml (original)
+++ portals/applications/webcontent/trunk/webcontent-war/pom.xml Tue May  5 03:29:47 2009
@@ -34,23 +34,10 @@
 
   <!-- Dependencies -->
   <properties>
-    <portlet-api.version>2.0</portlet-api.version>
     <javax.servlet.version>2.4</javax.servlet.version>
     <org.apache.portals.bridges.common.version>1.0.4</org.apache.portals.bridges.common.version>
-    <org.apache.portals.bridges.velocity.version>1.0.4</org.apache.portals.bridges.velocity.version>
-    <portals.applications.apa-webapp-logging.version>1.0-SNAPSHOT</portals.applications.apa-webapp-logging.version>
-    <xalan.version>2.4.1</xalan.version>
-    <xerces.version>2.3.0</xerces.version>
-    <xml-apis.version>2.0.2</xml-apis.version>
-    <junit.version>3.8.1</junit.version>
-    <nekohtml.version>0.9.5</nekohtml.version>
-    <castor.version>1.1.1-xml</castor.version>
-    <commons-httpclient.version>3.0.1</commons-httpclient.version>
-    <velocity-tools.version>1.3</velocity-tools.version>
     <commons-digester.version>1.8</commons-digester.version>
-    <commons-lang.version>2.1</commons-lang.version>
-    <commons-collections.version>3.2</commons-collections.version>
-    <log4j.version>1.2.14</log4j.version>
+    <slf4j.version>1.5.6</slf4j.version>
     <oro.version>2.0.8</oro.version>
   </properties>
 
@@ -59,16 +46,16 @@
     <!-- Runtime Dependencies -->
 
     <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>${javax.servlet.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.portals.bridges</groupId>
       <artifactId>portals-bridges-common</artifactId>
       <version>${org.apache.portals.bridges.common.version}</version>
       <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>${pom.groupId}</groupId>
@@ -76,15 +63,14 @@
       <version>${pom.version}</version>
     </dependency>
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>${log4j.version}</version>
-      <scope>runtime</scope>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${slf4j.version}</version>
     </dependency>
     <dependency>
-      <groupId>xml-apis</groupId>
-      <artifactId>xml-apis</artifactId>
-      <version>${xml-apis.version}</version>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <version>${slf4j.version}</version>
     </dependency>
     <dependency>
       <groupId>commons-digester</groupId>
@@ -100,5 +86,8 @@
     </dependency>
 
   </dependencies>
+  <build>
+     <finalName>apa-webcontent</finalName>
+  </build>
 
 </project>

Added: portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java?rev=771536&view=auto
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
(added)
+++ portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
Tue May  5 03:29:47 2009
@@ -0,0 +1,57 @@
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+/**
+ * Simple ServletContextListener which sets a system property to the current webapp root
folder.
+ * <p>
+ * The system property name to be used needs to be configured in web.xml with the <code>webAppRootKey</code>
init parameter.
+ * If not configured, it will use as default "webapp.root".
+ * <em>beware of using this default for multiple webapps at the same time: webcontainers
like Tomcat only use a single system
+ * properties space.
+ * </p>
+ * <p>
+ * The primary purpose of this listener is to allow using a webapp root folder relative path
for log4j logging.
+ * </p>
+ * @version $Id$
+ *
+ */
+public class WebAppRootListener implements ServletContextListener
+{
+    private static final String WEBAPP_ROOT_KEY = "webAppRootKey";
+    private static final String DEFAULT_WEBAPP_ROOT_PROPERTY_NAME = "webapp.root";
+    
+    public void contextInitialized(ServletContextEvent sce)
+    {
+        String webAppRootPropertyName = sce.getServletContext().getInitParameter(WEBAPP_ROOT_KEY);
+        if (webAppRootPropertyName == null)
+        {
+            webAppRootPropertyName = DEFAULT_WEBAPP_ROOT_PROPERTY_NAME; 
+        }
+        String webAppRoot = sce.getServletContext().getRealPath("/");
+        if (webAppRoot == null)
+        {
+            throw new IllegalStateException("Cannot use this WebAppRootListener in a non-expanded
webapplication");
+        }
+        System.setProperty(webAppRootPropertyName, webAppRoot);
+    }
+    
+    public void contextDestroyed(ServletContextEvent sce)
+    {
+    }
+}

Propchange: portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/applications/webcontent/trunk/webcontent-war/src/main/java/WebAppRootListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties
(from r771262, portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/log4j.properties)
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties?p2=portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties&p1=portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/log4j.properties&r1=771262&r2=771536&rev=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/log4j.properties
(original)
+++ portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties
Tue May  5 03:29:47 2009
@@ -45,7 +45,7 @@
 # pa.log
 #
 log4j.appender.pa = org.apache.log4j.FileAppender
-log4j.appender.pa.file = ${webApplicationRoot}/logs/pa.log
+log4j.appender.pa.file = ${org.apache.portals.applications.webcontent.webappRoot}/logs/pa.log
 log4j.appender.pa.layout = org.apache.log4j.PatternLayout
 log4j.appender.pa.layout.conversionPattern = %d [%t] %-5p %c - %m%n
 log4j.appender.pa.append = false
@@ -54,7 +54,7 @@
 # velocity.log
 #
 log4j.appender.velocity = org.apache.log4j.FileAppender
-log4j.appender.velocity.file = ${webApplicationRoot}/logs/velocity.log
+log4j.appender.velocity.file = ${org.apache.portals.applications.webcontent.webappRoot}/logs/velocity.log
 log4j.appender.velocity.layout = org.apache.log4j.PatternLayout
 log4j.appender.velocity.layout.conversionPattern = %d [%t] %-5p %c - %m%n
 log4j.appender.velocity.append = false

Propchange: portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/classes/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/portlet.xml?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/portlet.xml
(original)
+++ portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/portlet.xml
Tue May  5 03:29:47 2009
@@ -15,10 +15,11 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<portlet-app id="webcontent" 
-    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<portlet-app id='webcontent'
+              xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" 
+              version="2.0" 
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+              xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
 
     <portlet>
         <description>Places an HTML IFrame inside a portlet for easily hosting other
web application within a portlet. Sizes of both normal and maximized modes are configurable
in edit mode.</description>

Modified: portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/web.xml?rev=771536&r1=771535&r2=771536&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/web.xml (original)
+++ portals/applications/webcontent/trunk/webcontent-war/src/main/webapp/WEB-INF/web.xml Tue
May  5 03:29:47 2009
@@ -15,23 +15,19 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-                         "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.4"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    
   <display-name>Webcontent Portlet Application</display-name>
   <description>Apache Portals Applications: Webcontent PA</description>
   
-  <servlet>
-    <servlet-name>JetspeedContainer</servlet-name>
-    <display-name>Jetspeed Container</display-name>
-    <description>MVC Servlet for Jetspeed Portlet Applications</description>
-    <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
-    <init-param>
-      <param-name>contextName</param-name>
-      <param-value>webcontent</param-value>
-    </init-param>                          
-    <load-on-startup>100</load-on-startup>      
-  </servlet>
+    <context-param>
+        <param-name>webAppRootKey</param-name>
+        <param-value>org.apache.portals.applications.webcontent.webappRoot</param-value>
+    </context-param>
+    <listener>
+        <listener-class>WebAppRootListener</listener-class>
+    </listener>
     
     <!-- Define Velocity Servlet -->
 	<servlet>
@@ -46,8 +42,7 @@
 			<param-value>/WEB-INF/velocity/velocity.properties</param-value>
 		</init-param>
 		<load-on-startup>10</load-on-startup>
-	</servlet>
-	
+	</servlet>	
 	
     <!-- Map *.vm files to Velocity  -->
 	<servlet-mapping>
@@ -55,14 +50,4 @@
 		<url-pattern>*.vm</url-pattern>
 	</servlet-mapping>	
 
-  <servlet-mapping>
-     <servlet-name>
-        JetspeedContainer
-     </servlet-name>
-     <url-pattern>
-       /container/*
-     </url-pattern>
-  </servlet-mapping>
-    
-
 </web-app>



Mime
View raw message