Compare commits

..

1 Commits

Author SHA1 Message Date
Lukasz Lenart d3ae3f2bad [maven-release-plugin] copy for tag STRUTS_2_2_2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2@1085706 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 12:06:00 +00:00
729 changed files with 14187 additions and 19498 deletions
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
@@ -34,9 +34,9 @@
<name>Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps/blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/blank</url>
</scm>
<dependencies>
@@ -1,6 +1,6 @@
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="username">
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
@@ -26,10 +26,11 @@ import com.opensymphony.xwork2.config.RuntimeConfiguration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import org.apache.struts2.StrutsTestCase;
import java.util.List;
import java.util.Map;
import java.util.List;
import org.apache.struts2.StrutsTestCase;
public class ConfigTest extends StrutsTestCase {
@@ -61,7 +62,7 @@ public class ConfigTest extends StrutsTestCase {
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml");
configurationManager.addContainerProvider(c);
configurationManager.addConfigurationProvider(c);
configurationManager.reload();
}
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jboss-blank</artifactId>
@@ -34,9 +34,9 @@
<name>JBoss Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps/jboss-blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</url>
</scm>
<dependencies>
@@ -1,6 +1,6 @@
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="username">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
@@ -26,10 +26,11 @@ import com.opensymphony.xwork2.config.RuntimeConfiguration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import org.apache.struts2.StrutsTestCase;
import java.util.List;
import java.util.Map;
import java.util.List;
import org.apache.struts2.StrutsTestCase;
public class ConfigTest extends StrutsTestCase {
@@ -61,7 +62,7 @@ public class ConfigTest extends StrutsTestCase {
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml");
configurationManager.addContainerProvider(c);
configurationManager.addConfigurationProvider(c);
configurationManager.reload();
}
+5 -5
View File
@@ -26,17 +26,17 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
<packaging>war</packaging>
<name>Mail Reader Webapp</name>
<name>Starter Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps/mailreader</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</url>
</scm>
<dependencies>
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="username">
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -42,9 +42,9 @@
</modules>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps</url>
</scm>
<profiles>
+8 -8
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -34,9 +34,9 @@
<name>Portlet Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps/portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</url>
</scm>
<profiles>
@@ -93,8 +93,8 @@
<dependencies>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -190,8 +190,8 @@
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>
@@ -1,61 +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 org.apache.struts2.portlet.example.eventing;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.portlet.interceptor.PortletRequestAware;
import org.apache.struts2.portlet.interceptor.PortletResponseAware;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
public class ProcessAction extends ActionSupport implements PortletRequestAware, PortletResponseAware {
private PortletRequest request;
private PortletResponse response;
private String name;
public String execute() throws Exception {
if (request instanceof EventRequest) {
EventRequest req = (EventRequest) request;
EventResponse res = (EventResponse) response;
res.setRenderParameter("eventName", (String) req.getEvent().getValue());
return "forward";
} else {
name = request.getParameter("eventName");
}
return SUCCESS;
}
public void setPortletRequest(PortletRequest request) {
this.request = request;
}
public void setPortletResponse(PortletResponse response) {
this.response = response;
}
public String getName() {
return this.name;
}
}
@@ -1,52 +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 org.apache.struts2.portlet.example.eventing;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.portlet.interceptor.PortletResponseAware;
import javax.portlet.ActionResponse;
import javax.portlet.PortletResponse;
import javax.xml.namespace.QName;
public class PublishAction extends ActionSupport implements PortletResponseAware {
private PortletResponse response;
private String name;
public String execute() throws Exception {
if (name != null) {
((ActionResponse) response).setEvent(new QName("http://org.apache.struts2.portlets/events", "name"), name);
addActionMessage("Publishing Event with Parameter name : " + name);
}
return SUCCESS;
}
public void setPortletResponse(PortletResponse response) {
this.response = response;
}
public void setName(String name) {
this.name = name;
}
}
@@ -22,7 +22,7 @@ package org.apache.struts2.portlet.example.spring;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import com.opensymphony.xwork2.ActionSupport;
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="firstName">
<field-validator type="requiredstring">
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="firstName">
<field-validator type="requiredstring">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="edit" extends="struts-portlet-default"
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="eventing" extends="struts-portlet-default" namespace="/eventing">
<action name="publish" class="org.apache.struts2.portlet.example.eventing.PublishAction">
<result name="success">/WEB-INF/eventing/index.jsp</result>
</action>
<action name="process" class="org.apache.struts2.portlet.example.eventing.ProcessAction">
<result name="success">/WEB-INF/eventing/process.jsp</result>
<result name="forward" type="redirectAction">
<param name="actionName">process</param>
<param name="namespace">/eventing</param>
</result>
</action>
</package>
</struts>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="help" extends="struts-portlet-default"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="view" extends="struts-portlet-default"
+5 -6
View File
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-view.xml"/>
<include file="struts-edit.xml"/>
<include file="struts-help.xml"/>
<include file="struts-eventing.xml"/>
<include file="struts-view.xml"/>
<include file="struts-edit.xml"/>
<include file="struts-help.xml"/>
</struts>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator Config 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-config-1.0.dtd">
"-//OpenSymphony Group//XWork Validator Config 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
<validators>
<validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
<validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>
@@ -1,11 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h2>Input your name</h2>
<s:actionmessage/>
<s:form action="publish" method="POST">
<s:textfield label="Please enter your name" name="name" value="%{name}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,12 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test="%{name != null}">
<h2>Welcome <s:property value="name"/></h2>
</s:if>
<s:else>
<h2>Please insert a Name in the Publish Portlet Form</h2>
</s:else>
<s:actionmessage/>
+67 -150
View File
@@ -1,18 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
id="struts-portlet"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
>
version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
id="struts-portlet">
<portlet id="StrutsPortlet">
<description xml:lang="EN">Struts Test Portlet</description>
<portlet-name>StrutsPortlet</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>My StrutsPortlet portlet</title>
<short-title>SP</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="StrutsPortlet2">
<description xml:lang="EN">Struts Test Portlet2</description>
<portlet-name>StrutsPortlet2</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet2</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
@@ -55,7 +115,6 @@
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
@@ -63,152 +122,10 @@
<supported-locale>en</supported-locale>
<portlet-info>
<title>My Struts2 Portlet</title>
<title>My StrutsPortlet portlet2</title>
<short-title>SP2</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="StrutsPortlet2">
<description xml:lang="EN">Struts Test Portlet with JSR 286 Dispatcher</description>
<portlet-name>StrutsPortlet2</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet with JSR 286 Dispatcher</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>My Struts2 Portlet with JSR 286 Dispatcher</title>
<short-title>SP2JSR286</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="Struts2PublishPortlet">
<description xml:lang="EN">Struts2 Publish Portlet</description>
<portlet-name>Struts2PublishPortlet</portlet-name>
<display-name xml:lang="EN">Struts2 Publish Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/eventing</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>publish</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts2 Publish Portlet</title>
<short-title>S2PUB</short-title>
<keywords>struts,publish,portlet</keywords>
</portlet-info>
<supported-publishing-event xmlns:x="http://org.apache.struts2.portlets/events">
<qname>x:name</qname>
</supported-publishing-event>
</portlet>
<portlet id="Struts2ProcessPortlet">
<description xml:lang="EN">Struts2 Process Portlet</description>
<portlet-name>Struts2ProcessPortlet</portlet-name>
<display-name xml:lang="EN">Struts2 Process Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/eventing</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>process</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts2 Process Portlet</title>
<short-title>S2PRO</short-title>
<keywords>struts,process,portlet</keywords>
</portlet-info>
<supported-processing-event xmlns:x="http://org.apache.struts2.portlets/events">
<qname>x:name</qname>
</supported-processing-event>
</portlet>
<event-definition>
<qname xmlns:x="http://org.apache.struts2.portlets/events">x:name</qname>
<value-type>java.lang.String</value-type>
</event-definition>
</portlet-app>
@@ -1,3 +1,3 @@
<b>Hello from FreeMarker, ${firstName?html} ${lastName?html}!</b>
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
<p/>
<a href="<@s.url action="index"/>">Back to front page</a>
+6 -3
View File
@@ -8,8 +8,11 @@
/WEB-INF/applicationContext*.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Uncomment to use the dispatcher servlet -->
<!--<servlet id="Struts2PortletDispatcherServlet">
<servlet-name>Struts2PortletDispatcherServlet</servlet-name>
<servlet-class>org.apache.struts2.portlet.dispatcher.DispatcherServlet</servlet-class>
</servlet>-->
</web-app>
+2 -2
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.3.4.1</version>
<version>2.2.2</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
@@ -23,8 +23,8 @@
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Overwrite Convention -->
@@ -20,8 +20,8 @@
<s:iterator value="model">
<tr>
<td>${id}</td>
<td><s:property value="clientName"/></td>
<td><s:property value="amount"/></td>
<td>${clientName}</td>
<td>${amount}</td>
<td><a href="orders/${id}">View</a> |
<a href="orders/${id}/edit">Edit</a> |
<a href="orders/${id}/deleteConfirm">Delete</a></td>
@@ -1,9 +1,7 @@
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="s" uri="/struts-tags" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Order ${id}</title>
@@ -16,11 +14,11 @@
</tr>
<tr>
<th>Client</th>
<td><s:property value="clientName"/></td>
<td>${clientName}</td>
</tr>
<tr>
<th>Amount</th>
<td><s:property value="amount"/></td>
<td>${amount}</td>
</tr>
</table>
<a href="../orders">Back to Orders</a>
+5 -11
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.4.1</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -34,9 +34,9 @@
<name>Showcase Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4_1/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4_1/apps/showcase</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</url>
</scm>
@@ -95,12 +95,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
@@ -109,7 +103,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<artifactId>struts2-codebehind-plugin</artifactId>
<version>${project.version}</version>
</dependency>
@@ -20,11 +20,6 @@
*/
package org.apache.struts2.showcase;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Validateable;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.ServletActionContext;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@@ -33,6 +28,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Validateable;
import com.opensymphony.xwork2.util.ValueStack;
/**
*/
public class UITagExample extends ActionSupport implements Validateable {
@@ -46,7 +47,6 @@ public class UITagExample extends ActionSupport implements Validateable {
String bio;
String favouriteColor;
List friends;
String bestFriend;
boolean legalAge;
String state;
String region;
@@ -185,14 +185,6 @@ public class UITagExample extends ActionSupport implements Validateable {
this.friends = friends;
}
public String getBestFriend() {
return bestFriend;
}
public void setBestFriend(String bestFriend) {
this.bestFriend = bestFriend;
}
public boolean isLegalAge() {
return legalAge;
}
@@ -24,20 +24,17 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.config.Result;
import org.apache.struts2.config.Results;
import org.apache.struts2.dispatcher.ServletRedirectResult;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Results;
/**
* <code>EditPerson</code>
*
*/
@Results({
@Result(name="list", location="list-people.action", type="redirect"),
@Result(name="input", location="new-person.ftl", type="freemarker")
})
@Result(name="list", value="listPeople.action", type=ServletRedirectResult.class)
public class EditPersonAction extends ActionSupport {
private static final long serialVersionUID = 7699491775215130850L;
@@ -23,11 +23,11 @@ package org.apache.struts2.showcase.person;
import java.util.ArrayList;
import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.config.Result;
import org.apache.struts2.views.freemarker.FreemarkerResult;
import com.opensymphony.xwork2.ActionSupport;
@Result(location="list-people.ftl", type="freemarker")
public class ListPeopleAction extends ActionSupport {
private static final long serialVersionUID = 3608017189783645371L;
@@ -20,13 +20,16 @@
*/
package org.apache.struts2.showcase.person;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.config.ParentPackage;
import org.apache.struts2.config.Result;
import org.apache.struts2.config.Results;
import org.apache.struts2.views.freemarker.FreemarkerResult;
import com.opensymphony.xwork2.ActionSupport;
@Result(name="input", location="new-person.ftl", type="freemarker")
/**
*/
@ParentPackage("person")
public class NewPersonAction extends ActionSupport {
private static final long serialVersionUID = 200410824352645515L;
@@ -1,7 +0,0 @@
@ParentPackage("person")
@Namespace("/person")
package org.apache.struts2.showcase.person;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
@@ -59,7 +59,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
public String execute() throws MalformedURLException, IOException {
if (page != null) {
if (page != null && page.trim().length() > 0) {
InputStream in = ClassLoaderUtil.getResourceAsStream(page.substring(page.indexOf("//")+1), getClass());
page = page.replace("//", "/");
@@ -78,7 +78,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
}
}
if (className != null) {
if (className != null && className.trim().length() > 0) {
className = "/"+className.replace('.', '/') + ".java";
InputStream in = getClass().getResourceAsStream(className);
if (in == null) {
@@ -93,7 +93,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
String rootPath = ServletActionContext.getServletContext().getRealPath("/");
if (config != null && (rootPath == null || config.startsWith(rootPath))) {
if (config != null && config.trim().length() > 0 && (rootPath == null || config.startsWith(rootPath))) {
int pos = config.lastIndexOf(':');
configLine = Integer.parseInt(config.substring(pos+1));
config = config.substring(0, pos).replace("//", "/");
@@ -107,27 +107,21 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
* @param className the className to set
*/
public void setClassName(String className) {
if (className != null && className.trim().length()>0) {
this.className = className;
}
this.className = className;
}
/**
* @param config the config to set
*/
public void setConfig(String config) {
if (config != null && config.trim().length()>0) {
this.config = config;
}
this.config = config;
}
/**
* @param page the page to set
*/
public void setPage(String page) {
if (page != null && page.trim().length()>0) {
this.page = page;
}
this.page = page;
}
/**
@@ -1,6 +1,6 @@
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="description1">
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<!-- Field-Validator Syntax -->
<field name="currentEmployee.empId">
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<!-- Field-Validator Syntax -->
<field name="currentSkill.name">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="message">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="upload">
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<field name="person">
<field-validator type="visitor">
@@ -1,4 +1,4 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<field name="name">
<field-validator type="requiredstring">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="value">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: nonFieldValidatorsExample -->
@@ -1,9 +1,9 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: quizValidators -->
<!--
Add the following DOCTYPE declaration as first line of your XXX-validation.xml file:
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-->
<validators>
<field name="name">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: visitorValidatorsExample -->
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="actionchaining" extends="struts-default" namespace="/actionchaining">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ajax" extends="struts-default">
@@ -55,7 +54,7 @@
</action>
</package>
<package name="ajaxNoDecorate" namespace="/nodecorate" extends="json-default">
<package name="ajaxNoDecorate" namespace="/nodecorate" extends="struts-default">
<!-- example 4 -->
<action name="panel1" class="org.apache.struts2.showcase.ajax.Example4ShowPanelAction" method="panel1">
<result type="freemarker">/ajax/tabbedpanel/nodecorate/panel1.ftl</result>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="chat" extends="struts-default" namespace="/chat">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="conversion" namespace="/conversion" extends="struts-default">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="filedownload" extends="struts-default" namespace="/filedownload">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="fileupload" extends="struts-default" namespace="/fileupload">
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="freemarker" namespace="/freemarker" extends="struts-default">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="hangman" extends="struts-default" namespace="/hangman">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="integration" extends="struts1-default" namespace="/integration">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ognl" namespace="/nodecorate" extends="struts-default">
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="jsf" extends="jsf-default" namespace="/jsf">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="modelDriven" extends="struts-default" namespace="/modelDriven">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!-- START SNIPPET: xworkSample -->
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ui-tags" extends="struts-default" namespace="/tags/ui">
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-tags-ui.xml"/>
<include file="struts-tags-non-ui.xml" />
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="tiles" extends="tiles-default" namespace="/tiles">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="token" extends="struts-default" namespace="/token">
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="validation" extends="json-default" namespace="/validation">
<package name="validation" extends="struts-default" namespace="/validation">
<action name="quizBasic" class="org.apache.struts2.showcase.validation.QuizAction">
<result name="input">quiz-basic.jsp</result>
<result>quiz-success.jsp</result>
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="wait" extends="struts-default" namespace="/wait">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="xslt" extends="struts-default" namespace="/xslt">
+5 -5
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!-- START SNIPPET: xworkSample -->
<struts>
@@ -14,13 +14,13 @@
<constant name="struts.custom.i18n.resources" value="globalMessages" />
<constant name="struts.action.extension" value="action,," />
<constant name="struts.convention.package.locators.basePackage" value="org.apache.struts2.showcase.person" />
<constant name="struts.convention.result.path" value="/" />
<constant name="struts.codebehind.defaultPackage" value="person" />
<constant name="struts.freemarker.manager.classname" value="customFreemarkerManager" />
<constant name="struts.serve.static" value="true" />
<constant name="struts.serve.static.browserCache" value="false" />
<constant name="actionPackages" value="org.apache.struts2.showcase.person"/>
<include file="struts-chat.xml" />
<include file="struts-interactive.xml" />
@@ -9,6 +9,10 @@
<filter>
<filter-name>struts-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>org.apache.struts2.showcase.person</param-value>
</init-param>
</filter>
<filter>
@@ -1,5 +1,5 @@
[
<#list options as option>
["${option?html}"],
["${option}"],
</#list>
]
@@ -1,3 +1,3 @@
Hello, <br/>
Today is ${todayDate?html}, the time now is ${todayTime?html}
Today is ${todayDate}, the time now is ${todayTime}
@@ -1,2 +1,2 @@
Hello, ${name?html}
Hello, ${name}
@@ -1,2 +1,2 @@
So, you are a ${gender?html}
So, you are a ${gender}
@@ -118,7 +118,7 @@
<div class="center">
<div class="box">
<h3>Messages Posted In Room [${roomName?default('')?html}]</h3>
<h3>Messages Posted In Room [${roomName?default('')}]</h3>
<@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -143,7 +143,7 @@
<div class="right">
<div class="box">
<h3>Users Available In Room [${roomName?default('')?html}]</h3>
<h3>Users Available In Room [${roomName?default('')}]</h3>
<@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -1,6 +1,6 @@
<ul>
<#list availableUsers as user>
<li>${user.name?html}</li>
<li>${user.name}</li>
</#list>
</ul>
@@ -6,7 +6,7 @@
<body>
<#list actionMessages as msg>
${msg?html}
${msg}
</#list>
<@s.form action="guess" method="post">
@@ -6,7 +6,7 @@
</head>
<body>
<s:form action="edit-person" theme="simple" validate="false">
<s:form action="editPerson" theme="simple" validate="false">
<table>
<tr>
@@ -33,10 +33,8 @@
</s:form>
<ul>
<s:url id="newpersonurl" action="new-person" method="input" />
<li><s:a href="%{newpersonurl}">Create</s:a> a new person</li>
<s:url id="listpeopleurl" action="list-people" />
<li><s:a href="%{listpeopleurl}">List</s:a> all people</li>
<li><a href="newPerson!input.action">Create</a> a new person</li>
<li><a href="listPeople.action">List</a> all people</li>
</ul>
</body>
@@ -1,5 +1,3 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Acme Corp</title>
@@ -7,10 +5,8 @@
<body>
<ul>
<s:url id="newpersonurl" action="new-person" method="input" />
<li><s:a href="%{newpersonurl}">Create</s:a> a new person</li>
<s:url id="listpeopleurl" action="list-people" />
<li><s:a href="%{listpeopleurl}">List</s:a> all people</li>
<li><a href="newPerson!input.action">Create</a> a new person</li>
<li><a href="listPeople.action">List</a> all people</li>
</ul>
</body>
</html>
@@ -1,30 +0,0 @@
<html>
<head>
<title>All People</title>
</head>
<body>
There are ${peopleCount} people...
<table>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
<#list people as person>
<tr>
<td>${person.id?html}</td>
<td>${person.name?html}</td>
<td>${person.lastName?html}</td>
</tr>
</#list>
</table>
<ul>
<@s.url id="editpersonurl" action="edit-person" />
<li><@s.a href="%{editpersonurl}">Edit people</@s.a></li>
<@s.url id="newpersonurl" action="new-person" method="input" />
<li><@s.a href="%{newpersonurl}">Create</@s.a> a new person</li>
</ul>
</body>
</html>
@@ -0,0 +1,28 @@
<html>
<head>
<title>All People</title>
</head>
<body>
There are ${peopleCount} people...
<table>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
<#list people as person>
<tr>
<td>${person.id}</td>
<td>${person.name}</td>
<td>${person.lastName}</td>
</tr>
</#list>
</table>
<ul>
<li><a href="editPerson.action">Edit people</a></li>
<li><a href="newPerson!input.action">Create</a> a new person</li>
</ul>
</body>
</html>
@@ -1,21 +0,0 @@
<html>
<head>
<title>New Person</title>
</head>
<body>
<@s.form action="new-person">
<@s.textfield label="First Name" name="person.name"/>
<@s.textfield label="Last Name" name="person.lastName"/>
<@s.submit value="Create person"/>
</@s.form>
<ul>
<@s.url id="editpersonurl" action="edit-person" />
<li><@s.a href="%{editpersonurl}">Edit people</@s.a></li>
<@s.url id="listpeopleurl" action="list-people" />
<li><@s.a href="%{listpeopleurl}">List</@s.a> all people</li>
</ul>
</body>
</html>
@@ -0,0 +1,19 @@
<html>
<head>
<title>New Person</title>
</head>
<body>
<@s.form action="newPerson">
<@s.textfield label="First Name" name="person.name"/>
<@s.textfield label="Last Name" name="person.lastName"/>
<@s.submit value="Create person"/>
</@s.form>
<ul>
<li><a href="editPerson.action">Edit people</a></li>
<li><a href="listPeople.action">List</a> all people</li>
</ul>
</body>
</html>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'action' prefix.<p/>
The text you've entered is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'method' prefix.<p/>
The text you've enter is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -11,7 +11,7 @@
Because this is a 'redirect-action', the text will be lost, due to a redirection
implies a new request being issued from the client.<p/>
The text you've enter is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>

Some files were not shown because too many files have changed in this diff Show More