summaryrefslogtreecommitdiffstats
path: root/sandbox/rfeng/helloworld-jsp-gae-contribution/war
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-14 17:08:37 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-14 17:08:37 +0000
commitb9c1e93951e71d729ea283e96f39729033465c57 (patch)
treefa1fc24c9618cb0ed931216e371d452e566968cc /sandbox/rfeng/helloworld-jsp-gae-contribution/war
parenta5fd66b093d087b2062e9143c0c4732ed98d0ed9 (diff)
Add a variant of helloworld-jsp-google-appengine that loads the Tuscany SCA node from the people.apache.org
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@825195 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/rfeng/helloworld-jsp-gae-contribution/war')
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/appengine-web.xml11
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jarbin0 -> 8776503 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jarbin0 -> 338903 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jarbin0 -> 245333 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jarbin0 -> 1933065 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jarbin0 -> 152768 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jarbin0 -> 52877 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jarbin0 -> 16030 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jarbin0 -> 192820 bytes
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/logging.properties28
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/web.xml32
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/error.jsp35
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/hello.jsp60
-rw-r--r--sandbox/rfeng/helloworld-jsp-gae-contribution/war/index.html36
14 files changed, 202 insertions, 0 deletions
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/appengine-web.xml b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/appengine-web.xml
new file mode 100644
index 0000000000..6d80666550
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/appengine-web.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>scacloud</application>
+ <version>3</version>
+
+ <!-- Configure java.util.logging -->
+ <system-properties>
+ <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+ </system-properties>
+
+</appengine-web-app> \ No newline at end of file
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar
new file mode 100644
index 0000000000..5e461a1bb5
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar
new file mode 100644
index 0000000000..5325404d25
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar
new file mode 100644
index 0000000000..fa0773db98
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jar
new file mode 100644
index 0000000000..c450ab94f3
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar
new file mode 100644
index 0000000000..c326e0bc08
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar
new file mode 100644
index 0000000000..12d4ab0d28
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar
new file mode 100644
index 0000000000..ee9963dfc8
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jar b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jar
new file mode 100644
index 0000000000..2547a0b03f
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jar
Binary files differ
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/logging.properties b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/logging.properties
new file mode 100644
index 0000000000..4a78b7f353
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/logging.properties
@@ -0,0 +1,28 @@
+# A default java.util.logging configuration.
+# (All App Engine logging is through java.util.logging by default).
+#
+# To use this configuration, copy it into your application's WEB-INF
+# folder and add the following to your appengine-web.xml:
+#
+# <system-properties>
+# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+# </system-properties>
+#
+
+# Set the default logging level for all loggers to WARNING
+.level = WARNING
+
+# Set the default logging level for ORM, specifically, to WARNING
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.Cache.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.Datastore.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/web.xml b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/web.xml
new file mode 100644
index 0000000000..4050c8274a
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/web.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <servlet>
+ <servlet-name>HelloWorld</servlet-name>
+ <servlet-class>sample.appengine.HelloWorldServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloWorld</servlet-name>
+ <url-pattern>/helloworld</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+ <filter>
+ <filter-name>tuscany</filter-name>
+ <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
+
+ <init-param>
+ <param-name>node.configuration</param-name>
+ <param-value>http://people.apache.org/~rfeng/tuscany/nodes/helloworld-node.xml</param-value>
+ </init-param>
+
+ </filter>
+
+ <filter-mapping>
+ <filter-name>tuscany</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</web-app>
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/error.jsp b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/error.jsp
new file mode 100644
index 0000000000..2a1bb23c91
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/error.jsp
@@ -0,0 +1,35 @@
+<%@ page isErrorPage="true" import="java.io.*"%>
+<html>
+<head>
+<title>Exceptional Even Occurred!</title>
+<style>
+body,p {
+ font-family: Tahoma;
+ font-size: 10pt;
+ padding-left: 30;
+}
+
+pre {
+ font-size: 8pt;
+}
+</style>
+</head>
+<body>
+
+<%-- Exception Handler --%>
+<font color="red"> <%=exception.toString()%><br>
+</font>
+
+<%
+ out.println("<!--");
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ exception.printStackTrace(pw);
+ out.print(sw);
+ sw.close();
+ pw.close();
+ out.println("-->");
+%>
+
+</body>
+</html>
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/hello.jsp b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/hello.jsp
new file mode 100644
index 0000000000..c0bdf0d91e
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/hello.jsp
@@ -0,0 +1,60 @@
+<!--
+ * 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 contentType="text/html;charset=UTF-8" language="java"
+ errorPage="error.jsp"%>
+<%@ page import="com.google.appengine.api.users.User"%>
+<%@ page import="com.google.appengine.api.users.UserService"%>
+<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>
+
+<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca"%>
+
+<sca:reference name="service" type="sample.HelloworldService" />
+
+<html>
+<body>
+
+<%
+ UserService userService = UserServiceFactory.getUserService();
+ User user = userService.getCurrentUser();
+ if (user != null) {
+%>
+<p>Hello, <%=user.getNickname()%>! (You can <a
+ href="<%=userService.createLogoutURL(request.getRequestURI())%>">sign
+out</a>.)</p>
+<%
+ } else {
+%>
+<p>Hello! <a
+ href="<%=userService.createLoginURL(request.getRequestURI())%>">Sign
+in</a> to include your name with greetings you post.</p>
+<%
+ }
+%>
+
+<h2>Apache Tuscany Helloworld JSP Sample</h2>
+
+Calling HelloworldService sayHello("world, "+$user) returns:
+
+<p><%=service.sayHello("world ("+user+")")%>
+<form action="hello.jsp" method="get">
+ <input type="submit" value="Try Again">
+</form>
+</body>
+</html>
diff --git a/sandbox/rfeng/helloworld-jsp-gae-contribution/war/index.html b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/index.html
new file mode 100644
index 0000000000..1df9a9cf2c
--- /dev/null
+++ b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/index.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
+<!-- above set at the top of the file will set -->
+<!-- the browser's rendering engine into -->
+<!-- "Quirks Mode". Replacing this declaration -->
+<!-- with a "Standards Mode" doctype is supported, -->
+<!-- but may lead to some differences in layout. -->
+
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<title>SCA Cloud on Google App Engine</title>
+</head>
+
+<body>
+<h1>Tuscany SCA on Google App Engine</h1>
+
+<table>
+ <tr>
+ <td colspan="2" style="font-weight: bold;">Available Servlets:</td>
+ </tr>
+ <tr>
+ <td><a href="hello.jsp" />First SCA Application - Hello World!</td>
+ </tr>
+ <tr>
+ <td><a href="helloworld" />A Simple HelloWorld without SCA</td>
+ </tr>
+ <tr>
+ <td><a href="https://appengine.google.com/">Admin</a></td>
+ </tr>
+</table>
+<p>
+Brought to you by: <a href="http://tuscany.apache.org">Apache Tuscany - http://tuscany.apache.org</a>
+<p>
+</body>
+</html>