From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../tutorial/catalog-webapp/catalog-web.composite | 43 ++++++++ java/sca/tutorial/catalog-webapp/pom.xml | 110 +++++++++++++++++++++ .../webapp/META-INF/sca-contribution.xml | 24 +++++ .../tutorial/catalog-webapp/webapp/WEB-INF/web.xml | 41 ++++++++ .../sca/tutorial/catalog-webapp/webapp/catalog.jsp | 52 ++++++++++ 5 files changed, 270 insertions(+) create mode 100644 java/sca/tutorial/catalog-webapp/catalog-web.composite create mode 100644 java/sca/tutorial/catalog-webapp/pom.xml create mode 100644 java/sca/tutorial/catalog-webapp/webapp/META-INF/sca-contribution.xml create mode 100644 java/sca/tutorial/catalog-webapp/webapp/WEB-INF/web.xml create mode 100644 java/sca/tutorial/catalog-webapp/webapp/catalog.jsp (limited to 'java/sca/tutorial/catalog-webapp') diff --git a/java/sca/tutorial/catalog-webapp/catalog-web.composite b/java/sca/tutorial/catalog-webapp/catalog-web.composite new file mode 100644 index 0000000000..3ba76da078 --- /dev/null +++ b/java/sca/tutorial/catalog-webapp/catalog-web.composite @@ -0,0 +1,43 @@ + + + + + + + + + + USD + + + + + + + + USD + + + + + + diff --git a/java/sca/tutorial/catalog-webapp/pom.xml b/java/sca/tutorial/catalog-webapp/pom.xml new file mode 100644 index 0000000000..5baeb2daec --- /dev/null +++ b/java/sca/tutorial/catalog-webapp/pom.xml @@ -0,0 +1,110 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-tutorial + 1.4-SNAPSHOT + ../pom.xml + + tutorial-catalog-webapp + Apache Tuscany SCA Tutorial Catalog WAR Contribution + war + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-node2-api + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tutorial-assets + 1.4-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node2-launcher + 1.4-SNAPSHOT + runtime + + + + + + ${artifactId} + ${basedir} + + + ${basedir} + + **/*.java + **/.*/** + pom.xml + build.xml + target/** + webapp/** + target/** + + + + + + + org.apache.maven.plugins + maven-war-plugin + + webapp + + + + org.apache.tuscany.sca + tuscany-maven-ant-generator + 1.4-SNAPSHOT + + + + generate + + + + + + + + diff --git a/java/sca/tutorial/catalog-webapp/webapp/META-INF/sca-contribution.xml b/java/sca/tutorial/catalog-webapp/webapp/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..7f06dc7ccb --- /dev/null +++ b/java/sca/tutorial/catalog-webapp/webapp/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/java/sca/tutorial/catalog-webapp/webapp/WEB-INF/web.xml b/java/sca/tutorial/catalog-webapp/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..e08d617dad --- /dev/null +++ b/java/sca/tutorial/catalog-webapp/webapp/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + + + Fruit Catalog + + + tuscany + org.apache.tuscany.sca.node.launcher.NodeServletFilter + + + + tuscany + /* + + + + catalog.jsp + + + diff --git a/java/sca/tutorial/catalog-webapp/webapp/catalog.jsp b/java/sca/tutorial/catalog-webapp/webapp/catalog.jsp new file mode 100644 index 0000000000..dcee7c33f4 --- /dev/null +++ b/java/sca/tutorial/catalog-webapp/webapp/catalog.jsp @@ -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. +--%> + +<%@ page import="org.apache.tuscany.sca.node.SCAClient"%> +<%@ page import="services.Catalog" %> +<%@page import="services.Item"%> + +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<% + + SCAClient client = (SCAClient) application.getAttribute("org.apache.tuscany.sca.node.SCAClient"); + + Catalog catalog = (Catalog)client.getService(Catalog.class, "LocalFruitsCatalog"); + Item[] items = catalog.get(); + +%> + + +Catalog + + +

Catalog

+ + + +<% for (int i = 0, n = items.length; i < n; i++) { %> + + + +<% } %> + +
<%=items[i].getName() %><%=items[i].getPrice() %>
+ + + -- cgit v1.2.3