Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 765AD200C54 for ; Tue, 28 Mar 2017 10:36:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 74FD6160B89; Tue, 28 Mar 2017 08:36:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9678F160B7E for ; Tue, 28 Mar 2017 10:36:03 +0200 (CEST) Received: (qmail 63093 invoked by uid 500); 28 Mar 2017 08:36:02 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 63068 invoked by uid 99); 28 Mar 2017 08:36:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2017 08:36:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 675EADFF47; Tue, 28 Mar 2017 08:36:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Tue, 28 Mar 2017 08:36:02 -0000 Message-Id: <28f0f065ea8246e78254ae847aeb6df9@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] struts-examples git commit: Adds action chaining example archived-at: Tue, 28 Mar 2017 08:36:04 -0000 Adds action chaining example Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/7882b0de Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/7882b0de Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/7882b0de Branch: refs/heads/master Commit: 7882b0de502250d647ca1f2e84d2b7605519209c Parents: 7a58d1e Author: Lukasz Lenart Authored: Tue Mar 28 10:35:44 2017 +0200 Committer: Lukasz Lenart Committed: Tue Mar 28 10:35:44 2017 +0200 ---------------------------------------------------------------------- action-chaining/pom.xml | 47 ++++++++++++++++++++ .../org/apache/struts_examples/ActionA.java | 41 +++++++++++++++++ .../org/apache/struts_examples/ActionB.java | 41 +++++++++++++++++ action-chaining/src/main/resources/struts.xml | 31 +++++++++++++ .../src/main/webapp/WEB-INF/ActionB.jsp | 14 ++++++ .../src/main/webapp/WEB-INF/index.jsp | 13 ++++++ action-chaining/src/main/webapp/WEB-INF/web.xml | 23 ++++++++++ 7 files changed, 210 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/pom.xml ---------------------------------------------------------------------- diff --git a/action-chaining/pom.xml b/action-chaining/pom.xml new file mode 100644 index 0000000..b5d17df --- /dev/null +++ b/action-chaining/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + struts-examples + org.apache.struts + 1.0.0 + + + action-chaining + 1.0-SNAPSHOT + war + Action chaining + + + UTF-8 + + + + + + maven-compiler-plugin + 3.3 + + UTF-8 + 1.7 + 1.7 + + + + org.mortbay.jetty + jetty-maven-plugin + 8.1.16.v20140903 + + CTRL+C + 8999 + 10 + ${basedir}/src/main/webapp/ + + ${basedir}/src/main/webapp/WEB-INF/web.xml + + + + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/java/org/apache/struts_examples/ActionA.java ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/java/org/apache/struts_examples/ActionA.java b/action-chaining/src/main/java/org/apache/struts_examples/ActionA.java new file mode 100644 index 0000000..3b85511 --- /dev/null +++ b/action-chaining/src/main/java/org/apache/struts_examples/ActionA.java @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * 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 org.apache.struts_examples; + +import com.opensymphony.xwork2.ActionSupport; + +public class ActionA extends ActionSupport { + + private String name; + + public String execute() throws Exception { + return SUCCESS; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/java/org/apache/struts_examples/ActionB.java ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/java/org/apache/struts_examples/ActionB.java b/action-chaining/src/main/java/org/apache/struts_examples/ActionB.java new file mode 100644 index 0000000..1daaa46 --- /dev/null +++ b/action-chaining/src/main/java/org/apache/struts_examples/ActionB.java @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * 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 org.apache.struts_examples; + +import com.opensymphony.xwork2.ActionSupport; + +public class ActionB extends ActionSupport { + + private String name; + + public String execute() throws Exception { + return SUCCESS; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/resources/struts.xml ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/resources/struts.xml b/action-chaining/src/main/resources/struts.xml new file mode 100644 index 0000000..7e425ec --- /dev/null +++ b/action-chaining/src/main/resources/struts.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + WEB-INF/index.jsp + + + + Chain from A to B + + actionB + + + + + WEB-INF/ActionB.jsp + + + + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/webapp/WEB-INF/ActionB.jsp ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/webapp/WEB-INF/ActionB.jsp b/action-chaining/src/main/webapp/WEB-INF/ActionB.jsp new file mode 100644 index 0000000..30027af --- /dev/null +++ b/action-chaining/src/main/webapp/WEB-INF/ActionB.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + Action B + + + + +

Value from Action A:

+ + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/webapp/WEB-INF/index.jsp ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/webapp/WEB-INF/index.jsp b/action-chaining/src/main/webapp/WEB-INF/index.jsp new file mode 100644 index 0000000..440030f --- /dev/null +++ b/action-chaining/src/main/webapp/WEB-INF/index.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + Action Chaining + + + + +Action A + + + http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7882b0de/action-chaining/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/action-chaining/src/main/webapp/WEB-INF/web.xml b/action-chaining/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..8858656 --- /dev/null +++ b/action-chaining/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,23 @@ + + + Struts Blank + + + struts2 + + org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter + + + + + struts2 + /* + + + + index.html + +