From b9c1e93951e71d729ea283e96f39729033465c57 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 14 Oct 2009 17:08:37 +0000 Subject: 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 --- .../war/WEB-INF/appengine-web.xml | 11 ++++ .../WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar | Bin 0 -> 8776503 bytes .../war/WEB-INF/lib/appengine-api-labs-1.2.5.jar | Bin 0 -> 338903 bytes .../WEB-INF/lib/datanucleus-appengine-1.0.3.jar | Bin 0 -> 245333 bytes .../war/WEB-INF/lib/datanucleus-core-1.1.5.jar | Bin 0 -> 1933065 bytes .../war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar | Bin 0 -> 152768 bytes .../WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar | Bin 0 -> 52877 bytes .../WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar | Bin 0 -> 16030 bytes .../war/WEB-INF/lib/jdo2-api-2.3-eb.jar | Bin 0 -> 192820 bytes .../war/WEB-INF/logging.properties | 28 ++++++++++ .../war/WEB-INF/web.xml | 32 +++++++++++ .../helloworld-jsp-gae-contribution/war/error.jsp | 35 ++++++++++++ .../helloworld-jsp-gae-contribution/war/hello.jsp | 60 +++++++++++++++++++++ .../helloworld-jsp-gae-contribution/war/index.html | 36 +++++++++++++ 14 files changed, 202 insertions(+) create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/appengine-web.xml create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jar create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/logging.properties create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/web.xml create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/error.jsp create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/hello.jsp create mode 100644 sandbox/rfeng/helloworld-jsp-gae-contribution/war/index.html (limited to 'sandbox/rfeng/helloworld-jsp-gae-contribution/war') 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 @@ + + + scacloud + 3 + + + + + + + \ 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-1.0-sdk-1.2.5.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/appengine-api-labs-1.2.5.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-appengine-1.0.3.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-core-1.1.5.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar 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 Binary files /dev/null and b/sandbox/rfeng/helloworld-jsp-gae-contribution/war/WEB-INF/lib/jdo2-api-2.3-eb.jar 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: +# +# +# +# +# + +# 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 @@ + + + + HelloWorld + sample.appengine.HelloWorldServlet + + + HelloWorld + /helloworld + + + index.html + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + node.configuration + http://people.apache.org/~rfeng/tuscany/nodes/helloworld-node.xml + + + + + + tuscany + /* + + 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.*"%> + + +Exceptional Even Occurred! + + + + +<%-- Exception Handler --%> + <%=exception.toString()%>
+
+ +<% + out.println(""); +%> + + + 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 @@ + + +<%@ 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"%> + + + + + + +<% + UserService userService = UserServiceFactory.getUserService(); + User user = userService.getCurrentUser(); + if (user != null) { +%> +

Hello, <%=user.getNickname()%>! (You can sign +out.)

+<% + } else { +%> +

Hello! Sign +in to include your name with greetings you post.

+<% + } +%> + +

Apache Tuscany Helloworld JSP Sample

+ +Calling HelloworldService sayHello("world, "+$user) returns: + +

<%=service.sayHello("world ("+user+")")%> +

+ +
+ + 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 @@ + + + + + + + + + + + +SCA Cloud on Google App Engine + + + +

Tuscany SCA on Google App Engine

+ + + + + + + + + + + + + + +
Available Servlets:
First SCA Application - Hello World!
A Simple HelloWorld without SCA
Admin
+

+Brought to you by: Apache Tuscany - http://tuscany.apache.org +

+ + -- cgit v1.2.3