mirror of
https://github.com/apache/struts.git
synced 2026-08-08 08:07:17 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d3ae3f2bad |
-73
@@ -1,73 +0,0 @@
|
||||
# IDEA
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# Eclipse
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
# Scripts
|
||||
*.sh
|
||||
|
||||
# jenv
|
||||
.java-version
|
||||
|
||||
# Maven
|
||||
core/target
|
||||
xwork-core/target
|
||||
archetypes/struts2-archetype-angularjs/target
|
||||
archetypes/struts2-archetype-blank/target
|
||||
archetypes/struts2-archetype-convention/target
|
||||
archetypes/struts2-archetype-dbportlet/target
|
||||
archetypes/struts2-archetype-plugin/target
|
||||
archetypes/struts2-archetype-portlet/target
|
||||
archetypes/struts2-archetype-starter/target
|
||||
archetypes/target
|
||||
plugins/convention/target
|
||||
plugins/embeddedjsp/target
|
||||
plugins/dojo/target
|
||||
plugins/osgi/target
|
||||
plugins/cdi/target
|
||||
plugins/codebehind/target
|
||||
plugins/spring/target
|
||||
plugins/jfreechart/target
|
||||
apps/rest-showcase/target
|
||||
apps/mailreader/target
|
||||
apps/portlet/target
|
||||
apps/blank/target
|
||||
apps/jboss-blank/target
|
||||
apps/mailreader/target
|
||||
apps/portlet/target
|
||||
apps/showcase/target
|
||||
apps/target
|
||||
bundles/admin/target
|
||||
plugins/config-browser/target
|
||||
plugins/jasperreports/target
|
||||
plugins/jsf/target
|
||||
plugins/json/target
|
||||
plugins/portlet-tiles/target
|
||||
plugins/portlet/target
|
||||
plugins/sitegraph/target
|
||||
plugins/sitemesh/target
|
||||
plugins/struts1/target
|
||||
plugins/tiles3/target
|
||||
plugins/javatemplates/target
|
||||
bundles/demo/target
|
||||
plugins/rest/target
|
||||
plugins/plexus/target
|
||||
plugins/testng/target
|
||||
plugins/dwr/target
|
||||
plugins/gxp/target
|
||||
plugins/oval/target
|
||||
plugins/junit/target
|
||||
plugins/tiles/target
|
||||
bundles/target
|
||||
plugins/target
|
||||
target
|
||||
plugins/testng/test-output
|
||||
@@ -7,10 +7,4 @@ For more on getting started with Struts, see
|
||||
|
||||
* http://cwiki.apache.org/WW/home.html
|
||||
|
||||
I18N:
|
||||
=====
|
||||
Please note that this project was created with the assumption that it will be run
|
||||
in an environment where the default locale is set to English. This means that
|
||||
the default messages defined in package.properties are in English. If the default
|
||||
locale for your server is different, then rename package.properties to package_en.properties
|
||||
and create a new package.properties with proper values for your default locale.
|
||||
----------------------------------------------------------------------------
|
||||
+15
-15
@@ -26,12 +26,18 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-blank</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 Blank Webapp</name>
|
||||
<name>Blank Webapp</name>
|
||||
|
||||
<scm>
|
||||
<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>
|
||||
|
||||
@@ -47,14 +53,10 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>struts2-junit-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -63,21 +65,19 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<scanTargets>
|
||||
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
|
||||
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
|
||||
<scanTarget>src/main/resources/struts.xml</scanTarget>
|
||||
<scanTarget>src/main/resources/example.xml</scanTarget>
|
||||
</scanTargets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
|
||||
package example;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <code>Set welcome message.</code>
|
||||
*/
|
||||
@@ -61,8 +58,4 @@ public class HelloWorld extends ExampleSupport {
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public List<YesNo> getValues() {
|
||||
return Arrays.asList(YesNo.values());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,18 +21,19 @@
|
||||
|
||||
package example;
|
||||
|
||||
import org.apache.struts2.interceptor.validation.SkipValidation;
|
||||
|
||||
public class Login extends ExampleSupport {
|
||||
|
||||
@Override
|
||||
public String execute() throws Exception {
|
||||
|
||||
if (isInvalid(getUsername())) return INPUT;
|
||||
|
||||
if (isInvalid(getPassword())) return INPUT;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@SkipValidation
|
||||
public String form() throws Exception {
|
||||
return INPUT;
|
||||
private boolean isInvalid(String value) {
|
||||
return (value == null || value.length() == 0);
|
||||
}
|
||||
|
||||
private String username;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package example;
|
||||
|
||||
public enum YesNo {
|
||||
YES, NO
|
||||
}
|
||||
@@ -8,16 +8,16 @@
|
||||
<package name="example" namespace="/example" extends="default">
|
||||
|
||||
<action name="HelloWorld" class="example.HelloWorld">
|
||||
<result>/WEB-INF/jsp/example/HelloWorld.jsp</result>
|
||||
<result>/example/HelloWorld.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="Login_*" method="{1}" class="example.Login">
|
||||
<result name="input">/WEB-INF/jsp/example/Login.jsp</result>
|
||||
<result name="input">/example/Login.jsp</result>
|
||||
<result type="redirectAction">Menu</result>
|
||||
</action>
|
||||
|
||||
<action name="*" class="example.ExampleSupport">
|
||||
<result>/WEB-INF/jsp/example/{1}.jsp</result>
|
||||
<result>/example/{1}.jsp</result>
|
||||
</action>
|
||||
|
||||
<!-- Add actions here -->
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -3,5 +3,3 @@ requiredstring = ${getText(fieldName)} is required.
|
||||
password = Password
|
||||
username = User Name
|
||||
Missing.message = This feature is under construction. Please try again in the next interation.
|
||||
test-yes=Yo
|
||||
test-no=Nein
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=INFO, stdout
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=FATAL
|
||||
|
||||
log4j.logger.com.opensymphony.xwork2=DEBUG
|
||||
log4j.logger.org.apache.struts2=DEBUG
|
||||
@@ -1,19 +1,19 @@
|
||||
<?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>
|
||||
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
|
||||
<constant name="struts.devMode" value="true" />
|
||||
<constant name="struts.devMode" value="false" />
|
||||
|
||||
<package name="default" namespace="/" extends="struts-default">
|
||||
|
||||
<default-action-ref name="index" />
|
||||
|
||||
<global-results>
|
||||
<result name="error">/WEB-INF/jsp/error.jsp</result>
|
||||
<result name="error">/error.jsp</result>
|
||||
</global-results>
|
||||
|
||||
<global-exception-mappings>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
|
||||
<display-name>Struts Blank</display-name>
|
||||
|
||||
@@ -19,21 +17,4 @@
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- Restricts access to pure JSP files - access available only via Struts action -->
|
||||
<security-constraint>
|
||||
<display-name>No direct JSP access</display-name>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>No-JSP</web-resource-name>
|
||||
<url-pattern>*.jsp</url-pattern>
|
||||
</web-resource-collection>
|
||||
<auth-constraint>
|
||||
<role-name>no-users</role-name>
|
||||
</auth-constraint>
|
||||
</security-constraint>
|
||||
|
||||
<security-role>
|
||||
<description>Don't assign users to this role</description>
|
||||
<role-name>no-users</role-name>
|
||||
</security-role>
|
||||
|
||||
</web-app>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
|
||||
package example;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class HelloWorldTest extends StrutsTestCase {
|
||||
|
||||
public void testHelloWorld() throws Exception {
|
||||
|
||||
@@ -7,10 +7,4 @@ For more on getting started with Struts, see
|
||||
|
||||
* http://cwiki.apache.org/WW/home.html
|
||||
|
||||
I18N:
|
||||
=====
|
||||
Please note that this project was created with the assumption that it will be run
|
||||
in an environment where the default locale is set to English. This means that
|
||||
the default messages defined in package.properties are in English. If the default
|
||||
locale for your server is different, then rename package.properties to package_en.properties
|
||||
and create a new package.properties with proper values for your default locale.
|
||||
----------------------------------------------------------------------------
|
||||
@@ -26,12 +26,18 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jboss-blank</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 JBoss Blank Webapp</name>
|
||||
<name>JBoss Blank Webapp</name>
|
||||
|
||||
<scm>
|
||||
<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>
|
||||
|
||||
@@ -51,11 +57,9 @@
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>struts2-junit-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
</project>
|
||||
@@ -8,16 +8,16 @@
|
||||
<package name="example" namespace="/example" extends="struts-default">
|
||||
|
||||
<action name="HelloWorld" class="example.HelloWorld">
|
||||
<result>/WEB-INF/jsp/example/HelloWorld.jsp</result>
|
||||
<result>/example/HelloWorld.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="Login_*" method="{1}" class="example.Login">
|
||||
<result name="input">/WEB-INF/jsp/example/Login.jsp</result>
|
||||
<result name="input">/example/Login.jsp</result>
|
||||
<result type="redirectAction">Menu</result>
|
||||
</action>
|
||||
|
||||
<action name="*" class="example.ExampleSupport">
|
||||
<result>/WEB-INF/jsp/example/{1}.jsp</result>
|
||||
<result>/example/{1}.jsp</result>
|
||||
</action>
|
||||
|
||||
<!-- Add actions here -->
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
|
||||
@@ -17,21 +17,4 @@
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- Restricts access to pure JSP files - access available only via Struts action -->
|
||||
<security-constraint>
|
||||
<display-name>No direct JSP access</display-name>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>No-JSP</web-resource-name>
|
||||
<url-pattern>*.jsp</url-pattern>
|
||||
</web-resource-collection>
|
||||
<auth-constraint>
|
||||
<role-name>no-users</role-name>
|
||||
</auth-constraint>
|
||||
</security-constraint>
|
||||
|
||||
<security-role>
|
||||
<description>Don't assign users to this role</description>
|
||||
<role-name>no-users</role-name>
|
||||
</security-role>
|
||||
|
||||
</web-app>
|
||||
|
||||
+28
-30
@@ -1,30 +1,28 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title><s:text name="HelloWorld.message"/></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2><s:property value="message"/></h2>
|
||||
|
||||
<h3>Languages</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<s:url id="url" action="HelloWorld">
|
||||
<s:param name="request_locale">en</s:param>
|
||||
</s:url>
|
||||
<s:a class="test" href="%{url}">English</s:a>
|
||||
</li>
|
||||
<li>
|
||||
<s:url id="url" action="HelloWorld">
|
||||
<s:param name="request_locale">es</s:param>
|
||||
</s:url>
|
||||
<s:a href="%{url}">Espanol</s:a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<s:checkboxlist name="test" list="values" listLabelKey="'test-' + name().toLowerCase()" />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title><s:text name="HelloWorld.message"/></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2><s:property value="message"/></h2>
|
||||
|
||||
<h3>Languages</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<s:url id="url" action="HelloWorld">
|
||||
<s:param name="request_locale">en</s:param>
|
||||
</s:url>
|
||||
<s:a href="%{url}">English</s:a>
|
||||
</li>
|
||||
<li>
|
||||
<s:url id="url" action="HelloWorld">
|
||||
<s:param name="request_locale">es</s:param>
|
||||
</s:url>
|
||||
<s:a href="%{url}">Espanol</s:a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+15
-15
@@ -1,15 +1,15 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sign On</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<s:form action="Login">
|
||||
<s:textfield key="username"/>
|
||||
<s:password key="password" />
|
||||
<s:submit/>
|
||||
</s:form>
|
||||
</body>
|
||||
</html>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sign On</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<s:form action="Login">
|
||||
<s:textfield key="username"/>
|
||||
<s:password key="password" />
|
||||
<s:submit/>
|
||||
</s:form>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<s:include value="Missing.jsp"/>
|
||||
+11
-11
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head><title>Missing Feature</title></head>
|
||||
|
||||
<body>
|
||||
<p>
|
||||
<s:text name="Missing.message"/>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head><title>Missing Feature</title></head>
|
||||
|
||||
<body>
|
||||
<p>
|
||||
<s:text name="Missing.message"/>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<s:include value="Missing.jsp"/>
|
||||
+18
-18
@@ -1,18 +1,18 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome</title>
|
||||
<link href="<s:url value="/css/examplecss"/>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Commands</h3>
|
||||
<ul>
|
||||
<li><a href="<s:url action="Login_input"/>">Sign On</a></li>
|
||||
<li><a href="<s:url action="Register"/>">Register</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome</title>
|
||||
<link href="<s:url value="/css/examplecss"/>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Commands</h3>
|
||||
<ul>
|
||||
<li><a href="<s:url action="Login_input"/>">Sign On</a></li>
|
||||
<li><a href="<s:url action="Register"/>">Register</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ package example;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class HelloWorldTest extends StrutsTestCase {
|
||||
|
||||
|
||||
@@ -14,10 +14,5 @@ For more about the MailReader applicaton genneraly, visit Struts University.
|
||||
|
||||
* http://www.StrutsUniversity.org/
|
||||
|
||||
I18N:
|
||||
=====
|
||||
Please note that this project was created with the assumption that it will be run
|
||||
in an environment where the default locale is set to English. This means that
|
||||
the default messages defined in package.properties are in English. If the default
|
||||
locale for your server is different, then rename package.properties to package_en.properties
|
||||
and create a new package.properties with proper values for your default locale.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
+11
-32
@@ -26,12 +26,18 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-mailreader</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 Mail Reader Webapp</name>
|
||||
<name>Starter Webapp</name>
|
||||
|
||||
<scm>
|
||||
<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>
|
||||
|
||||
@@ -62,39 +68,12 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-mailreader</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</action>
|
||||
|
||||
<action name="Welcome" class="mailreader2.Welcome">
|
||||
<result>/WEB-INF/jsp/Welcome.jsp</result>
|
||||
<result>/Welcome.jsp</result>
|
||||
<interceptor-ref name="guest"/>
|
||||
</action>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</action>
|
||||
|
||||
<action name="Login_*" method="{1}" class="mailreader2.Login">
|
||||
<result name="input">/WEB-INF/jsp/Login.jsp</result>
|
||||
<result name="input">/Login.jsp</result>
|
||||
<result name="cancel" type="redirectAction">Welcome</result>
|
||||
<result type="redirectAction">MainMenu</result>
|
||||
<result name="expired" type="chain">ChangePassword</result>
|
||||
@@ -32,7 +32,7 @@
|
||||
</action>
|
||||
|
||||
<action name="Registration_*" method="{1}" class="mailreader2.Registration">
|
||||
<result name="input">/WEB-INF/jsp/Registration.jsp</result>
|
||||
<result name="input">/Registration.jsp</result>
|
||||
<result type="redirectAction">MainMenu</result>
|
||||
<interceptor-ref name="guest"/>
|
||||
</action>
|
||||
@@ -41,7 +41,7 @@
|
||||
<package name="subscription" namespace="/" extends="mailreader-support">
|
||||
|
||||
<global-results>
|
||||
<result name="input">/WEB-INF/jsp/Subscription.jsp</result>
|
||||
<result name="input">/Subscription.jsp</result>
|
||||
<result type="redirectAction">Registration_input</result>
|
||||
</global-results>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<package name="wildcard" namespace="/" extends="mailreader-support">
|
||||
|
||||
<action name="*" class="mailreader2.MailreaderSupport">
|
||||
<result>/WEB-INF/jsp/{1}.jsp</result>
|
||||
<result>/{1}.jsp</result>
|
||||
</action>
|
||||
|
||||
</package>
|
||||
|
||||
@@ -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
-1
@@ -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
-1
@@ -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,36 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=INFO, stdout
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=FATAL
|
||||
|
||||
# OpenSymphony Stuff
|
||||
log4j.logger.freemarker=INFO
|
||||
log4j.logger.com.opensymphony=INFO
|
||||
log4j.logger.com.opensymphony.xwork2.ognl=ERROR
|
||||
log4j.logger.org.apache.struts2=WARN
|
||||
log4j.logger.org.apache.struts2.components=WARN
|
||||
log4j.logger.org.apache.struts2.dispatcher=WARN
|
||||
log4j.logger.org.apache.struts2.convention=INFO
|
||||
|
||||
# Spring Stuff
|
||||
log4j.logger.org.springframework=WARN
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
|
||||
@@ -1,9 +1,13 @@
|
||||
<?xml version='1.0'?>
|
||||
<database>
|
||||
<user username="user" fromAddress="John.User@somewhere.com" fullName="John Q. User" password="pass">
|
||||
<subscription host="mail.yahoo.com" autoConnect="false" password="foo" type="imap" username="jquser">
|
||||
</subscription>
|
||||
<subscription host="mail.hotmail.com" autoConnect="false" password="bar" type="pop3" username="user1234">
|
||||
</subscription>
|
||||
</user>
|
||||
<user username="user" fromAddress="John.User@somewhere.com"
|
||||
fullName="John Q. User" password="pass">
|
||||
<subscription host="mail.hotmail.com" autoConnect="false"
|
||||
password="bar" type="pop3" username="user1234">
|
||||
</subscription>
|
||||
<subscription host="mail.yahoo.com" autoConnect="false" password="foo"
|
||||
type="imap" username="jquser">
|
||||
</subscription>
|
||||
</user>
|
||||
</database>
|
||||
|
||||
@@ -27,21 +27,4 @@
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- Restricts access to pure JSP files - access available only via Struts action -->
|
||||
<security-constraint>
|
||||
<display-name>No direct JSP access</display-name>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>No-JSP</web-resource-name>
|
||||
<url-pattern>*.jsp</url-pattern>
|
||||
</web-resource-collection>
|
||||
<auth-constraint>
|
||||
<role-name>no-users</role-name>
|
||||
</auth-constraint>
|
||||
</security-constraint>
|
||||
|
||||
<security-role>
|
||||
<description>Don't assign users to this role</description>
|
||||
<role-name>no-users</role-name>
|
||||
</security-role>
|
||||
|
||||
</web-app>
|
||||
|
||||
+124
-13
@@ -26,11 +26,12 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Struts 2 Webapps</name>
|
||||
<name>Webapps</name>
|
||||
<modules>
|
||||
<module>blank</module>
|
||||
<module>jboss-blank</module>
|
||||
@@ -40,6 +41,126 @@
|
||||
<module>rest-showcase</module>
|
||||
</modules>
|
||||
|
||||
<scm>
|
||||
<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>
|
||||
<profile>
|
||||
<id>hostedqa</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hostedqa</groupId>
|
||||
<artifactId>hostedqa-remote-ant</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>codehaus</id>
|
||||
<name>codehaus</name>
|
||||
<url>http://repository.codehaus.org</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-hostedqa</id>
|
||||
<name>maven-hostedqa</name>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<url>http://maven.hostedqa.com</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<resources>
|
||||
<!-- Include resources under src/main/java in WEB-INF/classes -->
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<taskdef resource="hostedqatasks" classpathref="maven.plugin.classpath" />
|
||||
<upload file="${project.build.directory}/${project.build.finalName}.war" account="struts" email="${email}" password="${password}" resourceId="${resourceId}" />
|
||||
|
||||
<playsuite suiteId="${suiteId}" clientConfigs="${clientConfigs}" appConfigs="${appConfigs}" account="struts" email="${email}" password="${password}" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hostedqa</groupId>
|
||||
<artifactId>hostedqa-remote-ant</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>release</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<inherited>true</inherited>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rat-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
|
||||
<licenseMatchers>
|
||||
<classNames>
|
||||
<className>rat.analysis.license.ApacheSoftwareLicense20</className>
|
||||
</classNames>
|
||||
</licenseMatchers>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>src/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Include source code under WEB-INF/src/java -->
|
||||
@@ -82,14 +203,6 @@
|
||||
<warSourceExcludes>WEB-INF/classes/LICENSE.txt,WEB-INF/classes/NOTICE.txt</warSourceExcludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<skipDeploy>true</skipDeploy>
|
||||
<generateReports>false</generateReports>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
@@ -97,6 +210,7 @@
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
@@ -111,7 +225,4 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -13,10 +13,5 @@ WAR is not ready-to-run. Extract the portlet WAR, and then copy the
|
||||
contents of apps/portlet/src/main/etc/<your_portal_server>/ into the
|
||||
WAR's WEB-INF directory.
|
||||
|
||||
I18N:
|
||||
=====
|
||||
Please note that this project was created with the assumption that it will be run
|
||||
in an environment where the default locale is set to English. This means that
|
||||
the default messages defined in package.properties are in English. If the default
|
||||
locale for your server is different, then rename package.properties to package_en.properties
|
||||
and create a new package.properties with proper values for your default locale.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
+29
-23
@@ -26,12 +26,18 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 Portlet Webapp</name>
|
||||
<name>Portlet Webapp</name>
|
||||
|
||||
<scm>
|
||||
<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>
|
||||
<profile>
|
||||
@@ -62,7 +68,6 @@
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.26</version>
|
||||
<configuration>
|
||||
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
|
||||
<webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
|
||||
@@ -80,7 +85,7 @@
|
||||
<dependency>
|
||||
<groupId>com.bekk.boss</groupId>
|
||||
<artifactId>maven-jetty-pluto-embedded</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
@@ -88,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>
|
||||
@@ -104,10 +109,6 @@
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-dwr-plugin</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-tiles-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
@@ -117,8 +118,22 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<version>1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
@@ -175,14 +190,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@@ -208,7 +217,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
-61
@@ -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;
|
||||
}
|
||||
}
|
||||
-52
@@ -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;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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
-1
@@ -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">
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
|
||||
<validators>
|
||||
<field name="firstName">
|
||||
<field-validator type="requiredstring">
|
||||
<message>You must enter a first name</message>
|
||||
</field-validator>
|
||||
</field>
|
||||
<field name="lastName">
|
||||
<field-validator type="requiredstring">
|
||||
<message>You must enter a last name</message>
|
||||
</field-validator>
|
||||
</field>
|
||||
</validators>
|
||||
+1
-1
@@ -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,27 +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="tiles" extends="struts-portlet-tiles-default" namespace="/tiles">
|
||||
<default-action-ref name="index"/>
|
||||
|
||||
<action name="index" class="org.apache.struts2.portlet.example.FormExample">
|
||||
<result type="tiles">formExampleTiles.index</result>
|
||||
<result name="success" type="tiles">formExampleTiles.index</result>
|
||||
</action>
|
||||
|
||||
<action name="processTilesFreemarkerExample" class="org.apache.struts2.portlet.example.FormExample" method="input">
|
||||
<result name="success" type="tiles">formExampleTiles.freemarker</result>
|
||||
</action>
|
||||
|
||||
<action name="processTilesFreemarkerExample" class="org.apache.struts2.portlet.example.FormExample" method="execute">
|
||||
<result name="input" type="tiles">formExampleTiles.freemarker</result>
|
||||
<result name="success" type="tiles">formExampleTiles.freemarkerResult</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="view" extends="struts-portlet-default"
|
||||
|
||||
@@ -1,12 +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-tiles.xml"/>
|
||||
<include file="struts-view.xml"/>
|
||||
<include file="struts-edit.xml"/>
|
||||
<include file="struts-help.xml"/>
|
||||
</struts>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?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"/>
|
||||
<validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/>
|
||||
<validator name="short" class="com.opensymphony.xwork2.validator.validators.ShortRangeFieldValidator"/>
|
||||
<validator name="double" class="com.opensymphony.xwork2.validator.validators.DoubleRangeFieldValidator"/>
|
||||
<validator name="date" class="com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator"/>
|
||||
<validator name="expression" class="com.opensymphony.xwork2.validator.validators.ExpressionValidator"/>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
|
||||
@@ -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/>
|
||||
|
||||
|
||||
@@ -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,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!--
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
-->
|
||||
|
||||
<!DOCTYPE tiles-definitions PUBLIC
|
||||
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
|
||||
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
|
||||
|
||||
<tiles-definitions>
|
||||
|
||||
<definition name="formExampleTiles.index" template="/WEB-INF/tiles/layout.jsp">
|
||||
<put-attribute name="title" value="Portlet Tiles FormExample"/>
|
||||
<put-attribute name="header" value="/WEB-INF/tiles/header.jsp"/>
|
||||
<put-attribute name="body" value="/WEB-INF/tiles/index.jsp"/>
|
||||
<put-attribute name="footer" value="/WEB-INF/tiles/footer.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="formExampleTiles.freemarker" extends="formExampleTiles.index">
|
||||
<put-attribute name="title" value="Portlet Tiles/Freemarker FormExample"/>
|
||||
<put-attribute name="body" value="/WEB-INF/tiles/formExampleInputValidation.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="formExampleTiles.freemarkerResult" extends="formExampleTiles.freemarker">
|
||||
<put-attribute name="body" value="/WEB-INF/tiles/formExample.jsp"/>
|
||||
</definition>
|
||||
|
||||
</tiles-definitions>
|
||||
@@ -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>
|
||||
|
||||
@@ -12,7 +12,6 @@ Here you'll find examples of what is possible with the Struts Portlet integratio
|
||||
<li><a href="<s:url action="fileUpload" method="input"/>">File upload</li>
|
||||
<li><a href="<s:url action="freeMarkerExample"/>">FreeMarker</a></li>
|
||||
<li><a href="<s:url action="velocityHelloWorld"/>">Velocity</a></li>
|
||||
<li><a href="<s:url action="index" namespace="/tiles"/>">Form Example Validation with Tiles</a></li>
|
||||
<li><a href="<s:url action="index" portletMode="edit"/>">Go to edit mode and see what's there</a></li>
|
||||
<li><a href="<s:url action="index" portletMode="help"/>">Go to help mode and see what's there</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<web-app id="StrutsPortlet">
|
||||
|
||||
<context-param>
|
||||
<param-name>org.apache.tiles.factory.TilesContainerFactory</param-name>
|
||||
<param-value>org.apache.struts2.tiles.StrutsTilesContainerFactory</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
|
||||
<param-value>/WEB-INF/tiles.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Uncomment/comment this if you need/don't need Spring support -->
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
@@ -18,14 +8,11 @@
|
||||
/WEB-INF/applicationContext*.xml
|
||||
</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Tiles Plugin -->
|
||||
<listener>
|
||||
<listener-class>org.apache.struts2.tiles.StrutsTilesListener
|
||||
</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>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<hr/>
|
||||
<@s.url id="home" action="index" namespace="/view" />
|
||||
<div>
|
||||
<p>Powered by Struts2 Portlet/Tiles Plugin | <@s.a href="${home}">Back to front page</@s.a></p>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<hr/>
|
||||
<s:url id="home" action="index" namespace="/view" />
|
||||
<div>
|
||||
<p>Powered by Struts2 Portlet/Tiles Plugin | <s:a href="%{home}">Back to front page</s:a></p>
|
||||
</div>
|
||||
@@ -1,5 +0,0 @@
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
|
||||
<H2>Hello <s:property value="firstName"/> <s:property value="lastName"/></H2>
|
||||
<p/>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<link rel="stylesheet" type="text/css" href="<s:url value="/styles/styles.css"/>">
|
||||
<H2>Input your name</H2>
|
||||
<s:form action="processTilesFreemarkerExample" namespace="/tiles" method="POST" >
|
||||
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
|
||||
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
|
||||
<s:submit value="Submit the form"/>
|
||||
</s:form>
|
||||
@@ -1,2 +0,0 @@
|
||||
<h1>Struts2 Portlet Tiles App Example</h1>
|
||||
<hr/>
|
||||
@@ -1,13 +0,0 @@
|
||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||
<div>
|
||||
<p>This example illustrates the Struts/Portlet/Tiles Plugin.</p>
|
||||
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<s:url id="freemarker" namespace="/tiles" action="processTilesFreemarkerExample" method="input" />
|
||||
<s:a href="%{freemarker}">View FreeMarker Example</s:a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<tiles:importAttribute name="title" scope="request"/>
|
||||
|
||||
<tiles:insertAttribute name="header"/>
|
||||
<h2><tiles:insertAttribute name="title"/></h2>
|
||||
<p id="body">
|
||||
<tiles:insertAttribute name="body"/>
|
||||
</p>
|
||||
|
||||
<p>Notice that this is a layout made in JSP</p>
|
||||
|
||||
<tiles:insertAttribute name="footer"/>
|
||||
@@ -1,15 +0,0 @@
|
||||
README.txt - Rest Showcase Webapp
|
||||
|
||||
Rest Showcase is a simple example of REST app build with the REST plugin.
|
||||
|
||||
For more on getting started with Struts, see
|
||||
|
||||
* http://cwiki.apache.org/WW/home.html
|
||||
|
||||
I18N:
|
||||
=====
|
||||
Please note that this project was created with the assumption that it will be run
|
||||
in an environment where the default locale is set to English. This means that
|
||||
the default messages defined in package.properties are in English. If the default
|
||||
locale for your server is different, then rename package.properties to package_en.properties
|
||||
and create a new package.properties with proper values for your default locale.
|
||||
+58
-64
@@ -22,35 +22,30 @@
|
||||
*/
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.22</version>
|
||||
<version>2.2.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.3.22</version>
|
||||
<name>Struts 2 Rest Showcase Webapp</name>
|
||||
<description>Struts 2 Rest Showcase Example</description>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.2.2</version>
|
||||
<name>Struts 2 Rest Showcase Example</name>
|
||||
<description>Struts 2 Rest Showcase Example</description>
|
||||
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
@@ -64,12 +59,13 @@
|
||||
<version>1.4.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jwebunit</groupId>
|
||||
@@ -87,50 +83,41 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>struts2-rest-showcase</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<finalName>struts2-rest-showcase</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-rest-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<groupId>org.twdata.maven</groupId>
|
||||
<artifactId>maven-itblast-plugin</artifactId>
|
||||
<version>0.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<containers>tomcat5x</containers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
-->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
@@ -140,9 +127,16 @@
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<!--
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>twdata-m2-repository</id>
|
||||
<name>twdata.org Maven Repository</name>
|
||||
<url>http://twdata-m2-repository.googlecode.com/svn/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
-->
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.demo.rest.example;
|
||||
package org.apache.struts2.rest.example;
|
||||
|
||||
public class Order {
|
||||
String id;
|
||||
+6
-1
@@ -1,11 +1,16 @@
|
||||
package org.demo.rest.example;
|
||||
package org.apache.struts2.rest.example;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.struts2.dispatcher.ServletActionRedirectResult;
|
||||
import org.apache.struts2.rest.DefaultHttpHeaders;
|
||||
import org.apache.struts2.rest.HttpHeaders;
|
||||
import org.apache.struts2.convention.annotation.Results;
|
||||
import org.apache.struts2.convention.annotation.Result;
|
||||
import org.apache.struts2.convention.annotation.ParentPackage;
|
||||
import org.apache.struts2.convention.annotation.Namespaces;
|
||||
import org.apache.struts2.convention.annotation.Namespace;
|
||||
import org.apache.struts2.convention.annotation.InterceptorRef;
|
||||
|
||||
import com.opensymphony.xwork2.ModelDriven;
|
||||
import com.opensymphony.xwork2.Validateable;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.demo.rest.example;
|
||||
package org.apache.struts2.rest.example;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=INFO, stdout
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=FATAL
|
||||
|
||||
log4j.logger.com.opensymphony.xwork2=DEBUG
|
||||
log4j.logger.org.apache.struts2=DEBUG
|
||||
@@ -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 -->
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
|
||||
@@ -1,45 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html PUBLIC
|
||||
"-//W3C//DTD XHTML 1.1 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Orders</title>
|
||||
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<title>Order ${id}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Delete Order ${id}</h1>
|
||||
</div>
|
||||
|
||||
<form action="../${id}?_method=DELETE" method="post">
|
||||
<p>
|
||||
Are you sure you want to delete order ${id}?
|
||||
</p>
|
||||
<div class="btn-group">
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input type="button" value="Cancel" class="btn btn-success" onclick="window.location.href = '../../orders'" />
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<a href="${pageContext.request.contextPath}/orders" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Back to Orders
|
||||
</a>
|
||||
</div><!--/col-md-12--->
|
||||
</div><!--/row-->
|
||||
</div><!--/container-->
|
||||
<form action="../${id}?_method=DELETE" method="post">
|
||||
<p>
|
||||
Are you sure you want to delete order ${id}?
|
||||
</p>
|
||||
<div>
|
||||
<input type="submit" value="Delete" />
|
||||
<input type="button" value="Cancel" onclick="window.location.href = '../../orders'" />
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<a href="../../orders">Back to Orders</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,64 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<!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 lang="en">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Orders</title>
|
||||
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<title>Order <s:property value="id" /></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Order <s:property value="id" /></h1>
|
||||
</div>
|
||||
|
||||
<s:actionmessage cssClass="alert alert-danger"/>
|
||||
|
||||
<s:form method="post" action="%{#request.contextPath}/orders/%{id}" cssClass="form-horizontal" theme="simple">
|
||||
<s:hidden name="_method" value="put" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="id">ID</label>
|
||||
<div class="col-sm-4">
|
||||
<s:textfield id="id" name="id" disabled="true" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="clientName">Client</label>
|
||||
<div class="col-sm-4">
|
||||
<s:textfield id="clientName" name="clientName" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="amount">Amount</label>
|
||||
<div class="col-sm-4">
|
||||
<s:textfield id="amount" name="amount" cssClass="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-4">
|
||||
<s:submit cssClass="btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
</s:form>
|
||||
<a href="${pageContext.request.contextPath}/orders" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Back to Orders
|
||||
</a>
|
||||
</div><!--/col-md-12--->
|
||||
</div><!--/row-->
|
||||
</div><!--/container-->
|
||||
<s:form method="post" action="%{#request.contextPath}/orders/%{id}">
|
||||
<s:hidden name="_method" value="put" />
|
||||
<table>
|
||||
<s:textfield name="id" label="ID" disabled="true"/>
|
||||
<s:textfield name="clientName" label="Client"/>
|
||||
<s:textfield name="amount" label="Amount" />
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<s:submit />
|
||||
</td>
|
||||
</table>
|
||||
</s:form>
|
||||
<a href="<%=request.getContextPath() %>/orders">Back to Orders</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,56 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<!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 lang="en">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Orders</title>
|
||||
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<title>New Order</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>New Order</h1>
|
||||
</div>
|
||||
|
||||
<s:actionmessage cssClass="alert alert-danger"/>
|
||||
|
||||
<s:form method="post" action="%{#request.contextPath}/orders" cssClass="form-horizontal" theme="simple">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="clientName">Client</label>
|
||||
<div class="col-sm-4">
|
||||
<s:textfield id="clientName" name="clientName" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="amount">Amount</label>
|
||||
<div class="col-sm-4">
|
||||
<s:textfield id="amount" name="amount" cssClass="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-4">
|
||||
<s:submit cssClass="btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
</s:form>
|
||||
<a href="${pageContext.request.contextPath}/orders" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-arrow-left"></apan> Back to Orders
|
||||
</a>
|
||||
</div><!--/col-md-12--->
|
||||
</div><!--/row-->
|
||||
</div><!--/container-->
|
||||
<s:form method="post" action="%{#request.contextPath}/orders">
|
||||
<table>
|
||||
<s:textfield name="clientName" label="Client"/>
|
||||
<s:textfield name="amount" label="Amount" />
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<s:submit />
|
||||
</td>
|
||||
</table>
|
||||
</s:form>
|
||||
<a href="<%=request.getContextPath() %>/orders">Back to Orders</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,55 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<!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 lang="en">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Orders</title>
|
||||
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<title>Orders</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Orders</h1>
|
||||
</div>
|
||||
<s:actionmessage cssClass="alert alert-danger"/>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Client</th>
|
||||
<th>Amount</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<s:iterator value="model">
|
||||
<tr>
|
||||
<td>${id}</td>
|
||||
<td><s:property value="clientName"/></td>
|
||||
<td><s:property value="amount"/></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="orders/${id}" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> View</a>
|
||||
<a href="orders/${id}/edit" class="btn btn-default"><span class="glyphicon glyphicon-edit"></span> Edit</a>
|
||||
<a href="orders/${id}/deleteConfirm" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Delete</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</s:iterator>
|
||||
</table>
|
||||
<a href="orders/new" class="btn btn-primary"><span class="glyphicon glyphicon-file"></span> Create a new order</a>
|
||||
</div><!--/col-md-12--->
|
||||
</div><!--/row-->
|
||||
</div><!--/container-->
|
||||
<s:actionmessage />
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Client</th>
|
||||
<th>Amount</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<s:iterator value="model">
|
||||
<tr>
|
||||
<td>${id}</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>
|
||||
</tr>
|
||||
</s:iterator>
|
||||
</table>
|
||||
<a href="orders/new">Create a new order</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user