From 56f0d297c6eba38d5187431ed9319a97ff5d6094 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 4 Oct 2010 14:44:27 +0000 Subject: Rename 2.0-M5.1 release tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1004265 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/sample/HelloworldServlet.java | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 sca-java-2.x/tags/sca-java-2.0-M5.1/samples/webapps/helloworld-servlet/src/main/java/sample/HelloworldServlet.java (limited to 'sca-java-2.x/tags/sca-java-2.0-M5.1/samples/webapps/helloworld-servlet/src/main/java/sample/HelloworldServlet.java') diff --git a/sca-java-2.x/tags/sca-java-2.0-M5.1/samples/webapps/helloworld-servlet/src/main/java/sample/HelloworldServlet.java b/sca-java-2.x/tags/sca-java-2.0-M5.1/samples/webapps/helloworld-servlet/src/main/java/sample/HelloworldServlet.java deleted file mode 100644 index bb72c50f6a..0000000000 --- a/sca-java-2.x/tags/sca-java-2.0-M5.1/samples/webapps/helloworld-servlet/src/main/java/sample/HelloworldServlet.java +++ /dev/null @@ -1,64 +0,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. - */ -package sample; - -import java.io.IOException; -import java.io.Writer; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.annotation.Reference; - -/** - */ -public class HelloworldServlet extends HttpServlet { - private static final long serialVersionUID = 1L; - - @Reference - protected HelloworldService service; - - @Override - public void init(ServletConfig servletConfig) throws ServletException { - if (service == null) { - System.out.println("HelloworldServlet reference injection failed, using ComponentContext"); - ComponentContext cc = (ComponentContext)servletConfig.getServletContext().getAttribute("org.oasisopen.sca.ComponentContext"); - service = cc.getService(HelloworldService.class, "service"); - } - } - - @Override - protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - - String name = request.getParameter("name"); - String greeting = service.sayHello(name); - - Writer out = response.getWriter(); - out.write("Apache Tuscany Helloworld Servlet Sample"); - out.write("

Apache Tuscany Helloworld Servlet Sample

"); - out.write("
Result: " + greeting); - out.write(""); - out.flush(); - out.close(); - } -} -- cgit v1.2.3