Compare commits

...

4 Commits

Author SHA1 Message Date
Lukasz Lenart f0f4e9ece7 [maven-release-plugin] prepare release STRUTS_2_5_10 2017-01-27 10:35:05 +01:00
Lukasz Lenart 45580718ab WW-4735 Uses more flexible RegExp to match domain suffixes 2017-01-27 08:27:50 +01:00
Lukasz Lenart 87f113ebb2 Moves description to wiki 2017-01-19 08:36:26 +01:00
Lukasz Lenart 0023d9664b [maven-release-plugin] prepare for next development iteration 2017-01-17 10:27:23 +01:00
38 changed files with 43 additions and 95 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-apps</artifactId>
<packaging>pom</packaging>
+2 -2
View File
@@ -26,12 +26,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.5.9</version>
<version>2.5.10</version>
<name>Struts 2 Rest Showcase Webapp</name>
<description>Struts 2 Rest Showcase Example</description>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-showcase</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-assembly</artifactId>
+3 -3
View File
@@ -10,7 +10,7 @@
</parent>
<artifactId>struts2-bom</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
<packaging>pom</packaging>
<name>Struts 2 Bill of Materials</name>
@@ -25,7 +25,7 @@
</licenses>
<properties>
<struts-version.version>2.5.9</struts-version.version>
<struts-version.version>2.5.10</struts-version.version>
</properties>
<build>
@@ -172,6 +172,6 @@
</dependencyManagement>
<scm>
<tag>STRUTS_2_5_9</tag>
<tag>STRUTS_2_5_10</tag>
</scm>
</project>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-osgi-admin-bundle</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-osgi-demo-bundle</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-osgi-bundles</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-core</artifactId>
<packaging>jar</packaging>
@@ -23,7 +23,7 @@ package com.opensymphony.xwork2.validator.validators;
* The regular expression used to validate that the string is an email address is:
*
* <pre>
* \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx|tech|cat)$\\b
* \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,6})$\\b
* </pre>
*
* You can also specify expression, caseSensitive and trim params as a OGNL expression, see the example below.
@@ -78,9 +78,7 @@ package com.opensymphony.xwork2.validator.validators;
*/
public class EmailValidator extends RegexFieldValidator {
// see XW-371
public static final String EMAIL_ADDRESS_PATTERN =
"\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx|tech|cat)$\\b";
public static final String EMAIL_ADDRESS_PATTERN = "\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,6})$\\b";
public EmailValidator() {
setRegex(EMAIL_ADDRESS_PATTERN);
@@ -38,59 +38,8 @@ import java.util.Locale;
import java.util.Map;
/**
* <!-- START SNIPPET: description -->
* <p>
* An interceptor that handles setting the locale specified in a session as the locale for the current action request.
* In addition, this interceptor will look for a specific HTTP request parameter and set the locale to whatever value is
* provided, it also looks for specific cookie to read locale from. This means that this interceptor can be used to allow
* for your application to dynamically change the locale for the user's session or, alternatively, only for the current
* request (since XWork 2.1.3).
* This is very useful for applications that require multi-lingual support and want the user to
* be able to set his or her language preference at any point. The locale parameter is removed during the execution of
* this interceptor, ensuring that properties aren't set on an action (such as request_locale) that have no typical
* corresponding setter in your action.
* </p>
*
* <p>
* For example, using the default parameter name, a request to <b>foo.action?request_locale=en_US</b>, then the
* locale for US English is saved in the user's session and will be used for all future requests.
* If there is no locale set (for example with the first visit), the interceptor uses the browser locale.
* </p>
* <!-- END SNIPPET: description -->
*
* <!-- START SNIPPET: parameters -->
*
* <ul>
*
* <li>parameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to and save
* in the session. By default this is <b>request_locale</b></li>
*
* <li>requestCookieParameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to
* and save in a cookie. By default this is <b>request_cookie_locale</b></li>
*
* <li>requestOnlyParameterName (optional) - the name of the HTTP request parameter that dictates the locale to switch to
* for the current request only, without saving it in the session. By default this is <b>request_only_locale</b></li>
*
* <li>attributeName (optional) - the name of the session key to store the selected locale. By default this is
* <b>WW_TRANS_I18N_LOCALE</b></li>
*
* <li>storage (optional) - the name of storage location, it can be <b>none</b>, <b>session</b> or <b>cookie</b>.
* By default this is <b>session</b></li>
*
* </ul>
*
* <!-- END SNIPPET: parameters -->
*
* <!-- START SNIPPET: example -->
* &lt;interceptor name="i18nCookie" class="org.apache.struts2.interceptor.I18nInterceptor"/&gt;
*
* &lt;action name="someAction" class="com.examples.SomeAction"&gt;
* &lt;interceptor-ref name="i18nCookie"/&gt;
* &lt;interceptor-ref name="basicStack"/&gt;
* &lt;result name="success"&gt;good_result.ftl&lt;/result&gt;
* &lt;/action&gt;
* <!-- END SNIPPET: example -->
*/
*/
public class I18nInterceptor extends AbstractInterceptor {
private static final Logger LOG = LogManager.getLogger(I18nInterceptor.class);
@@ -47,6 +47,7 @@ public class EmailValidatorTest extends XWorkTestCase {
assertTrue(verifyEmailValidity("Ferda+Mravenec@yaHoo.CoM"));
assertTrue(verifyEmailValidity("user@domainname.tech"));
assertTrue(verifyEmailValidity("Ferda+Mravenec@yaHoo.cat"));
assertTrue(verifyEmailValidity("user@domainname.swiss"));
assertFalse(verifyEmailValidity("tm_jee#marry@yahoo.co.uk"));
assertFalse(verifyEmailValidity("tm_jee@ yahoo.co.uk"));
+1 -1
View File
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-cdi-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-config-browser-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-convention-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-dwr-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-embeddedjsp-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-gxp-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-jasperreports-plugin</artifactId>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-javatemplates-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-jfreechart-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-json-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-junit-plugin</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-osgi-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-oval-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-pell-multipart-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-plexus-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-plugins</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-portlet-tiles-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-portlet-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-rest-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-sitegraph-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-sitemesh-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-spring-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-testng-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
</parent>
<artifactId>struts2-tiles-plugin</artifactId>
+2 -2
View File
@@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-parent</artifactId>
<version>2.5.9</version>
<version>2.5.10</version>
<packaging>pom</packaging>
<name>Struts 2</name>
<url>http://struts.apache.org/</url>
@@ -31,7 +31,7 @@
<connection>scm:git:git://git.apache.org/struts.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/struts.git</developerConnection>
<url>http://git.apache.org/struts.git</url>
<tag>STRUTS_2_5_9</tag>
<tag>STRUTS_2_5_10</tag>
</scm>
<issueManagement>