You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2008/04/16 15:44:15 UTC

svn commit: r648696 - in /cocoon/whiteboard/corona/trunk/corona-webapp-sample: ./ src/ src/main/ src/main/resources/ src/main/webapp/ src/main/webapp/WEB-INF/

Author: reinhard
Date: Wed Apr 16 06:44:11 2008
New Revision: 648696

URL: http://svn.apache.org/viewvc?rev=648696&view=rev
Log:
. add a sample web application module for Corona

Added:
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/   (with props)
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml   (with props)
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/resources/
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml   (with props)
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml   (with props)
    cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml   (with props)

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Apr 16 06:44:11 2008
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Added: cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml?rev=648696&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml Wed Apr 16 06:44:11 2008
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!-- $Id$ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>war</packaging>
+
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>corona-parent</artifactId>
+    <version>1-SNAPSHOT</version>
+    <relativePath>../parent/pom.xml</relativePath>
+  </parent>
+  <name>Cocoon Corona: Webapplication sample [war]</name>
+  <artifactId>corona-webapp-sample</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.7</version>
+        <configuration>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>8888</port>
+              <maxIdleTime>30000</maxIdleTime>
+            </connector>
+          </connectors>
+          <webAppSourceDirectory>${project.build.directory}/${pom.artifactId}-${pom.version}</webAppSourceDirectory>
+          <contextPath>/</contextPath>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>corona-servlet</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.14</version>
+    </dependency>
+  </dependencies>
+
+</project>

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml?rev=648696&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml Wed Apr 16 06:44:11 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+                           http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+  <!-- Activate Cocoon Spring Configurator -->
+  <configurator:settings/>
+
+  <!-- Configure Log4j -->
+  <bean name="org.apache.cocoon.spring.configurator.log4j"
+        class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+        scope="singleton">
+    <property name="settings" ref="org.apache.cocoon.configuration.Settings"/>
+    <property name="resource" value="/WEB-INF/log4j.xml"/>
+  </bean>
+
+</beans>

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml?rev=648696&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml Wed Apr 16 06:44:11 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+  <!--
+    - This is a sample configuration for log4j.
+    - It simply just logs everything into a single log file.
+    - Note, that you can use properties for value substitution.
+    -->
+  <appender name="CORE" class="org.apache.log4j.FileAppender">
+    <param name="File"   value="${org.apache.cocoon.work.directory}/cocoon-logs/log4j.log" />
+    <param name="Append" value="false" />
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d %-5p %t %c - %m%n"/>
+    </layout>
+  </appender>
+
+  <root>
+    <priority value="${org.apache.cocoon.log4j.loglevel}"/>
+    <appender-ref ref="CORE"/>
+  </root>
+</log4j:configuration>

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/log4j.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml?rev=648696&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml Wed Apr 16 06:44:11 2008
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!-- $Id$ -->
+<web-app version="2.4"
+         xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+  <!-- Servlet Context Listener ======================================= -->
+
+  <!--
+    - Declare a context listener that installs all blocks.
+    -->
+  <listener>
+    <description>Declare a context listener that installs all blocks.</description>
+    <listener-class>org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener</listener-class>
+  </listener>
+
+  <!--
+    - Declare Spring context listener which sets up the Spring Application Context
+    - containing all Cocoon components (and user defined beans as well).
+    -->
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+
+  <!--
+    - Declare Spring request listener which sets up the required RequestAttributes
+    - to support Springs and Cocoon custom bean scopes like the request scope or the
+    - session scope.
+    -->
+  <listener>
+    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+  </listener>
+
+  <!-- Servlet Configuration ========================================== -->
+
+  <!--
+    - Servlet that dispatches requests to the Spring managed block servlets
+    -->
+  <servlet>
+    <description>Cocoon blocks dispatcher</description>
+    <display-name>DispatcherServlet</display-name>
+    <servlet-name>DispatcherServlet</servlet-name>
+    <servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- URL space mappings ============================================= -->
+
+  <!--
+    - The Servlet-Service framework handles all the URL space assigned to the webapp using its sitemap.
+    - It is recommended to leave it unchanged. Under some circumstances though
+    - (like integration with proprietary webapps or servlets) you might have
+    - to change this parameter.
+    -->
+  <servlet-mapping>
+    <servlet-name>DispatcherServlet</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+
+</web-app>

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-webapp-sample/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml