You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by vi...@apache.org on 2012/12/22 19:00:42 UTC

svn commit: r1425328 - in /openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources: META-INF/ archetype-resources/ archetype-resources/src/main/java/ archetype-resources/src/main/java/application/ archetype-resources/src/main/java/entitie...

Author: vishwanathk
Date: Sat Dec 22 18:00:41 2012
New Revision: 1425328

URL: http://svn.apache.org/viewvc?rev=1425328&view=rev
Log:
TOMEE-675 A basic crud with JSF front end.

Added:
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp   (with props)
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml   (with props)
Removed:
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java
Modified:
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml
    openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml Sat Dec 22 18:00:41 2012
@@ -0,0 +1,27 @@
+<?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.
+  -->
+<archetype-descriptor name="basic">
+  <fileSets>
+    <fileSet filtered="true" packaged="true">
+      <directory>src/main/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</archetype-descriptor>

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml?rev=1425328&r1=1425327&r2=1425328&view=diff
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml (original)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml Sat Dec 22 18:00:41 2012
@@ -20,11 +20,20 @@
            xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0
                                http://maven.apache.org/xsd/archetype-1.0.0.xsd">
   <id>quickstart</id>
-  <sources>
-    <source>src/main/java/Index.java</source>
-  </sources>
+
+    <sources>
+        <source>src/main/java/application/BookService.java</source>
+        <source>src/main/java/entities/Book.java</source>
+        <source>src/main/java/presentation/BookBean.java</source>
+    </sources>
+
   <resources>
-    <resource>src/main/webapp/WEB-INF/beans.xml</resource>
+      <resource>src/main/resources/META-INF/persistence.xml</resource>
+     <resource>src/main/webapp/WEB-INF/beans.xml</resource>
+     <resource>src/main/webapp/WEB-INF/faces-config.xml</resource>
+     <resource>src/main/webapp/book.xhtml</resource>
+     <resource>src/main/webapp/result.xhtml</resource>
+     <resource>src/main/webapp/index.jsp</resource>
   </resources>
   <testResources>
     <resource>src/test/resources/arquillian.xml</resource>

Modified: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml?rev=1425328&r1=1425327&r2=1425328&view=diff
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml Sat Dec 22 18:00:41 2012
@@ -102,6 +102,34 @@
         <artifactId>tomee-maven-plugin</artifactId>
         <version>1.0.2-SNAPSHOT</version>
       </plugin>
+      <plugin>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-maven-plugin</artifactId>
+            <version>2.2.0</version>
+            <configuration>
+                <includes>**/entities/*.class</includes>
+                <excludes>**/entities/XML*.class</excludes>
+                <addDefaultConstructor>true</addDefaultConstructor>
+                <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+            </configuration>
+            <executions>
+                <execution>
+                    <id>enhancer</id>
+                    <phase>process-classes</phase>
+                    <goals>
+                        <goal>enhance</goal>
+                    </goals>
+                </execution>
+            </executions>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.openjpa</groupId>
+                    <artifactId>openjpa</artifactId>
+                    <!-- set the version to be the same as the level in your runtime -->
+                    <version>2.2.0</version>
+                </dependency>
+            </dependencies>
+        </plugin>
     </plugins>
   </build>
 

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java Sat Dec 22 18:00:41 2012
@@ -0,0 +1,44 @@
+/*
+ * 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}.application;
+
+import ${package}.entities.Book;
+
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.criteria.CriteriaQuery;
+import java.util.List;
+
+@Stateless
+public class BookService {
+
+    @PersistenceContext(unitName = "book-pu")
+    private EntityManager entityManager;
+
+    public void addBook(Book book)
+    {
+      entityManager.persist(book);
+    }
+
+    public List<Book> getAllBooks()
+    {
+        CriteriaQuery<Book> cq = entityManager.getCriteriaBuilder().createQuery(Book.class);
+        cq.select(cq.from(Book.class));
+        return entityManager.createQuery(cq).getResultList();
+    }
+}

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/application/BookService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java Sat Dec 22 18:00:41 2012
@@ -0,0 +1,52 @@
+/*
+ * 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}.entities;
+
+import javax.persistence.*;
+
+@Entity
+public class Book {
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private int bookId;
+    private String bookTitle;
+
+    public int getBookId() {
+        return bookId;
+    }
+
+    public void setBookId(int bookId) {
+        this.bookId = bookId;
+    }
+
+    public String getBookTitle() {
+        return bookTitle;
+    }
+
+    public void setBookTitle(String bookName) {
+        this.bookTitle = bookName;
+    }
+
+    @Override
+    public String toString() {
+        return "Book{" +
+                "bookId=" + bookId +
+                ", bookTitle='" + bookTitle + '\'' +
+                '}';
+    }
+}
+

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/entities/Book.java
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java Sat Dec 22 18:00:41 2012
@@ -0,0 +1,63 @@
+/*
+ * 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}.presentation;
+
+import ${package}.application.BookService;
+import ${package}.entities.Book;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import java.util.List;
+
+@Named
+public class BookBean {
+
+    @Inject
+    private BookService bookService;
+    private List<Book> booksAvailable;
+    private String bookTitle;
+
+    public String getBookTitle() {
+        return bookTitle;
+    }
+
+    public void setBookTitle(String bookTitle) {
+        this.bookTitle = bookTitle;
+    }
+
+    public List<Book> getBooksAvailable() {
+        return booksAvailable;
+    }
+
+    public void setBooksAvailable(List<Book> booksAvailable) {
+        this.booksAvailable = booksAvailable;
+    }
+
+    public String fetchBooks()
+    {
+        booksAvailable=bookService.getAllBooks();
+        return "success";
+    }
+
+    public String add()
+    {
+        Book book = new Book();
+        book.setBookTitle(bookTitle);
+        bookService.addBook(book);
+        return "success";
+    }
+}

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/presentation/BookBean.java
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml Sat Dec 22 18:00:41 2012
@@ -0,0 +1,29 @@
+<?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.
+-->
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+    <persistence-unit name="book-pu" transaction-type="JTA">
+        <jta-data-source>bookDatabase</jta-data-source>
+        <class>${package}.entities.Book</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+</persistence>
\ No newline at end of file

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml Sat Dec 22 18:00:41 2012
@@ -0,0 +1,42 @@
+<?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 xmlns="http://java.sun.com/xml/ns/javaee"
+              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_2_0.xsd"
+              version="2.0">
+
+  <navigation-rule>
+    <from-view-id>/book.xhtml</from-view-id>
+    <navigation-case>
+      <from-outcome>success</from-outcome>
+      <to-view-id>/result.xhtml</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/result.xhtml</from-view-id>
+    <navigation-case>
+      <from-outcome>back</from-outcome>
+      <to-view-id>/book.xhtml</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+</faces-config>
\ No newline at end of file

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml Sat Dec 22 18:00:41 2012
@@ -0,0 +1,41 @@
+<?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 html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html">
+
+
+<h:body bgcolor="white">
+    <f:view>
+        <h:form>
+            <h:panelGrid columns="2">
+                <h:outputText value='Enter book title'/>
+                <h:inputText value='#{bookBean.bookTitle}'/>
+                <h:outputText value='Add'/>
+                <h:commandButton action="#{bookBean.add}" value="Add"/>
+            </h:panelGrid>
+        </h:form>
+    </f:view>
+</h:body>
+</html>

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/book.xhtml
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp Sat Dec 22 18:00:41 2012
@@ -0,0 +1,22 @@
+<!--
+* 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.
+-->
+<%@ page session="false" %>
+<%
+    response.sendRedirect("book.jsf");
+%>
\ No newline at end of file

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:executable = *

Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml?rev=1425328&view=auto
==============================================================================
--- openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml (added)
+++ openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml Sat Dec 22 18:00:41 2012
@@ -0,0 +1,47 @@
+<?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 html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<h:body>
+<f:view>
+    <h:form id="mainForm">
+        <h2>Book Added !</h2>
+        <h:commandLink action="back">
+            <h:outputText value="Add more books"/>
+        </h:commandLink>
+
+
+        <h:commandButton action="#{bookBean.fetchBooks}" value="View books present"/>
+
+        <br/>
+        <ui:repeat value="#{bookBean.booksAvailable}" var="book">
+            #{book.bookTitle} <br/>
+        </ui:repeat>
+
+    </h:form>
+</f:view>
+</h:body>
+</html>
\ No newline at end of file

Propchange: openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/result.xhtml
------------------------------------------------------------------------------
    svn:executable = *