Author: antelder
Date: Mon Mar  2 14:31:01 2009
New Revision: 749316

URL: http://svn.apache.org/viewvc?rev=749316&view=rev
Log:
Add an archetype for a JSF and SCA webapp

Added:
    tuscany/java/sca/archetypes/quickstart-jsf/   (with props)
    tuscany/java/sca/archetypes/quickstart-jsf/pom.xml
    tuscany/java/sca/archetypes/quickstart-jsf/src/
    tuscany/java/sca/archetypes/quickstart-jsf/src/main/
    tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/
    tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/resources/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp
    
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp

Propchange: tuscany/java/sca/archetypes/quickstart-jsf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar  2 14:31:01 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders

Added: tuscany/java/sca/archetypes/quickstart-jsf/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/pom.xml?rev=749316&view=auto
==============================================================================
--- tuscany/java/sca/archetypes/quickstart-jsf/pom.xml (added)
+++ tuscany/java/sca/archetypes/quickstart-jsf/pom.xml Mon Mar  2 14:31:01 2009
@@ -0,0 +1,50 @@
+<?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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-modules</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>tuscany-quickstart-jsf</artifactId>
+    <packaging>maven-archetype</packaging>
+    <name>Create a Tuscany SCA and JSF project</name>
+
+    <build>
+       <extensions>
+          <extension>
+             <groupId>org.apache.maven.archetype</groupId>
+             <artifactId>archetype-packaging</artifactId>
+             <version>2.0-alpha-4</version>
+          </extension>
+       </extensions>
+       <plugins>
+          <plugin>
+             <artifactId>maven-archetype-plugin</artifactId>
+             <version>2.0-alpha-4</version>
+             <extensions>true</extensions>
+          </plugin>
+       </plugins>
+    </build>
+
+</project>

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="myproject">
+  <fileSets>
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/main/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/webapp</directory>
+      <includes>
+        <include>**/*.jsp</include>
+        <include>**/*.xml</include>
+        <include>**/*.html</include>
+        <include>**/*.composite</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/resources</directory>
+      <includes>
+        <include>**/*.properties</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</archetype-descriptor>
\ No newline at end of file

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><archetype>
+  <id>quickstart-stripes</id>
+  <sources>
+    <source>src\main\java\sample\stripes\action\BaseActionBean.java</source>
+    <source>src\main\java\sample\stripes\action\HomeActionBean.java</source>
+    <source>src\main\java\sample\sca\HelloworldService.java</source>
+    <source>src\main\java\sample\sca\HelloworldServiceImpl.java</source>
+  </sources>
+  <resources>
+    <resource>src\main\resources\log4j.properties</resource>
+    <resource>src\main\resources\StripesResources.properties</resource>
+    <resource>src\main\webapp\index.html</resource>
+    <resource>src\main\webapp\WEB-INF\jsp\home.jsp</resource>
+    <resource>src\main\webapp\WEB-INF\jsp\layout.jsp</resource>
+    <resource>src\main\webapp\WEB-INF\jsp\taglibs.jsp</resource>
+    <resource>src\main\webapp\WEB-INF\web.composite</resource>
+    <resource>src\main\webapp\WEB-INF\web.xml</resource>
+  </resources>
+</archetype>
\ No newline at end of file

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,152 @@
+<?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.    
+-->
+<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>
+       <groupId>${groupId}</groupId>
+       <artifactId>${artifactId}</artifactId>
+       <packaging>war</packaging>      
+       <version>${version}</version>
+       #literal()<!-- TODO project name  -->
+       <name>quickstart-jsf</name>
+       <description></description>
+
+    <dependencies>
+
+        <!--  Tuscany dependencies -->
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <version>${tuscany.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-myfaces</artifactId>
+            <version>${tuscany.version}</version>
+        </dependency>
+
+        <!--  MyFaces JSF dependencies -->
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+            <version>1.2.2</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-impl</artifactId>
+            <version>1.2.2</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.myfaces.tomahawk</groupId>
+            <artifactId>tomahawk</artifactId>
+            <version>1.1.6</version>
+            <scope>runtime</scope>    
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>jstl</artifactId>
+                </exclusion>
+            </exclusions>    
+        </dependency>
+        
+        <dependency>
+            <groupId>jstl</groupId>
+            <artifactId>jstl</artifactId>
+            <version>1.2</version>
+            <scope>runtime</scope>
+        </dependency>        
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.0</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+       <build>
+            <defaultGoal>install</defaultGoal>
+            <finalName>${artifactId}</finalName>
+               <resources>
+                       <resource>
+                               <filtering>false</filtering>
+                               <directory>src/main/resources</directory>
+                       </resource>
+                       <resource>
+                               <filtering>false</filtering>
+                               <directory>src/main/java</directory>
+                               <includes>
+                                       <include>**</include>
+                               </includes>
+                               <excludes>
+                                       <exclude>**/*.java</exclude>
+                               </excludes>
+                       </resource>
+               </resources>
+               <testResources>
+                       <testResource>
+                               <filtering>false</filtering>
+                               <directory>src/test/java</directory>
+                               <includes>
+                                       <include>**</include>
+                               </includes>
+                               <excludes>
+                                       <exclude>**/*.java</exclude>
+                               </excludes>
+                       </testResource>
+               </testResources>
+               <plugins>
+                       <plugin>
+                               <inherited>true</inherited>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <configuration>
+                                       <source>1.5</source>
+                                       <target>1.5</target>
+                                       <optimise>true</optimise>
+                                       <debug>true</debug>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.mortbay.jetty</groupId>
+                               <artifactId>maven-jetty-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-eclipse-plugin</artifactId>
+                               <configuration>
+                                       <downloadSources>true</downloadSources>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <properties>
+               <tuscany.version>2.0-SNAPSHOT</tuscany.version>
+               <myfaces.version>1.5</myfaces.version>
+       </properties>
+       #end
+
+</project>

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,64 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+*/
+package ${package}.myfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+
+import ${package}.sca.HelloworldService;
+
+/**
+ * A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
+ * 
+ */
+public class HelloWorldController {
+
+    //properties
+    private String name;
+
+    @Reference
+    private HelloworldService service;
+    
+    /**
+     * default empty constructor
+     */
+    public HelloWorldController(){
+    }
+    
+    //-------------------getter & setter
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    
+    /**
+     * Method that is backed to a submit button of a form.
+     */
+    public String send(){
+
+        // invoke the SCA reference    
+        name = service.sayHello(name);
+
+        return "success";
+    }
+}
\ No newline at end of file

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,28 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.    
+ */
+package ${package}.sca;
+
+public interface HelloworldService {
+
+    String sayHello(String name);
+
+}

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,30 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.    
+ */
+package ${package}.sca;
+
+public class HelloworldServiceImpl implements HelloworldService {
+
+    public String sayHello(String name) {
+        return "Hello " + name;
+    }
+
+}

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,54 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0"?>
+<!--
+ * 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.
+-->
+
+<faces-config version="1.2" 
+    xmlns="http://java.sun.com/xml/ns/javaee";
+    xmlns:xi="http://www.w3.org/2001/XInclude";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";>
+       
+       <!-- managed beans of the simple hello world app -->
+       <managed-bean>
+               <managed-bean-name>helloWorld</managed-bean-name>
+               
<managed-bean-class>${package}.myfaces.HelloWorldController</managed-bean-class>
+               <managed-bean-scope>request</managed-bean-scope>
+       </managed-bean>
+       
+       <!-- navigation rules for helloWorld.jsp -->
+       <navigation-rule>
+               <from-view-id>/helloWorld.jsp</from-view-id>
+               <navigation-case>
+                       <from-outcome>success</from-outcome>
+                       <to-view-id>/page2.jsp</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+       
+       <!-- navigation rules for page2.jsp -->
+       <navigation-rule>
+               <from-view-id>/page2.jsp</from-view-id>
+               <navigation-case>
+                       <from-outcome>back</from-outcome>
+                       <to-view-id>/helloWorld.jsp</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+</faces-config>
\ No newline at end of file

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,35 @@
+<?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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
+           targetNamespace="http://${package}";
+           name="${artifactId}">
+
+    <component name="${artifactId}WebComponent">
+        <implementation.web web-uri=""/>
+        <reference name="service" target="HelloworldComponent"/>
+    </component>
+
+    <component name="HelloworldComponent">
+        <implementation.java class="${package}.sca.HelloworldServiceImpl"/>
+    </component>
+
+</composite>
+

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,230 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.    
+-->
+<web-app 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";
+         version="2.4">
+
+    <display-name>${artifactId}</display-name>
+
+    <!-- The only web.xml change to the MyFaces Helloworld sample is to add
+         the Tuscany listener and annotation processor context parameter -->
+    <listener>
+       
<listener-class>org.apache.tuscany.sca.host.webapp.TuscanyContextListener</listener-class>
+    </listener>
+    <context-param>
+        
<param-name>org.apache.myfaces.config.annotation.LifecycleProvider</param-name>
+        
<param-value>org.apache.tuscany.myfaces.TuscanyAnnotationLifecycleProvider</param-value>
+    </context-param>
+
+    <!--optional: context-param>
+        <description>Comma separated list of URIs of (additional) faces config 
files.
+            (e.g. /WEB-INF/my-config.xml)
+            See JSF 1.0 PRD2, 10.3.2
+            Attention: You do not need to put /WEB-INF/faces-config.xml in 
here.
+        </description>
+        <param-name>javax.faces.CONFIG_FILES</param-name>
+        <param-value>/WEB-INF/examples-config.xml</param-value>
+    </context-param-->
+    <context-param>
+        <description>State saving method: "client" or "server" (= default)
+            See JSF Specification 2.5.3</description>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>client</param-value>
+    </context-param>
+    <context-param>
+        <description>Only applicable if state saving method is "server" (= 
default).
+            Defines the amount (default = 20) of the latest views are stored 
in session.</description>
+        <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
+        <param-value>20</param-value>
+    </context-param>
+    <context-param>
+        <description>Only applicable if state saving method is "server" (= 
default).
+            If true (default) the state will be serialized to a byte stream 
before it
+            is written to the session.
+            If false the state will not be serialized to a byte 
stream.</description>
+        <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Only applicable if state saving method is "server" (= 
default) and if
+            org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default)
+            If true (default) the serialized state will be compressed before it
+            is written to the session. If false the state will not be 
compressed.</description>
+        <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>This parameter tells MyFaces if javascript code should be 
allowed in the
+            rendered HTML output.
+            If javascript is allowed, command_link anchors will have 
javascript code
+            that submits the corresponding form.
+            If javascript is not allowed, the state saving info and nested 
parameters
+            will be added as url parameters.
+            Default: "true"</description>
+        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>If true, rendered HTML code will be formatted, so that it 
is "human readable".
+            i.e. additional line separators and whitespace will be written, 
that do not
+            influence the HTML code.
+            Default: "true"</description>
+        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>If true, a javascript function will be rendered that is 
able to restore the
+            former vertical scroll on every request. Convenient feature if you 
have pages
+            with long lists and you do not want the browser page to always 
jump to the top
+            if you trigger a link or button action that stays on the same page.
+            Default: "false"</description>
+        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <description>Used for encrypting view state. Only relevant for client 
side
+            state saving. See MyFaces wiki/web site documentation for 
instructions
+            on how to configure an application for diffenent encryption 
strengths.
+        </description>
+        <param-name>org.apache.myfaces.SECRET</param-name>
+        <param-value>NzY1NDMyMTA=</param-value>
+    </context-param>
+
+    <context-param>
+        <description>
+            Validate managed beans, navigation rules and ensure that forms are 
not nested.
+        </description>
+        <param-name>org.apache.myfaces.VALIDATE</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    
+    <context-param>
+        <description>
+            Treat readonly same as if disabled attribute was set for select 
elements.
+        </description>
+        
<param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
+        <param-value>true</param-value>
+    </context-param>    
+    
+    <context-param>
+        <description>
+            Use the defined class as the class which will be called when a 
resource is added to the
+            ExtensionFilter handling. Using StreamingAddResource here helps 
with performance. If you want to add
+            custom components and want to use the ExtensionFilter, you need to 
provide your custom implementation here.
+        </description>
+        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
+        
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
+    </context-param>        
+
+    <context-param>
+        <description>
+            Virtual path in the URL which triggers loading of resources for 
the MyFaces extended components
+            in the ExtensionFilter.
+        </description>
+        <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
+        <param-value>/faces/myFacesExtensionResource</param-value>
+    </context-param>
+    
+    <context-param>
+        <description>
+            Check if the extensions-filter has been properly configured.
+        </description>
+        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
+        <param-value>true</param-value>
+    </context-param>    
+
+    <context-param>
+        <description>
+            Define partial state saving as true/false.
+        </description>
+        <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
+        <param-value>false</param-value>
+    </context-param>    
+
+    <!-- Extensions Filter -->
+    <filter>
+        <filter-name>extensionsFilter</filter-name>
+        
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+        <init-param>
+            <description>Set the size limit for uploaded files.
+                Format: 10 - 10 bytes
+                10k - 10 KB
+                10m - 10 MB
+                1g - 1 GB</description>
+            <param-name>uploadMaxFileSize</param-name>
+            <param-value>100m</param-value>
+        </init-param>
+        <init-param>
+            <description>Set the threshold size - files
+                below this limit are stored in memory, files above
+                this limit are stored on disk.
+
+                Format: 10 - 10 bytes
+                10k - 10 KB
+                10m - 10 MB
+                1g - 1 GB</description>
+            <param-name>uploadThresholdSize</param-name>
+            <param-value>100k</param-value>
+        </init-param>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>extensionsFilter</filter-name>
+        <url-pattern>*.jsf</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>extensionsFilter</filter-name>
+        <url-pattern>/faces/*</url-pattern>
+    </filter-mapping>
+
+    <!-- Listener, to allow Jetty serving MyFaces apps -->
+    <listener>
+        
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
+    <!-- Faces Servlet -->
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <!-- Faces Servlet Mapping -->
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+    </servlet-mapping>
+
+    <!-- Welcome files -->
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,19 @@
+<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
+<html>
+    <head>
+        <title>Hello World</title>
+    </head>
+    <body>
+        <f:view>
+            <h:form id="mainForm">
+              <h:panelGrid columns="2">
+                <h:outputLabel for="name" value="Please enter your name" />
+                <h:inputText id="name" value="#{helloWorld.name}" 
required="true"/>
+                <h:commandButton value="Press me" action="#{helloWorld.send}"/>
+                <h:messages showDetail="true" showSummary="false"/>
+              </h:panelGrid>
+            </h:form>
+        </f:view>
+    </body>
+</html>

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,4 @@
+<%@ page session="false"%>
+<%
+response.sendRedirect("helloWorld.jsf");
+%>
\ No newline at end of file

Added: 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp?rev=749316&view=auto
==============================================================================
--- 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp
 (added)
+++ 
tuscany/java/sca/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp
 Mon Mar  2 14:31:01 2009
@@ -0,0 +1,17 @@
+<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
+<html>
+    <head>
+        <title>Hello World</title>
+    </head>
+    <body>
+        <f:view>
+            <h:form id="mainForm">
+                <h2><h:outputText value="#{helloWorld.name}. We hope you enjoy 
SCA and JSF with Apache Tuscany and MyFaces"/></h2>
+                <h:commandLink action="back">
+                    <h:outputText value="Home"/>
+                </h:commandLink>
+            </h:form>
+        </f:view>
+    </body>
+</html>
\ No newline at end of file


Reply via email to