You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2004/12/16 11:21:18 UTC
svn commit: r122540 - in incubator/beehive/trunk/netui: external/struts src/compiler/org/apache/beehive/netui/compiler/model src/pageflow/org/apache/beehive/netui/pageflow src/pageflow/org/apache/beehive/netui/pageflow/validation src/tags-html/org/apache/beehive/netui/tags/html src/webapp-template/default/WEB-INF test/webapps/drt/coreWeb/WEB-INF test/webapps/drt/coreWeb/tags/imageAnchorActions test/webapps/drt/testRecorder/tests
Author: rich
Date: Thu Dec 16 02:21:16 2004
New Revision: 122540
URL: http://svn.apache.org/viewcvs?view=rev&rev=122540
Log:
Changes to support Struts 1.2.x. NetUI now runs on either Struts 1.1 or Struts 1.2.x (1.2.4 currently). Updated the DRT app to use 1.2.4. A Struts 1.1 DRT webapp is coming soon.
DRT/BVT: netui (WinXP)
BB: self (WinXP)
Added:
incubator/beehive/trunk/netui/external/struts/NOTICE
incubator/beehive/trunk/netui/external/struts/antlr.jar (contents, props changed)
incubator/beehive/trunk/netui/external/struts/struts-config_1_2.dtd (contents, props changed)
incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/validator-rules.xml (contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml (contents, props changed)
Removed:
incubator/beehive/trunk/netui/external/struts/commons-dbcp.jar
incubator/beehive/trunk/netui/external/struts/commons-lang.jar
incubator/beehive/trunk/netui/external/struts/commons-pool.jar
incubator/beehive/trunk/netui/external/struts/commons-resources.jar
incubator/beehive/trunk/netui/external/struts/commons-services.jar
incubator/beehive/trunk/netui/external/struts/struts-template.tld
incubator/beehive/trunk/netui/external/struts/tiles-config.dtd
Modified:
incubator/beehive/trunk/netui/external/struts/LICENSE
incubator/beehive/trunk/netui/external/struts/commons-collections.jar
incubator/beehive/trunk/netui/external/struts/commons-logging.jar
incubator/beehive/trunk/netui/external/struts/commons-validator.jar
incubator/beehive/trunk/netui/external/struts/jakarta-oro.jar
incubator/beehive/trunk/netui/external/struts/struts-bean.tld
incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd
incubator/beehive/trunk/netui/external/struts/struts-html.tld
incubator/beehive/trunk/netui/external/struts/struts-logic.tld
incubator/beehive/trunk/netui/external/struts/struts-nested.tld
incubator/beehive/trunk/netui/external/struts/struts-tiles.tld
incubator/beehive/trunk/netui/external/struts/struts.jar
incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd
incubator/beehive/trunk/netui/external/struts/validator-rules.xml
incubator/beehive/trunk/netui/external/struts/version.txt
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml
Modified: incubator/beehive/trunk/netui/external/struts/LICENSE
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/LICENSE?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/LICENSE&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/LICENSE&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/LICENSE (original)
+++ incubator/beehive/trunk/netui/external/struts/LICENSE Thu Dec 16 02:21:16 2004
@@ -1,65 +1,174 @@
-/*
- * $Header: /home/cvs/jakarta-struts/LICENSE,v 1.2 2001/02/02 00:38:31 craigmcc Exp $
- * $Revision: 1.2 $
- * $Date: 2001/02/02 00:38:31 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+ 1. Definitions.
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
Added: incubator/beehive/trunk/netui/external/struts/NOTICE
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/NOTICE?view=auto&rev=122540
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/external/struts/NOTICE Thu Dec 16 02:21:16 2004
@@ -0,0 +1,7 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes the ANTLR parsing library,
+developed by JGuru.com (http://www.antlr.org and
+http://www.jguru.com).
+
Added: incubator/beehive/trunk/netui/external/struts/antlr.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/antlr.jar?view=auto&rev=122540
==============================================================================
Binary file. No diff available.
Modified: incubator/beehive/trunk/netui/external/struts/commons-collections.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-collections.jar?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/commons-collections.jar&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/commons-collections.jar&r2=122540
==============================================================================
Binary files. No diff available.
Deleted: /incubator/beehive/trunk/netui/external/struts/commons-dbcp.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-dbcp.jar?view=auto&rev=122539
==============================================================================
Deleted: /incubator/beehive/trunk/netui/external/struts/commons-lang.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-lang.jar?view=auto&rev=122539
==============================================================================
Modified: incubator/beehive/trunk/netui/external/struts/commons-logging.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-logging.jar?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/commons-logging.jar&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/commons-logging.jar&r2=122540
==============================================================================
Binary files. No diff available.
Deleted: /incubator/beehive/trunk/netui/external/struts/commons-pool.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-pool.jar?view=auto&rev=122539
==============================================================================
Deleted: /incubator/beehive/trunk/netui/external/struts/commons-resources.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-resources.jar?view=auto&rev=122539
==============================================================================
Deleted: /incubator/beehive/trunk/netui/external/struts/commons-services.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-services.jar?view=auto&rev=122539
==============================================================================
Modified: incubator/beehive/trunk/netui/external/struts/commons-validator.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/commons-validator.jar?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/commons-validator.jar&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/commons-validator.jar&r2=122540
==============================================================================
Binary files. No diff available.
Modified: incubator/beehive/trunk/netui/external/struts/jakarta-oro.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/jakarta-oro.jar?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/jakarta-oro.jar&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/jakarta-oro.jar&r2=122540
==============================================================================
Binary files. No diff available.
Modified: incubator/beehive/trunk/netui/external/struts/struts-bean.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-bean.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-bean.tld&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-bean.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-bean.tld (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-bean.tld Thu Dec 16 02:21:16 2004
@@ -8,10 +8,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>bean</shortname>
-<uri>http://jakarta.apache.org/struts/tags-bean</uri>
+<uri>http://struts.apache.org/tags-bean</uri>
<tag>
<name>cookie</name>
<tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass>
Modified: incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-config_1_1.dtd Thu Dec 16 02:21:16 2004
@@ -8,7 +8,7 @@
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
- $Id: struts-config_1_1.dtd,v 1.40 2003/05/14 08:17:16 turner Exp $
+ $Id: struts-config_1_1.dtd,v 1.42 2004/02/17 05:51:47 martinc Exp $
-->
@@ -62,7 +62,7 @@
<!ENTITY % PropName "CDATA">
-<!-- A "RequestPath" is an application-relative URI path, beginning with a
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
slash, that identifies a mapped resource (such as a JSP page or a servlet)
within this web application.
-->
@@ -130,12 +130,11 @@
<!-- The "form-beans" element describes the set of form bean descriptors for this
- application module. The following attributes are defined:
+ module. The following attributes are defined:
type Fully qualified Java class to use when instantiating
ActionFormBean objects. If specified, the object must be a
subclass of the default class type.
- DEPRECATED.
WARNING: For Struts 1.0, this value is ignored. You
can set the default implementation class name with the
@@ -282,7 +281,6 @@
type Fully qualified Java class to use when instantiating
ActionForward objects. If specified, the object must be a
subclass of the default class type.
- DEPRECATED.
WARNING: For Struts 1.0, this value is ignored. You
can set the default implementation class name with the
@@ -298,7 +296,7 @@
available to an Action as a return value. An ActionForward is referenced by
a logical name and encapsulates a URI. A "forward" element may be used to
describe both global and local ActionForwards. Global forwards are available
- to all the Action objects in the application module. Local forwards can be
+ to all the Action objects in the module. Local forwards can be
nested within an <action> element and only available to an Action object
when it is invoked through that ActionMapping.
@@ -378,7 +376,7 @@
will process this request, instead of the Action class
specified by "type". The path WILL NOT be processed
through the "forwardPattern" attribute that is configured
- on the "controller" element for this application module.
+ on the "controller" element for this module.
Exactly one of "forward", "include", or "type" must be
specified.
@@ -386,7 +384,7 @@
will process this request, instead of the Action class
specified by "type". The path WILL NOT be processed
through the "forwardPattern" attribute that is configured
- on the "controller" element for this application module.
+ on the "controller" element for this module.
Exactly one of "forward", "include", or "type" must be
specified.
@@ -467,7 +465,7 @@
<!-- The "controller" element describes the ControllerConfig bean
[org.apache.struts.config.ControllerConfig] that encapsulates
- an application module's runtime configuration. The following
+ a module's runtime configuration. The following
attributes are defined:
bufferSize The size of the input buffer used when processing
@@ -595,11 +593,11 @@
key Servlet context attribute under which this message
resources bundle will be stored. The default attribute is
the value specified by the string constant at
- [Globals.MESSAGES_KEY]. The application module prefix (if
+ [Globals.MESSAGES_KEY]. The module prefix (if
any) is appended to the key (${key}${prefix}).
[org.apache.struts.Globals.MESSAGES_KEY]
- NOTE: The application module prefix includes the leading
+ NOTE: The module prefix includes the leading
slash, so the default message resource bundle for a module
named "foo" is stored under
"org.apache.struts.action.MESSAGE/foo".
Added: incubator/beehive/trunk/netui/external/struts/struts-config_1_2.dtd
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-config_1_2.dtd?view=auto&rev=122540
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/external/struts/struts-config_1_2.dtd Thu Dec 16 02:21:16 2004
@@ -0,0 +1,686 @@
+<!--
+ DTD for the Struts Application Configuration File
+
+ To support validation of your configuration file, include the following
+ DOCTYPE element at the beginning (after the "xml" declaration):
+
+ <!DOCTYPE struts-config PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
+ "http://struts.apache.org/dtds/struts-config_1_2.dtd">
+
+ $Id: struts-config_1_2.dtd,v 1.8 2004/04/06 23:30:23 husted Exp $
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- An "AttributeName" is the identifier of a page, request, session, or
+ application scope attribute.
+-->
+<!ENTITY % AttributeName "CDATA">
+
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+ and also serves as the name of the corresponding scripting variable
+ and the name of the JSP attribute under which the bean is accessed.
+ Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+ variable.
+-->
+<!ENTITY % Boolean "(true|false|yes|no)">
+
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+ instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+
+<!-- An "Integer" is a character string consisting solely of numeric digits,
+ optionally preceeded by a minus sign, that can be converted to a
+ 32-bit integer.
+-->
+<!ENTITY % Integer "CDATA">
+
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+ defines the location of a resource relative to the location of the
+ Struts configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+ a lower case letter and contain only characters that are legal in a
+ Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
+ slash, that identifies a mapped resource (such as a JSP page or a servlet)
+ within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+
+<!-- The name of a JSP bean scope within which such a form bean may be
+ accessed.
+-->
+<!ENTITY % RequestScope "(request|session)">
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+<!-- The "struts-config" element is the root of the configuration file
+ hierarchy, and contains nested elements for all of the other
+ configuration settings.
+-->
+<!ELEMENT struts-config (display-name?, description?, data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
+<!ATTLIST struts-config id ID #IMPLIED>
+
+
+<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
+ Standard Extension]. The individual DataSource objects are configured through
+ nested <data-source> elements.
+-->
+<!ELEMENT data-sources (data-source*)>
+<!ATTLIST data-sources id ID #IMPLIED>
+
+
+<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
+ Extension] that will be instantiated, configured, and made available as a
+ servlet context attribute (or "application-scope bean"). Any object can be
+ specified so long as it implements [javax.sql.DataSource] and can be
+ configured entirely from JavaBean properties. The following attributes
+ are required:
+
+ className The configuration bean for this DataSource object. If
+ specified, the object must be a subclass of the default
+ configuration bean.
+ ["org.apache.struts.config.DataSourceConfig"]
+
+ key Servlet context attribute key under which this data source
+ will be stored. Default is the value specified by string
+ constant defined by Globals.DATA_SOURCE_KEY. The application
+ module prefix (if any) is appended to the key
+ (${key}$prefix}).
+ [org.apache.struts.Globals.DATA_SOURCE_KEY]
+
+ NOTE: The application module prefix includes the leading
+ slash, so the default datasource for a module named "foo" is
+ stored under "org.apache.struts.action.DATA_SOURCE/foo".
+
+ type Fully qualified Java class name for this data source object.
+ The class must implement DataSource [javax.sql.DataSource],
+ and the object must be configurable entirely from JavaBean
+ properties.
+-->
+<!ELEMENT data-source (set-property*)>
+<!ATTLIST data-source id ID #IMPLIED>
+<!ATTLIST data-source className %ClassName; #IMPLIED>
+<!ATTLIST data-source key %AttributeName; #IMPLIED>
+<!ATTLIST data-source type %ClassName; #REQUIRED>
+
+
+<!-- The "form-beans" element describes the set of form bean descriptors for this
+ module. The following attributes are defined:
+
+ type Fully qualified Java class to use when instantiating
+ ActionFormBean objects. If specified, the object must be a
+ subclass of the default class type.
+
+ WARNING: For Struts 1.0, this value is ignored. You
+ can set the default implementation class name with the
+ "formBean" initialization parameter to the Struts
+ controller servlet.
+-->
+<!ELEMENT form-beans (form-bean*)>
+<!ATTLIST form-beans id ID #IMPLIED>
+<!ATTLIST form-beans type %ClassName; #IMPLIED>
+
+
+<!-- The "form-bean" element describes an ActionForm subclass
+ [org.apache.struts.action.ActionForm] that can be referenced by an "action"
+ element.
+
+
+The "form-bean" element describes a particular form bean, which is a
+ JavaBean that implements the org.apache.struts.action.ActionForm
+ class. The following attributes are defined:
+
+ className The configuration bean for this form bean object. If
+ specified, the object must be a subclass of the default
+ configuration bean.
+ ["org.apache.struts.config.FormBeanConfig"]
+
+ name The unique identifier for this form bean. Referenced by the
+ <action> element to specify which form bean to use with its
+ request.
+
+ type Fully qualified Java class name of the ActionForm subclass
+ to use with this form bean.
+-->
+<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
+<!ATTLIST form-bean id ID #IMPLIED>
+<!ATTLIST form-bean className %ClassName; #IMPLIED>
+<!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
+<!ATTLIST form-bean name %BeanName; #REQUIRED>
+<!ATTLIST form-bean type %ClassName; #REQUIRED>
+
+
+<!-- The "form-property" element describes a JavaBean property that can be used to
+ configure an instance of a DynaActionForm or a subclass thereof. This element
+ is only utilized when the "type" attribute of the enclosing "form-bean" element
+ is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
+ a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
+ enclosing <form-bean> element must be set to "true". Since Struts 1.1.
+
+ className The configuration bean for this form property object. If
+ specified, the object must be a subclass of the default
+ configuration bean.
+ ["org.apache.struts.config.FormPropertyConfig"]
+
+ initial String representation of the initial value for this property.
+ If not specified, primitives will be initialized to zero and
+ objects initialized to the zero-argument instantiation of that
+ object class. For example, Strings will be initialized to ""
+
+
+ name The name of the JavaBean property described by this element.
+
+ size The number of array elements to create if the value of the
+ "type" attribute specifies an array, but there is no value
+ specified for the "initial" attribute.
+
+ type Fully qualified Java class name of the field underlying this
+ property, optionally followed by "[]" to indicate that the
+ field is indexed.
+-->
+<!ELEMENT form-property (set-property*)>
+<!ATTLIST form-property className %ClassName; #IMPLIED>
+<!ATTLIST form-property initial CDATA #IMPLIED>
+<!ATTLIST form-property name %PropName; #REQUIRED>
+<!ATTLIST form-property size %Integer; #IMPLIED>
+<!ATTLIST form-property type %ClassName; #REQUIRED>
+
+
+<!-- The "global-exceptions" element describes a set of exceptions that might be
+ thrown by an Action object. The handling of individual exception types is
+ configured through nested exception elements. An <action> element may
+ override a global exception handler by registering a local exception handler
+ for the same exception type. Since Struts 1.1.
+-->
+<!ELEMENT global-exceptions (exception*)>
+<!ATTLIST global-exceptions id ID #IMPLIED>
+
+
+<!-- The "exception" element registers an ExceptionHandler for an exception type.
+ The following attributes are defined:
+
+ bundle Servlet context attribute for the message resources bundle
+ associated with this handler. The default attribute is the
+ value specified by the string constant declared at
+ Globals.MESSAGES_KEY.
+ [org.apache.struts.Globals.MESSAGES_KEY]
+
+ className The configuration bean for this ExceptionHandler object.
+ If specified, className must be a subclass of the default
+ configuration bean
+ ["org.apache.struts.config.ExceptionConfig"]
+
+ handler Fully qualified Java class name for this exception handler.
+ ["org.apache.struts.action.ExceptionHandler"]
+
+ key The key to use with this handler's message resource bundle
+ that will retrieve the error message template for this
+ exception.
+
+ path The module-relative URI to the resource that will complete
+ the request/response if this exception occurs.
+
+ scope The context ("request" or "session") that is used to access
+ the ActionError object [org.apache.struts.action.ActionError]
+ for this exception.
+
+ type Fully qualified Java class name of the exception type to
+ register with this handler.
+-->
+<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
+<!ATTLIST exception id ID #IMPLIED>
+<!ATTLIST exception bundle %AttributeName; #IMPLIED>
+<!ATTLIST exception className %ClassName; #IMPLIED>
+<!ATTLIST exception handler %ClassName; #IMPLIED>
+<!ATTLIST exception key CDATA #REQUIRED>
+<!ATTLIST exception path %RequestPath; #IMPLIED>
+<!ATTLIST exception scope CDATA #IMPLIED>
+<!ATTLIST exception type %ClassName; #REQUIRED>
+
+
+<!-- The "global-forwards" element describes a set of ActionForward objects
+ [org.apache.struts.action.ActionForward] that are available to all Action
+ objects as a return value. The individual ActionForwards are configured
+ through nested <forward> elements. An <action> element may override a global
+ forward by defining a local <forward> of the same name.
+
+ type Fully qualified Java class to use when instantiating
+ ActionForward objects. If specified, the object must be a
+ subclass of the default class type.
+
+ WARNING: For Struts 1.0, this value is ignored. You
+ can set the default implementation class name with the
+ "forward" initialization parameter to the Struts
+ controller servlet.
+-->
+<!ELEMENT global-forwards (forward*)>
+<!ATTLIST global-forwards id ID #IMPLIED>
+<!ATTLIST global-forwards type %ClassName; #IMPLIED>
+
+
+<!-- The "forward" element describes an ActionForward that is to be made
+ available to an Action as a return value. An ActionForward is referenced by
+ a logical name and encapsulates a URI. A "forward" element may be used to
+ describe both global and local ActionForwards. Global forwards are available
+ to all the Action objects in the module. Local forwards can be
+ nested within an <action> element and only available to an Action object
+ when it is invoked through that ActionMapping.
+
+ className Fully qualified Java class name of ActionForward
+ subclass to use for this object.
+ ["org.apache.struts.action.ActionForward"]
+
+ contextRelative Set this to "true" if, in a modular application, the path
+ attribute starts with a slash "/" and should be considered
+ relative to the entire web application rather than the module.
+ Since Struts 1.1.
+ DEPRECATED.
+ [false]
+
+ module The module prefix to use with this path. This value should
+ begin with a slash ("/").
+
+ name The unique identifier for this forward. Referenced by the
+ Action object at runtime to select - by its logical name -
+ the resource that should complete the request/response.
+
+ path The module-relative or context-relative path to the resources
+ that is encapsulated by the logical name of this ActionForward.
+ If the path is to be considered context-relative when used in
+ a modular application, then the contextRelative attribute
+ should be set to "true". This value should begin with a slash
+ ("/") character.
+
+ redirect Set to "true" if a redirect instruction should be issued to
+ the user-agent so that a new request is issued for this
+ forward's resource. If true, RequestDispatcher.Redirect is
+ called. If "false", RequestDispatcher.forward is called instead.
+ [false]
+-->
+<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
+<!ATTLIST forward id ID #IMPLIED>
+<!ATTLIST forward className %ClassName; #IMPLIED>
+<!ATTLIST forward contextRelative %Boolean; #IMPLIED>
+<!ATTLIST forward module %RequestPath; #IMPLIED>
+<!ATTLIST forward name CDATA #REQUIRED>
+<!ATTLIST forward path %RequestPath; #REQUIRED>
+<!ATTLIST forward redirect %Boolean; #IMPLIED>
+
+
+<!-- The "action-mappings" element describes a set of ActionMapping objects
+ [org.apache.struts.action.ActionMapping] that are available to process
+ requests matching the url-pattern our ActionServlet registered with the
+ container. The individual ActionMappings are configured through nested
+ <action> elements. The following attributes are defined:
+
+ type Fully qualified Java class to use when instantiating
+ ActionMapping objects. If specified, the object must be a
+ subclass of the default class type.
+
+ WARNING: For Struts 1.0, this value is ignored. You
+ can set the default implementation class name with the
+ "mapping" initialization parameter to the Struts
+ controller servlet.
+-->
+<!ELEMENT action-mappings (action*)>
+<!ATTLIST action-mappings id ID #IMPLIED>
+<!ATTLIST action-mappings type %ClassName; #IMPLIED>
+
+
+<!-- The "action" element describes an ActionMapping object that is to be used
+ to process a request for a specific module-relative URI. The following
+ attributes are defined:
+
+ attribute Name of the request-scope or session-scope attribute that
+ is used to access our ActionForm bean, if it is other than
+ the bean's specified "name". Optional if "name" is specified,
+ else not valid.
+
+ className The fully qualified Java class name of the ActionMapping
+ subclass to use for this action mapping object. Defaults to
+ the type specified by the enclosing <action-mappings>
+ element or to "org.apache.struts.action.ActionMapping" if
+ not specified.
+ ["org.apache.struts.action.ActionMapping"]
+
+ forward Module-relative path of the servlet or other resource that
+ will process this request, instead of the Action class
+ specified by "type". The path WILL NOT be processed
+ through the "forwardPattern" attribute that is configured
+ on the "controller" element for this module.
+ Exactly one of "forward", "include", or "type" must be
+ specified.
+
+ include Module-relative path of the servlet or other resource that
+ will process this request, instead of the Action class
+ specified by "type". The path WILL NOT be processed
+ through the "forwardPattern" attribute that is configured
+ on the "controller" element for this module.
+ Exactly one of "forward", "include", or "type" must be
+ specified.
+
+ input Module-relative path of the action or other resource to
+ which control should be returned if a validation error is
+ encountered. Valid only when "name" is specified. Required
+ if "name" is specified and the input bean returns
+ validation errors. Optional if "name" is specified and the
+ input bean does not return validation errors.
+
+ name Name of the form bean, if any, that is associated with this
+ action mapping.
+
+ path The module-relative path of the submitted request, starting
+ with a "/" character, and without the filename extension if
+ extension mapping is used.
+
+ NOTE: Do *not* include a period in your path name,
+ because it will look like a filename extension and
+ cause your Action to not be located.
+
+ parameter General-purpose configuration parameter that can be used to
+ pass extra information to the Action object selected by
+ this action mapping.
+
+ prefix Prefix used to match request parameter names to ActionForm
+ property names, if any. Optional if "name" is specified,
+ else not allowed.
+
+ roles Comma-delimited list of security role names that are allowed
+ access to this ActionMapping object. Since Struts 1.1.
+
+ scope The context ("request" or "session") that is used to
+ access our ActionForm bean, if any. Optional if "name" is
+ specified, else not valid.
+
+ suffix Suffix used to match request parameter names to ActionForm
+ bean property names, if any. Optional if "name" is
+ specified, else not valid.
+
+ type Fully qualified Java class name of the Action subclass
+ [org.apache.struts.action.Action] that will process requests
+ for this action mapping. Not valid if either the "forward"
+ or "include" attribute is specified. Exactly one of
+ "forward", "include", or "type" must be specified.
+
+ unknown Set to "true" if this object should be configured as the
+ default action mapping for this module. If a request does not
+ match another object, it will be passed to the ActionMapping
+ object with unknown set to "true". Only one ActionMapping
+ can be marked as "unknown" within a module.
+ [false]
+
+ validate Set to "true" if the validate method of the ActionForm bean
+ should be called prior to calling the Action object for this
+ action mapping, or set to "false" if you do not want the
+ validate method called.
+ [true]
+-->
+<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
+<!ATTLIST action id ID #IMPLIED>
+<!ATTLIST action attribute %BeanName; #IMPLIED>
+<!ATTLIST action className %ClassName; #IMPLIED>
+<!ATTLIST action forward %RequestPath; #IMPLIED>
+<!ATTLIST action include %RequestPath; #IMPLIED>
+<!ATTLIST action input %RequestPath; #IMPLIED>
+<!ATTLIST action name %BeanName; #IMPLIED>
+<!ATTLIST action parameter CDATA #IMPLIED>
+<!ATTLIST action path %RequestPath; #REQUIRED>
+<!ATTLIST action prefix CDATA #IMPLIED>
+<!ATTLIST action roles CDATA #IMPLIED>
+<!ATTLIST action scope %RequestScope; #IMPLIED>
+<!ATTLIST action suffix CDATA #IMPLIED>
+<!ATTLIST action type %ClassName; #IMPLIED>
+<!ATTLIST action unknown %Boolean; #IMPLIED>
+<!ATTLIST action validate %Boolean; #IMPLIED>
+
+
+<!-- The "controller" element describes the ControllerConfig bean
+ [org.apache.struts.config.ControllerConfig] that encapsulates
+ a module's runtime configuration. The following
+ attributes are defined:
+
+ bufferSize The size of the input buffer used when processing
+ file uploads.
+ [4096]
+
+ className Fully qualified Java class name of the
+ ControllerConfig subclass for this controller object.
+ If specified, the object must be a subclass of the
+ default class.
+ ["org.apache.struts.config.ControllerConfig"]
+
+ contentType Default content type (and optional character encoding) to
+ be set on each response. May be overridden by the Action,
+ JSP, or other resource to which the request is forwarded.
+ ["text/html"]
+
+ forwardPattern Replacement pattern defining how the "path" attribute of a
+ <forward> element is mapped to a context-relative URL when
+ it starts with a slash (and when the contextRelative
+ property is false). This value may consist of any
+ combination of the following:
+ - "$M" - Replaced by the module prefix of this module
+ - "$P" - Replaced by the "path" attribute of the selected
+ "forward" element
+ - "$$" - Causes a literal dollar sign to be rendered
+ - "$x" - (Where "x" is any character not defined above)
+ Silently swallowed, reserved for future use
+ If not specified, the default forwardPattern is "$M$P",
+ which is consistent with the previous behavior of
+ forwards. Since Struts 1.1. ["$M$P"]
+
+ inputForward Set to "true" if you want the "input" attribute of
+ <action> elements to be the name of a local or global
+ ActionForward, which will then be used to calculate the
+ ultimate URL. Set to "false" (the default) to treat the
+ "input" parameter of <action> elements as a
+ module-relative path to the resource
+ to be used as the input form. Since Struts 1.1.
+ [false]
+
+ locale Set to "true" if you want a Locale object stored in the
+ user's session if not already present.
+ [true]
+
+ maxFileSize The maximum size (in bytes) of a file to be accepted as a
+ file upload. Can be expressed as a number followed by a
+ "K", "M", or "G", which are interpreted to mean kilobytes,
+ megabytes, or gigabytes, respectively.
+ ["250M"]
+
+ memFileSize The maximum size (in bytes) of a file whose contents will
+ be retained in memory after uploading. Files larger than
+ this threshold will be written to some alternative storage
+ medium, typically a hard disk. Can be expressed as a number
+ followed by a "K", "M", or "G", which are interpreted to
+ mean kilobytes, megabytes, or gigabytes, respectively.
+ ["256K"]
+
+ multipartClass The fully qualified Java class name of the multipart
+ request handler class to be used with this module.
+ ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
+
+ nocache Set to "true" if you want the controller to add HTTP
+ headers for defeating caching to every response from
+ this module. [false]
+
+ pagePattern Replacement pattern defining how the "page" attribute of
+ custom tags using it is mapped to a context-relative URL
+ of the corresponding resource. This value may consist of
+ any combination of the following:
+ - "$M" - Replaced by the module prefix of this module
+ - "$P" - Replaced by the value of the "page" attribute
+ - "$$" - Causes a literal dollar sign to be rendered
+ - "$x" - (Where "x" is any character not defined above)
+ Silently swallowed, reserved for future use
+ If not specified, the default forwardPattern is
+ "$M$P", which is consistent with previous hard coded
+ behavior of URL evaluation for "page" attributes.
+ ["$M$P"]
+
+ processorClass The fully qualified Java class name of the
+ RequestProcessor subclass to be used with this module.
+ ["org.apache.struts.action.RequestProcessor"]
+
+ tempDir Temporary working directory to use when processing
+ file uploads.
+ [{Directory provided by servlet container}]
+-->
+<!ELEMENT controller (set-property*)>
+<!ATTLIST controller id ID #IMPLIED>
+<!ATTLIST controller bufferSize %Integer; #IMPLIED>
+<!ATTLIST controller className %ClassName; #IMPLIED>
+<!ATTLIST controller contentType CDATA #IMPLIED>
+<!ATTLIST controller forwardPattern CDATA #IMPLIED>
+<!ATTLIST controller inputForward %Boolean; #IMPLIED>
+<!ATTLIST controller locale %Boolean; #IMPLIED>
+<!ATTLIST controller maxFileSize CDATA #IMPLIED>
+<!ATTLIST controller memFileSize CDATA #IMPLIED>
+<!ATTLIST controller multipartClass %ClassName; #IMPLIED>
+<!ATTLIST controller nocache %Boolean; #IMPLIED>
+<!ATTLIST controller pagePattern CDATA #IMPLIED>
+<!ATTLIST controller processorClass %ClassName; #IMPLIED>
+<!ATTLIST controller tempDir CDATA #IMPLIED>
+
+
+<!-- The "message-resources" element describes a MessageResources object with
+ message templates for this module. The following attributes are defined:
+
+ className The configuration bean for this message resources object.
+ If specified, the object must be a subclass of the default
+ configuration bean.
+ ["org.apache.struts.config.MessageResourcesConfig"]
+
+ factory Fully qualified Java class name of the
+ MessageResourcesFactory subclass to use for this message
+ resources object.
+ ["org.apache.struts.util.PropertyMessageResourcesFactory"]
+
+ key Servlet context attribute under which this message
+ resources bundle will be stored. The default attribute is
+ the value specified by the string constant at
+ [Globals.MESSAGES_KEY]. The module prefix (if
+ any) is appended to the key (${key}${prefix}).
+ [org.apache.struts.Globals.MESSAGES_KEY]
+
+ NOTE: The module prefix includes the leading
+ slash, so the default message resource bundle for a module
+ named "foo" is stored under
+ "org.apache.struts.action.MESSAGE/foo".
+
+ null Set to "true" if you want our message resources to return a
+ null string for unknown message keys, or "false" to return a
+ message with the bad key value.
+
+ parameter Configuration parameter to be passed to the createResources
+ method of our factory object.
+-->
+<!ELEMENT message-resources (set-property*)>
+<!ATTLIST message-resources id ID #IMPLIED>
+<!ATTLIST message-resources className %ClassName; #IMPLIED>
+<!ATTLIST message-resources factory %ClassName; #IMPLIED>
+<!ATTLIST message-resources key %AttributeName; #IMPLIED>
+<!ATTLIST message-resources null %Boolean; #IMPLIED>
+<!ATTLIST message-resources parameter CDATA #REQUIRED>
+
+
+<!-- The "plug-in" element specifies the fully qualified class name of a
+ general-purpose application plug-in module that receives notification of
+ application startup and shutdown events. An instance of the specified class
+ is created for each element, and can be configured with nested <set-property>
+ elements. The following attributes are supported:
+
+ className Fully qualified Java class name of the plug-in class; must
+ implement [org.apache.struts.action.PlugIn].
+-->
+<!ELEMENT plug-in (set-property*)>
+<!ATTLIST plug-in id ID #IMPLIED>
+<!ATTLIST plug-in className %ClassName; #REQUIRED>
+
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+
+<!-- The "description" element contains descriptive (paragraph length) text
+ about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description (#PCDATA)>
+<!ATTLIST description id ID #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+ the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name id ID #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+ specify the location, relative to the Struts configuration file, for small
+ and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon (small-icon?, large-icon?)>
+<!ATTLIST icon id ID #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+ configuration file, of a resource containing a large (32x32 pixel)
+ icon image.
+-->
+<!ELEMENT large-icon (%Location;)>
+<!ATTLIST large-icon id ID #IMPLIED>
+
+
+<!-- The "set-property" element specifies the method name and initial value of
+ an additional JavaBean configuration property. When the object representing
+ the surrounding element is instantiated, the accessor for the indicated
+ property is called and passed the indicated value. The "set-property"
+ element is especially useful when a custom subclass is used with
+ <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
+ can be passed whatever other properties may be required to configure the
+ object without changing how the struts-config is parsed.
+
+ property Name of the JavaBeans property whose setter method
+ will be called.
+
+ value String representation of the value to which this
+ property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property EMPTY>
+<!ATTLIST set-property id ID #IMPLIED>
+<!ATTLIST set-property property %PropName; #REQUIRED>
+<!ATTLIST set-property value CDATA #REQUIRED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+ configuration file, of a resource containing a small (16x16 pixel)
+ icon image.
+-->
+<!ELEMENT small-icon (%Location;)>
+<!ATTLIST small-icon id ID #IMPLIED>
+
Modified: incubator/beehive/trunk/netui/external/struts/struts-html.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-html.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-html.tld&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-html.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-html.tld (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-html.tld Thu Dec 16 02:21:16 2004
@@ -8,10 +8,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>html</shortname>
-<uri>http://jakarta.apache.org/struts/tags-html</uri>
+<uri>http://struts.apache.org/tags-html</uri>
<tag>
<name>base</name>
<tagclass>org.apache.struts.taglib.html.BaseTag</tagclass>
@@ -618,27 +618,27 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>enctype</name>
+<name>acceptCharset</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>focus</name>
+<name>enctype</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>focusIndex</name>
+<name>focus</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>method</name>
+<name>focusIndex</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>name</name>
+<name>method</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@@ -653,7 +653,7 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>scope</name>
+<name>scriptLanguage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@@ -677,11 +677,6 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
-<attribute>
-<name>type</name>
-<required>false</required>
-<rtexprvalue>true</rtexprvalue>
-</attribute>
</tag>
<tag>
<name>frame</name>
@@ -692,6 +687,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -832,6 +832,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>disabled</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>indexed</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -952,6 +957,11 @@
<tagclass>org.apache.struts.taglib.html.HtmlTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
+<name>lang</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>locale</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1166,6 +1176,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>contextRelative</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>height</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1266,6 +1281,16 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>paramName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1326,6 +1351,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>useLocalEncoding</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>usemap</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1371,6 +1401,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>scriptLanguage</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>src</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1400,6 +1435,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1569,6 +1609,11 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
+<attribute>
+<name>useLocalEncoding</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
</tag>
<tag>
<name>messages</name>
@@ -2316,6 +2361,16 @@
<tagclass>org.apache.struts.taglib.html.RewriteTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -2372,6 +2427,11 @@
</attribute>
<attribute>
<name>transaction</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>useLocalEncoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Modified: incubator/beehive/trunk/netui/external/struts/struts-logic.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-logic.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-logic.tld&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-logic.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-logic.tld (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-logic.tld Thu Dec 16 02:21:16 2004
@@ -7,10 +7,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>logic</shortname>
-<uri>http://jakarta.apache.org/struts/tags-logic</uri>
+<uri>http://struts.apache.org/tags-logic</uri>
<tag>
<name>empty</name>
<tagclass>org.apache.struts.taglib.logic.EmptyTag</tagclass>
@@ -576,6 +576,11 @@
<name>redirect</name>
<tagclass>org.apache.struts.taglib.logic.RedirectTag</tagclass>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -632,6 +637,11 @@
</attribute>
<attribute>
<name>transaction</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>useLocalEncoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Modified: incubator/beehive/trunk/netui/external/struts/struts-nested.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-nested.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-nested.tld&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-nested.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-nested.tld (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-nested.tld Thu Dec 16 02:21:16 2004
@@ -7,10 +7,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>nested</shortname>
-<uri>http://jakarta.apache.org/struts/tags-nested</uri>
+<uri>http://struts.apache.org/tags-nested</uri>
<tag>
<name>nest</name>
<tagclass>org.apache.struts.taglib.nested.NestedPropertyTag</tagclass>
@@ -24,6 +24,7 @@
<tag>
<name>writeNesting</name>
<tagclass>org.apache.struts.taglib.nested.NestedWriteNestingTag</tagclass>
+<teiclass>org.apache.struts.taglib.nested.NestedWriteNestingTei</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>property</name>
@@ -31,6 +32,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>id</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>filter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -571,11 +577,6 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>name</name>
-<required>false</required>
-<rtexprvalue>true</rtexprvalue>
-</attribute>
-<attribute>
<name>onreset</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -586,11 +587,6 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>scope</name>
-<required>false</required>
-<rtexprvalue>true</rtexprvalue>
-</attribute>
-<attribute>
<name>style</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -610,11 +606,6 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
-<attribute>
-<name>type</name>
-<required>false</required>
-<rtexprvalue>true</rtexprvalue>
-</attribute>
</tag>
<tag>
<name>hidden</name>
@@ -655,10 +646,25 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>styleClass</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>styleId</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
+<attribute>
+<name>write</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
</tag>
<tag>
<name>image</name>
@@ -1378,6 +1384,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>filter</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>labelName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1412,6 +1423,11 @@
<name>optionsCollection</name>
<tagclass>org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag</tagclass>
<bodycontent>empty</bodycontent>
+<attribute>
+<name>filter</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
<attribute>
<name>label</name>
<required>false</required>
Deleted: /incubator/beehive/trunk/netui/external/struts/struts-template.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-template.tld?view=auto&rev=122539
==============================================================================
Modified: incubator/beehive/trunk/netui/external/struts/struts-tiles.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts-tiles.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts-tiles.tld&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts-tiles.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/struts-tiles.tld (original)
+++ incubator/beehive/trunk/netui/external/struts/struts-tiles.tld Thu Dec 16 02:21:16 2004
@@ -8,10 +8,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>tiles</shortname>
-<uri>http://jakarta.apache.org/struts/tags-tiles</uri>
+<uri>http://struts.apache.org/tags-tiles</uri>
<tag>
<name>insert</name>
<tagclass>org.apache.struts.taglib.tiles.InsertTag</tagclass>
Modified: incubator/beehive/trunk/netui/external/struts/struts.jar
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/struts.jar?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/struts.jar&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/struts.jar&r2=122540
==============================================================================
Binary files. No diff available.
Deleted: /incubator/beehive/trunk/netui/external/struts/tiles-config.dtd
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/tiles-config.dtd?view=auto&rev=122539
==============================================================================
Modified: incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd (original)
+++ incubator/beehive/trunk/netui/external/struts/tiles-config_1_1.dtd Thu Dec 16 02:21:16 2004
@@ -6,9 +6,9 @@
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+ "http://struts.apache.org/dtds/tiles-config_1_1.dtd">
- $Id: tiles-config_1_1.dtd,v 1.6 2003/05/03 16:19:56 jholmes Exp $
+ $Id: tiles-config_1_1.dtd,v 1.8 2004/09/01 10:41:11 niallp Exp $
-->
@@ -31,7 +31,7 @@
-->
<!ENTITY % ClassName "CDATA">
-<!-- A "RequestPath" is an application-relative URI path, beginning with a
+<!-- A "RequestPath" is an module-relative URI path, beginning with a
slash, that identifies a mapped resource (such as a JSP page or a servlet)
within this web application.
-->
Modified: incubator/beehive/trunk/netui/external/struts/validator-rules.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/validator-rules.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/validator-rules.xml&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/validator-rules.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/validator-rules.xml (original)
+++ incubator/beehive/trunk/netui/external/struts/validator-rules.xml Thu Dec 16 02:21:16 2004
@@ -1,7 +1,10 @@
<!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
+ "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
+ "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<!--
+ $Header: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v 1.52 2004/07/25 12:00:20 niallp Exp $
+ $Revision: 1.52 $
+ $Date: 2004/07/25 12:00:20 $
This file contains the default Struts Validator pluggable validator
definitions. It should be placed somewhere under /WEB-INF and
@@ -37,6 +40,11 @@
errors.creditcard={0} is an invalid credit card number.
errors.email={0} is an invalid e-mail address.
+ Note: Starting in Struts 1.2.0 the default javascript definitions have
+ been consolidated to commons-validator. The default can be overridden
+ by supplying a <javascript> element with a CDATA section, just as
+ in struts 1.1.
+
-->
<form-validation>
@@ -49,64 +57,9 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
- msg="errors.required">
-
- <javascript><![CDATA[
- function validateRequired(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRequired = new required();
- for (x in oRequired) {
- var field = form[oRequired[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'file' ||
- field.type == 'select-one' ||
- field.type == 'radio' ||
- field.type == 'password') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (trim(value).length == 0) {
-
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRequired[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- // Trim whitespace from left and right sides of s.
- function trim(s) {
- return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
- }
-
- ]]>
- </javascript>
-
- </validator>
+ msg="errors.required"/>
<validator name="requiredif"
classname="org.apache.struts.validator.FieldChecks"
@@ -114,11 +67,22 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
org.apache.commons.validator.Validator,
javax.servlet.http.HttpServletRequest"
- msg="errors.required">
- </validator>
+ msg="errors.required"/>
+
+ <validator name="validwhen"
+ msg="errors.required"
+ classname="org.apache.struts.validator.validwhen.ValidWhen"
+ method="validateValidWhen"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ org.apache.commons.validator.Validator,
+ javax.servlet.http.HttpServletRequest"/>
+
<validator name="minlength"
classname="org.apache.struts.validator.FieldChecks"
@@ -126,43 +90,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
- msg="errors.minlength">
-
- <javascript><![CDATA[
- function validateMinLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMinLength = new minlength();
- for (x in oMinLength) {
- var field = form[oMinLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMin = parseInt(oMinLength[x][2]("minlength"));
- if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMinLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
+ msg="errors.minlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMinLength"/>
<validator name="maxlength"
@@ -171,43 +103,12 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
- msg="errors.maxlength">
-
- <javascript><![CDATA[
- function validateMaxLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMaxLength = new maxlength();
- for (x in oMaxLength) {
- var field = form[oMaxLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMax = parseInt(oMaxLength[x][2]("maxlength"));
- if (field.value.length > iMax) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMaxLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
+ msg="errors.maxlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMaxLength"/>
- </validator>
<validator name="mask"
@@ -216,48 +117,10 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
- msg="errors.invalid">
-
- <javascript><![CDATA[
- function validateMask(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMasked = new mask();
- for (x in oMasked) {
- var field = form[oMasked[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMasked[x][1];
- isValid = false;
- }
- }
- }
-
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- function matchPattern(value, mask) {
- return mask.exec(value);
- }]]>
- </javascript>
-
- </validator>
+ msg="errors.invalid"/>
<validator name="byte"
@@ -266,70 +129,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.byte"
- jsFunctionName="ByteValidations">
-
- <javascript><![CDATA[
- function validateByte(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oByte = new ByteValidations();
- for (x in oByte) {
- var field = form[oByte[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
- bValid = false;
- }
- }
- }
-
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
+ jsFunctionName="ByteValidations"/>
<validator name="short"
@@ -338,69 +142,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.short"
- jsFunctionName="ShortValidations">
-
- <javascript><![CDATA[
- function validateShort(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oShort = new ShortValidations();
- for (x in oShort) {
- var field = form[oShort[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
+ jsFunctionName="ShortValidations"/>
<validator name="integer"
@@ -409,89 +155,12 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.integer"
- jsFunctionName="IntegerValidations">
+ jsFunctionName="IntegerValidations"/>
- <javascript><![CDATA[
- function validateInteger(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oInteger = new IntegerValidations();
- for (x in oInteger) {
- var field = form[oInteger[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
-
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
-
- } else {
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isAllDigits(argvalue) {
- argvalue = argvalue.toString();
- var validChars = "0123456789";
- var startFrom = 0;
- if (argvalue.substring(0, 2) == "0x") {
- validChars = "0123456789abcdefABCDEF";
- startFrom = 2;
- } else if (argvalue.charAt(0) == "0") {
- validChars = "01234567";
- startFrom = 1;
- } else if (argvalue.charAt(0) == "-") {
- startFrom = 1;
- }
-
- for (var n = startFrom; n < argvalue.length; n++) {
- if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
<validator name="long"
@@ -500,7 +169,7 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.long"/>
@@ -512,73 +181,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.float"
- jsFunctionName="FloatValidations">
-
- <javascript><![CDATA[
- function validateFloat(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oFloat = new FloatValidations();
- for (x in oFloat) {
- var field = form[oFloat[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- // remove '.' before checking digits
- var tempArray = value.split('.');
- var joinedString= tempArray.join('');
-
- if (!isAllDigits(joinedString)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
-
- } else {
- var iValue = parseFloat(value);
- if (isNaN(iValue)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
+ jsFunctionName="FloatValidations"/>
<validator name="double"
classname="org.apache.struts.validator.FieldChecks"
@@ -586,7 +193,7 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.double"/>
@@ -598,181 +205,12 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.date"
- jsFunctionName="DateValidations">
-
- <javascript><![CDATA[
- function validateDate(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oDate = new DateValidations();
- for (x in oDate) {
- var value = form[oDate[x][0]].value;
- var datePattern = oDate[x][2]("datePatternStrict");
- if ((form[oDate[x][0]].type == 'text' ||
- form[oDate[x][0]].type == 'textarea') &&
- (value.length > 0) &&
- (datePattern.length > 0)) {
- var MONTH = "MM";
- var DAY = "dd";
- var YEAR = "yyyy";
- var orderMonth = datePattern.indexOf(MONTH);
- var orderDay = datePattern.indexOf(DAY);
- var orderYear = datePattern.indexOf(YEAR);
- if ((orderDay < orderYear && orderDay > orderMonth)) {
- var iDelim1 = orderMonth + MONTH.length;
- var iDelim2 = orderDay + DAY.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderDay && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderDay) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[2], matched[1], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
- var iDelim1 = orderDay + DAY.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[1], matched[2], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
- var iDelim1 = orderYear + YEAR.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
- } else if (iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
- } else {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[3], matched[2], matched[1])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isValidDate(day, month, year) {
- if (month < 1 || month > 12) {
- return false;
- }
- if (day < 1 || day > 31) {
- return false;
- }
- if ((month == 4 || month == 6 || month == 9 || month == 11) &&
- (day == 31)) {
- return false;
- }
- if (month == 2) {
- var leap = (year % 4 == 0 &&
- (year % 100 != 0 || year % 400 == 0));
- if (day>29 || (day == 29 && !leap)) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
+ jsFunctionName="DateValidations"/>
- </validator>
-
-<!-- range is deprecated use intRange instead -->
- <validator name="range"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateIntRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateRange(form) {
- return validateIntRange(form);
- }]]>
- </javascript>
-
- </validator>
<validator name="intRange"
classname="org.apache.struts.validator.FieldChecks"
@@ -780,46 +218,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateIntRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new intRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var iMin = parseInt(oRange[x][2]("min"));
- var iMax = parseInt(oRange[x][2]("max"));
- var iValue = parseInt(field.value);
- if (!(iValue >= iMin && iValue <= iMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
+ msg="errors.range"/>
- </validator>
<validator name="floatRange"
classname="org.apache.struts.validator.FieldChecks"
@@ -827,46 +230,11 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends="float"
- msg="errors.range">
+ msg="errors.range"/>
- <javascript><![CDATA[
- function validateFloatRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new floatRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var fMin = parseFloat(oRange[x][2]("min"));
- var fMax = parseFloat(oRange[x][2]("max"));
- var fValue = parseFloat(field.value);
- if (!(fValue >= fMin && fValue <= fMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
<validator name="creditCard"
classname="org.apache.struts.validator.FieldChecks"
@@ -874,76 +242,10 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
- msg="errors.creditcard">
-
- <javascript><![CDATA[
- function validateCreditCard(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oCreditCard = new creditCard();
- for (x in oCreditCard) {
- if ((form[oCreditCard[x][0]].type == 'text' ||
- form[oCreditCard[x][0]].type == 'textarea') &&
- (form[oCreditCard[x][0]].value.length > 0)) {
- if (!luhnCheck(form[oCreditCard[x][0]].value)) {
- if (i == 0) {
- focusField = form[oCreditCard[x][0]];
- }
- fields[i++] = oCreditCard[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
- */
- function luhnCheck(cardNumber) {
- if (isLuhnNum(cardNumber)) {
- var no_digit = cardNumber.length;
- var oddoeven = no_digit & 1;
- var sum = 0;
- for (var count = 0; count < no_digit; count++) {
- var digit = parseInt(cardNumber.charAt(count));
- if (!((count & 1) ^ oddoeven)) {
- digit *= 2;
- if (digit > 9) digit -= 9;
- };
- sum += digit;
- };
- if (sum == 0) return false;
- if (sum % 10 == 0) return true;
- };
- return false;
- }
-
- function isLuhnNum(argvalue) {
- argvalue = argvalue.toString();
- if (argvalue.length == 0) {
- return false;
- }
- for (var n = 0; n < argvalue.length; n++) {
- if ((argvalue.substring(n, n+1) < "0") ||
- (argvalue.substring(n,n+1) > "9")) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
+ msg="errors.creditcard"/>
<validator name="email"
@@ -952,92 +254,33 @@
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
- msg="errors.email">
+ msg="errors.email"/>
- <javascript><![CDATA[
- function validateEmail(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oEmail = new email();
- for (x in oEmail) {
- if ((form[oEmail[x][0]].type == 'text' ||
- form[oEmail[x][0]].type == 'textarea') &&
- (form[oEmail[x][0]].value.length > 0)) {
- if (!checkEmail(form[oEmail[x][0]].value)) {
- if (i == 0) {
- focusField = form[oEmail[x][0]];
- }
- fields[i++] = oEmail[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
- * http://javascript.internet.com
- */
- function checkEmail(emailStr) {
- if (emailStr.length == 0) {
- return true;
- }
- var emailPat=/^(.+)@(.+)$/;
- var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
- var validChars="\[^\\s" + specialChars + "\]";
- var quotedUser="(\"[^\"]*\")";
- var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
- var atom=validChars + '+';
- var word="(" + atom + "|" + quotedUser + ")";
- var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
- var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
- var matchArray=emailStr.match(emailPat);
- if (matchArray == null) {
- return false;
- }
- var user=matchArray[1];
- var domain=matchArray[2];
- if (user.match(userPat) == null) {
- return false;
- }
- var IPArray = domain.match(ipDomainPat);
- if (IPArray != null) {
- for (var i = 1; i <= 4; i++) {
- if (IPArray[i] > 255) {
- return false;
- }
- }
- return true;
- }
- var domainArray=domain.match(domainPat);
- if (domainArray == null) {
- return false;
- }
- var atomPat=new RegExp(atom,"g");
- var domArr=domain.match(atomPat);
- var len=domArr.length;
- if ((domArr[domArr.length-1].length < 2) ||
- (domArr[domArr.length-1].length > 3)) {
- return false;
- }
- if (len < 2) {
- return false;
- }
- return true;
- }]]>
- </javascript>
+ <validator name="url"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateUrl"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.url"/>
- </validator>
+ <!--
+ This simply allows struts to include the validateUtilities into a page, it should
+ not be used as a validation rule.
+ -->
+ <validator name="includeJavaScriptUtilities"
+ classname=""
+ method=""
+ methodParams=""
+ depends=""
+ msg=""
+ jsFunction="org.apache.commons.validator.javascript.validateUtilities"/>
</global>
Modified: incubator/beehive/trunk/netui/external/struts/version.txt
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/external/struts/version.txt?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/external/struts/version.txt&r1=122539&p2=incubator/beehive/trunk/netui/external/struts/version.txt&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/external/struts/version.txt (original)
+++ incubator/beehive/trunk/netui/external/struts/version.txt Thu Dec 16 02:21:16 2004
@@ -1,3 +1,3 @@
-Struts 1.1
+Struts 1.2.4
-Downloaded: 7/17/2003 4:00 PM
+Downloaded: 2004-10-29
Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java&r1=122539&p2=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java Thu Dec 16 02:21:16 2004
@@ -82,7 +82,8 @@
protected static final String STRUTSCONFIG_OUTPUT_DIR = '/' + WEBINF_DIR_NAME + "/.pageflow-struts-generated";
protected static final String VALIDATOR_PLUG_IN_CLASSNAME = "org.apache.struts.validator.ValidatorPlugIn";
protected static final String VALIDATOR_PATHNAMES_PROPERTY = "pathnames";
- protected static final String DEFAULT_VALIDATOR_RULES_URI = '/' + WEBINF_DIR_NAME + "/netui-validator-rules.xml";
+ protected static final String NETUI_VALIDATOR_RULES_URI = '/' + WEBINF_DIR_NAME + "/netui-validator-rules.xml";
+ protected static final String STRUTS_VALIDATOR_RULES_URI = '/' + WEBINF_DIR_NAME + "/validator-rules.xml";
public StrutsApp( String controllerClassName )
@@ -766,7 +767,11 @@
SetPropertyDocument.SetProperty pathnamesProperty = plugInElementToEdit.addNewSetProperty();
pathnamesProperty.setProperty( VALIDATOR_PATHNAMES_PROPERTY );
- pathnamesProperty.setValue( DEFAULT_VALIDATOR_RULES_URI + ',' + _validationModel.getOutputFileURI() );
+ StringBuilder pathNames = new StringBuilder();
+ pathNames.append( NETUI_VALIDATOR_RULES_URI ).append( ',' );
+ pathNames.append( STRUTS_VALIDATOR_RULES_URI ).append( ',' );
+ pathNames.append( _validationModel.getOutputFileURI() );
+ pathnamesProperty.setValue( pathNames.toString() );
}
}
Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java&r1=122539&p2=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java Thu Dec 16 02:21:16 2004
@@ -35,7 +35,6 @@
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
-import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.config.ActionConfig;
import org.apache.struts.config.ModuleConfig;
@@ -1686,7 +1685,7 @@
* @param errors Error messages object
*/
protected void saveErrors( HttpServletRequest request,
- ActionErrors errors )
+ ActionMessages errors )
{
// Remove any error messages attribute if none are required
Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java&r1=122539&p2=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Validatable.java Thu Dec 16 02:21:16 2004
@@ -17,7 +17,7 @@
*/
package org.apache.beehive.netui.pageflow;
-import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
@@ -29,5 +29,5 @@
*/
public interface Validatable
{
- public void validate( ActionMapping mapping, HttpServletRequest request, ActionErrors errors );
+ public void validate( ActionMapping mapping, HttpServletRequest request, ActionMessages errors );
}
Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java&r1=122539&p2=incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/validation/ValidatorRules.java Thu Dec 16 02:21:16 2004
@@ -21,7 +21,7 @@
import org.apache.commons.validator.Field;
import org.apache.commons.validator.ValidatorUtil;
import org.apache.commons.validator.GenericValidator;
-import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMessages;
import org.apache.struts.validator.Resources;
import org.apache.struts.validator.FieldChecks;
import org.apache.beehive.netui.pageflow.internal.InternalExpressionUtils;
@@ -32,7 +32,7 @@
public class ValidatorRules
extends FieldChecks
{
- public static boolean validateValidWhen( Object bean, ValidatorAction va, Field field, ActionErrors errors,
+ public static boolean validateValidWhen( Object bean, ValidatorAction va, Field field, ActionMessages errors,
HttpServletRequest request, ServletContext servletContext )
{
Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java&r1=122539&p2=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java (original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java Thu Dec 16 02:21:16 2004
@@ -19,6 +19,7 @@
import org.apache.beehive.netui.util.Bundle;
import org.apache.struts.Globals;
+import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.util.RequestUtils;
@@ -147,7 +148,7 @@
reports = errors.get(_value);
while (reports.hasNext()) {
- ActionError report = (ActionError) reports.next();
+ ActionMessage report = (ActionMessage) reports.next();
if (prefixPresent) {
message = RequestUtils.message(pageContext, qualifiedBundle, locale, "error.prefix");
results.append(message);
Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java&r1=122539&p2=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java (original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java Thu Dec 16 02:21:16 2004
@@ -25,7 +25,7 @@
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.logging.Logger;
import org.apache.struts.Globals;
-import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.config.ControllerConfig;
import org.apache.struts.config.ModuleConfig;
@@ -113,7 +113,7 @@
* @return message
* @throws JspException
*/
- protected String getErrorMessage(ActionError report, String bundle)
+ protected String getErrorMessage(ActionMessage report, String bundle)
throws JspException
{
String message = null;
Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java&r1=122539&p2=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java (original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java Thu Dec 16 02:21:16 2004
@@ -19,6 +19,7 @@
import org.apache.beehive.netui.util.Bundle;
import org.apache.struts.Globals;
+import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.util.RequestUtils;
@@ -140,7 +141,7 @@
reports = errors.get();
while (reports.hasNext()) {
- ActionError report = (ActionError) reports.next();
+ ActionMessage report = (ActionMessage) reports.next();
if (!headerDone) {
if (headerPresent) {
message = RequestUtils.message(pageContext, qualifiedBundle, locale, "errors.header");
Modified: incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml&r1=122539&p2=incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml (original)
+++ incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/netui-validator-rules.xml Thu Dec 16 02:21:16 2004
@@ -2,1052 +2,24 @@
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
<!--
-
- This file contains the default Struts Validator pluggable validator
- definitions. It should be placed somewhere under /WEB-INF and
- referenced in the struts-config.xml under the plug-in element
- for the ValidatorPlugIn.
-
- <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
- <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
- /WEB-INF/validation.xml"/>
- </plug-in>
-
- These are the default error messages associated with
- each validator defined in this file. They should be
- added to your projects ApplicationResources.properties
- file or you can associate new ones by modifying the
- pluggable validators msg attributes in this file.
-
- # Struts Validator Error Messages
- errors.required={0} is required.
- errors.minlength={0} can not be less than {1} characters.
- errors.maxlength={0} can not be greater than {1} characters.
- errors.invalid={0} is invalid.
-
- errors.byte={0} must be a byte.
- errors.short={0} must be a short.
- errors.integer={0} must be an integer.
- errors.long={0} must be a long.
- errors.float={0} must be a float.
- errors.double={0} must be a double.
-
- errors.date={0} is not a date.
- errors.range={0} is not in the range {1} through {2}.
- errors.creditcard={0} is an invalid credit card number.
- errors.email={0} is an invalid e-mail address.
-
+ This file contains the default NetUI validator definitions. It should be
+ placed in /WEB-INF, and is automatically referenced in Struts config files
+ generated by the Page Flow compiler.
-->
<form-validation>
<global>
- <validator name="required"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateRequired"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- msg="errors.required">
-
- <javascript><![CDATA[
- function validateRequired(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRequired = new required();
- for (x in oRequired) {
- var field = form[oRequired[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'file' ||
- field.type == 'select-one' ||
- field.type == 'radio' ||
- field.type == 'password') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (trim(value).length == 0) {
-
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRequired[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- // Trim whitespace from left and right sides of s.
- function trim(s) {
- return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
- }
-
- ]]>
- </javascript>
-
- </validator>
-
- <validator name="requiredif"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateRequiredIf"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- org.apache.commons.validator.Validator,
- javax.servlet.http.HttpServletRequest"
- msg="errors.required">
- </validator>
-
- <validator name="minlength"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMinLength"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.minlength">
-
- <javascript><![CDATA[
- function validateMinLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMinLength = new minlength();
- for (x in oMinLength) {
- var field = form[oMinLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMin = parseInt(oMinLength[x][2]("minlength"));
- if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMinLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="maxlength"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMaxLength"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.maxlength">
-
- <javascript><![CDATA[
- function validateMaxLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMaxLength = new maxlength();
- for (x in oMaxLength) {
- var field = form[oMaxLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMax = parseInt(oMaxLength[x][2]("maxlength"));
- if (field.value.length > iMax) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMaxLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="mask"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMask"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.invalid">
-
- <javascript><![CDATA[
- function validateMask(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMasked = new mask();
- for (x in oMasked) {
- var field = form[oMasked[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMasked[x][1];
- isValid = false;
- }
- }
- }
-
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- function matchPattern(value, mask) {
- return mask.exec(value);
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="byte"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateByte"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.byte"
- jsFunctionName="ByteValidations">
-
- <javascript><![CDATA[
- function validateByte(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oByte = new ByteValidations();
- for (x in oByte) {
- var field = form[oByte[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
- bValid = false;
- }
- }
- }
-
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="short"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateShort"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.short"
- jsFunctionName="ShortValidations">
-
- <javascript><![CDATA[
- function validateShort(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oShort = new ShortValidations();
- for (x in oShort) {
- var field = form[oShort[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="integer"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateInteger"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.integer"
- jsFunctionName="IntegerValidations">
-
- <javascript><![CDATA[
- function validateInteger(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oInteger = new IntegerValidations();
- for (x in oInteger) {
- var field = form[oInteger[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
-
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
-
- } else {
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isAllDigits(argvalue) {
- argvalue = argvalue.toString();
- var validChars = "0123456789";
- var startFrom = 0;
- if (argvalue.substring(0, 2) == "0x") {
- validChars = "0123456789abcdefABCDEF";
- startFrom = 2;
- } else if (argvalue.charAt(0) == "0") {
- validChars = "01234567";
- startFrom = 1;
- } else if (argvalue.charAt(0) == "-") {
- startFrom = 1;
- }
-
- for (var n = startFrom; n < argvalue.length; n++) {
- if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="long"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateLong"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.long"/>
-
-
- <validator name="float"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateFloat"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.float"
- jsFunctionName="FloatValidations">
-
- <javascript><![CDATA[
- function validateFloat(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oFloat = new FloatValidations();
- for (x in oFloat) {
- var field = form[oFloat[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- // remove '.' before checking digits
- var tempArray = value.split('.');
- var joinedString= tempArray.join('');
-
- if (!isAllDigits(joinedString)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
-
- } else {
- var iValue = parseFloat(value);
- if (isNaN(iValue)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="double"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateDouble"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.double"/>
-
-
- <validator name="date"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateDate"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.date"
- jsFunctionName="DateValidations">
-
- <javascript><![CDATA[
- function validateDate(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oDate = new DateValidations();
- for (x in oDate) {
- var value = form[oDate[x][0]].value;
- var datePattern = oDate[x][2]("datePatternStrict");
- if ((form[oDate[x][0]].type == 'text' ||
- form[oDate[x][0]].type == 'textarea') &&
- (value.length > 0) &&
- (datePattern.length > 0)) {
- var MONTH = "MM";
- var DAY = "dd";
- var YEAR = "yyyy";
- var orderMonth = datePattern.indexOf(MONTH);
- var orderDay = datePattern.indexOf(DAY);
- var orderYear = datePattern.indexOf(YEAR);
- if ((orderDay < orderYear && orderDay > orderMonth)) {
- var iDelim1 = orderMonth + MONTH.length;
- var iDelim2 = orderDay + DAY.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderDay && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderDay) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[2], matched[1], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
- var iDelim1 = orderDay + DAY.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[1], matched[2], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
- var iDelim1 = orderYear + YEAR.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
- } else if (iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
- } else {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[3], matched[2], matched[1])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isValidDate(day, month, year) {
- if (month < 1 || month > 12) {
- return false;
- }
- if (day < 1 || day > 31) {
- return false;
- }
- if ((month == 4 || month == 6 || month == 9 || month == 11) &&
- (day == 31)) {
- return false;
- }
- if (month == 2) {
- var leap = (year % 4 == 0 &&
- (year % 100 != 0 || year % 400 == 0));
- if (day>29 || (day == 29 && !leap)) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-<!-- range is deprecated use intRange instead -->
- <validator name="range"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateIntRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateRange(form) {
- return validateIntRange(form);
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="intRange"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateIntRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateIntRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new intRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var iMin = parseInt(oRange[x][2]("min"));
- var iMax = parseInt(oRange[x][2]("max"));
- var iValue = parseInt(field.value);
- if (!(iValue >= iMin && iValue <= iMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="floatRange"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateFloatRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="float"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateFloatRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new floatRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var fMin = parseFloat(oRange[x][2]("min"));
- var fMax = parseFloat(oRange[x][2]("max"));
- var fValue = parseFloat(field.value);
- if (!(fValue >= fMin && fValue <= fMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="creditCard"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateCreditCard"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.creditcard">
-
- <javascript><![CDATA[
- function validateCreditCard(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oCreditCard = new creditCard();
- for (x in oCreditCard) {
- if ((form[oCreditCard[x][0]].type == 'text' ||
- form[oCreditCard[x][0]].type == 'textarea') &&
- (form[oCreditCard[x][0]].value.length > 0)) {
- if (!luhnCheck(form[oCreditCard[x][0]].value)) {
- if (i == 0) {
- focusField = form[oCreditCard[x][0]];
- }
- fields[i++] = oCreditCard[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
- */
- function luhnCheck(cardNumber) {
- if (isLuhnNum(cardNumber)) {
- var no_digit = cardNumber.length;
- var oddoeven = no_digit & 1;
- var sum = 0;
- for (var count = 0; count < no_digit; count++) {
- var digit = parseInt(cardNumber.charAt(count));
- if (!((count & 1) ^ oddoeven)) {
- digit *= 2;
- if (digit > 9) digit -= 9;
- };
- sum += digit;
- };
- if (sum == 0) return false;
- if (sum % 10 == 0) return true;
- };
- return false;
- }
-
- function isLuhnNum(argvalue) {
- argvalue = argvalue.toString();
- if (argvalue.length == 0) {
- return false;
- }
- for (var n = 0; n < argvalue.length; n++) {
- if ((argvalue.substring(n, n+1) < "0") ||
- (argvalue.substring(n,n+1) > "9")) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="email"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateEmail"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.email">
-
- <javascript><![CDATA[
- function validateEmail(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oEmail = new email();
- for (x in oEmail) {
- if ((form[oEmail[x][0]].type == 'text' ||
- form[oEmail[x][0]].type == 'textarea') &&
- (form[oEmail[x][0]].value.length > 0)) {
- if (!checkEmail(form[oEmail[x][0]].value)) {
- if (i == 0) {
- focusField = form[oEmail[x][0]];
- }
- fields[i++] = oEmail[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
- * http://javascript.internet.com
- */
- function checkEmail(emailStr) {
- if (emailStr.length == 0) {
- return true;
- }
- var emailPat=/^(.+)@(.+)$/;
- var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
- var validChars="\[^\\s" + specialChars + "\]";
- var quotedUser="(\"[^\"]*\")";
- var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
- var atom=validChars + '+';
- var word="(" + atom + "|" + quotedUser + ")";
- var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
- var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
- var matchArray=emailStr.match(emailPat);
- if (matchArray == null) {
- return false;
- }
- var user=matchArray[1];
- var domain=matchArray[2];
- if (user.match(userPat) == null) {
- return false;
- }
- var IPArray = domain.match(ipDomainPat);
- if (IPArray != null) {
- for (var i = 1; i <= 4; i++) {
- if (IPArray[i] > 255) {
- return false;
- }
- }
- return true;
- }
- var domainArray=domain.match(domainPat);
- if (domainArray == null) {
- return false;
- }
- var atomPat=new RegExp(atom,"g");
- var domArr=domain.match(atomPat);
- var len=domArr.length;
- if ((domArr[domArr.length-1].length < 2) ||
- (domArr[domArr.length-1].length > 3)) {
- return false;
- }
- if (len < 2) {
- return false;
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
<validator name="netui_validwhen"
classname="org.apache.beehive.netui.pageflow.validation.ValidatorRules"
method="validateValidWhen"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest,
- javax.servlet.ServletContext" >
+ javax.servlet.ServletContext">
</validator>
</global>
Added: incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/validator-rules.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/validator-rules.xml?view=auto&rev=122540
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/validator-rules.xml Thu Dec 16 02:21:16 2004
@@ -0,0 +1,287 @@
+<!DOCTYPE form-validation PUBLIC
+ "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
+ "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
+<!--
+ $Header: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v 1.52 2004/07/25 12:00:20 niallp Exp $
+ $Revision: 1.52 $
+ $Date: 2004/07/25 12:00:20 $
+
+ This file contains the default Struts Validator pluggable validator
+ definitions. It should be placed somewhere under /WEB-INF and
+ referenced in the struts-config.xml under the plug-in element
+ for the ValidatorPlugIn.
+
+ <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
+ <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
+ /WEB-INF/validation.xml"/>
+ </plug-in>
+
+ These are the default error messages associated with
+ each validator defined in this file. They should be
+ added to your projects ApplicationResources.properties
+ file or you can associate new ones by modifying the
+ pluggable validators msg attributes in this file.
+
+ # Struts Validator Error Messages
+ errors.required={0} is required.
+ errors.minlength={0} can not be less than {1} characters.
+ errors.maxlength={0} can not be greater than {1} characters.
+ errors.invalid={0} is invalid.
+
+ errors.byte={0} must be a byte.
+ errors.short={0} must be a short.
+ errors.integer={0} must be an integer.
+ errors.long={0} must be a long.
+ errors.float={0} must be a float.
+ errors.double={0} must be a double.
+
+ errors.date={0} is not a date.
+ errors.range={0} is not in the range {1} through {2}.
+ errors.creditcard={0} is an invalid credit card number.
+ errors.email={0} is an invalid e-mail address.
+
+ Note: Starting in Struts 1.2.0 the default javascript definitions have
+ been consolidated to commons-validator. The default can be overridden
+ by supplying a <javascript> element with a CDATA section, just as
+ in struts 1.1.
+
+-->
+
+<form-validation>
+
+ <global>
+
+ <validator name="required"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateRequired"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ msg="errors.required"/>
+
+ <validator name="requiredif"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateRequiredIf"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ org.apache.commons.validator.Validator,
+ javax.servlet.http.HttpServletRequest"
+ msg="errors.required"/>
+
+ <validator name="validwhen"
+ msg="errors.required"
+ classname="org.apache.struts.validator.validwhen.ValidWhen"
+ method="validateValidWhen"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ org.apache.commons.validator.Validator,
+ javax.servlet.http.HttpServletRequest"/>
+
+
+ <validator name="minlength"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMinLength"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.minlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMinLength"/>
+
+
+ <validator name="maxlength"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMaxLength"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.maxlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMaxLength"/>
+
+
+
+ <validator name="mask"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMask"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.invalid"/>
+
+
+ <validator name="byte"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateByte"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.byte"
+ jsFunctionName="ByteValidations"/>
+
+
+ <validator name="short"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateShort"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.short"
+ jsFunctionName="ShortValidations"/>
+
+
+ <validator name="integer"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateInteger"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.integer"
+ jsFunctionName="IntegerValidations"/>
+
+
+
+ <validator name="long"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateLong"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.long"/>
+
+
+ <validator name="float"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateFloat"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.float"
+ jsFunctionName="FloatValidations"/>
+
+ <validator name="double"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateDouble"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.double"/>
+
+
+ <validator name="date"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateDate"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.date"
+ jsFunctionName="DateValidations"/>
+
+
+ <validator name="intRange"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateIntRange"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends="integer"
+ msg="errors.range"/>
+
+
+ <validator name="floatRange"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateFloatRange"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends="float"
+ msg="errors.range"/>
+
+
+ <validator name="creditCard"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateCreditCard"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.creditcard"/>
+
+
+ <validator name="email"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateEmail"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.email"/>
+
+ <validator name="url"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateUrl"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.url"/>
+
+ <!--
+ This simply allows struts to include the validateUtilities into a page, it should
+ not be used as a validation rule.
+ -->
+ <validator name="includeJavaScriptUtilities"
+ classname=""
+ method=""
+ methodParams=""
+ depends=""
+ msg=""
+ jsFunction="org.apache.commons.validator.javascript.validateUtilities"/>
+
+ </global>
+
+</form-validation>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/netui-validator-rules.xml Thu Dec 16 02:21:16 2004
@@ -3,1049 +3,19 @@
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
<!--
- This file contains the default Struts Validator pluggable validator
- definitions. It should be placed somewhere under /WEB-INF and
- referenced in the struts-config.xml under the plug-in element
- for the ValidatorPlugIn.
-
- <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
- <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
- /WEB-INF/validation.xml"/>
- </plug-in>
-
- These are the default error messages associated with
- each validator defined in this file. They should be
- added to your projects ApplicationResources.properties
- file or you can associate new ones by modifying the
- pluggable validators msg attributes in this file.
-
- # Struts Validator Error Messages
- errors.required={0} is required.
- errors.minlength={0} can not be less than {1} characters.
- errors.maxlength={0} can not be greater than {1} characters.
- errors.invalid={0} is invalid.
-
- errors.byte={0} must be a byte.
- errors.short={0} must be a short.
- errors.integer={0} must be an integer.
- errors.long={0} must be a long.
- errors.float={0} must be a float.
- errors.double={0} must be a double.
-
- errors.date={0} is not a date.
- errors.range={0} is not in the range {1} through {2}.
- errors.creditcard={0} is an invalid credit card number.
- errors.email={0} is an invalid e-mail address.
-
-->
<form-validation>
<global>
- <validator name="required"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateRequired"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- msg="errors.required">
-
- <javascript><![CDATA[
- function validateRequired(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRequired = new required();
- for (x in oRequired) {
- var field = form[oRequired[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'file' ||
- field.type == 'select-one' ||
- field.type == 'radio' ||
- field.type == 'password') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (trim(value).length == 0) {
-
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRequired[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- // Trim whitespace from left and right sides of s.
- function trim(s) {
- return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
- }
-
- ]]>
- </javascript>
-
- </validator>
-
- <validator name="requiredif"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateRequiredIf"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- org.apache.commons.validator.Validator,
- javax.servlet.http.HttpServletRequest"
- msg="errors.required">
- </validator>
-
- <validator name="minlength"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMinLength"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.minlength">
-
- <javascript><![CDATA[
- function validateMinLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMinLength = new minlength();
- for (x in oMinLength) {
- var field = form[oMinLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMin = parseInt(oMinLength[x][2]("minlength"));
- if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMinLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="maxlength"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMaxLength"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.maxlength">
-
- <javascript><![CDATA[
- function validateMaxLength(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMaxLength = new maxlength();
- for (x in oMaxLength) {
- var field = form[oMaxLength[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea') {
-
- var iMax = parseInt(oMaxLength[x][2]("maxlength"));
- if (field.value.length > iMax) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMaxLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="mask"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateMask"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.invalid">
-
- <javascript><![CDATA[
- function validateMask(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oMasked = new mask();
- for (x in oMasked) {
- var field = form[oMasked[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMasked[x][1];
- isValid = false;
- }
- }
- }
-
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- function matchPattern(value, mask) {
- return mask.exec(value);
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="byte"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateByte"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.byte"
- jsFunctionName="ByteValidations">
-
- <javascript><![CDATA[
- function validateByte(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oByte = new ByteValidations();
- for (x in oByte) {
- var field = form[oByte[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
- bValid = false;
- }
- }
- }
-
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="short"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateShort"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.short"
- jsFunctionName="ShortValidations">
-
- <javascript><![CDATA[
- function validateShort(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oShort = new ShortValidations();
- for (x in oShort) {
- var field = form[oShort[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="integer"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateInteger"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.integer"
- jsFunctionName="IntegerValidations">
-
- <javascript><![CDATA[
- function validateInteger(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oInteger = new IntegerValidations();
- for (x in oInteger) {
- var field = form[oInteger[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
-
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
-
- } else {
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isAllDigits(argvalue) {
- argvalue = argvalue.toString();
- var validChars = "0123456789";
- var startFrom = 0;
- if (argvalue.substring(0, 2) == "0x") {
- validChars = "0123456789abcdefABCDEF";
- startFrom = 2;
- } else if (argvalue.charAt(0) == "0") {
- validChars = "01234567";
- startFrom = 1;
- } else if (argvalue.charAt(0) == "-") {
- startFrom = 1;
- }
-
- for (var n = startFrom; n < argvalue.length; n++) {
- if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="long"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateLong"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.long"/>
-
-
- <validator name="float"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateFloat"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.float"
- jsFunctionName="FloatValidations">
-
- <javascript><![CDATA[
- function validateFloat(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oFloat = new FloatValidations();
- for (x in oFloat) {
- var field = form[oFloat[x][0]];
-
- if (field.type == 'text' ||
- field.type == 'textarea' ||
- field.type == 'select-one' ||
- field.type == 'radio') {
-
- var value = '';
- // get field's value
- if (field.type == "select-one") {
- var si = field.selectedIndex;
- if (si >= 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- // remove '.' before checking digits
- var tempArray = value.split('.');
- var joinedString= tempArray.join('');
-
- if (!isAllDigits(joinedString)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
-
- } else {
- var iValue = parseFloat(value);
- if (isNaN(iValue)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="double"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateDouble"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.double"/>
-
-
- <validator name="date"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateDate"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.date"
- jsFunctionName="DateValidations">
-
- <javascript><![CDATA[
- function validateDate(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oDate = new DateValidations();
- for (x in oDate) {
- var value = form[oDate[x][0]].value;
- var datePattern = oDate[x][2]("datePatternStrict");
- if ((form[oDate[x][0]].type == 'text' ||
- form[oDate[x][0]].type == 'textarea') &&
- (value.length > 0) &&
- (datePattern.length > 0)) {
- var MONTH = "MM";
- var DAY = "dd";
- var YEAR = "yyyy";
- var orderMonth = datePattern.indexOf(MONTH);
- var orderDay = datePattern.indexOf(DAY);
- var orderYear = datePattern.indexOf(YEAR);
- if ((orderDay < orderYear && orderDay > orderMonth)) {
- var iDelim1 = orderMonth + MONTH.length;
- var iDelim2 = orderDay + DAY.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderDay && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderDay) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[2], matched[1], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
- var iDelim1 = orderDay + DAY.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[1], matched[2], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
- var iDelim1 = orderYear + YEAR.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
- } else if (iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
- } else {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[3], matched[2], matched[1])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isValidDate(day, month, year) {
- if (month < 1 || month > 12) {
- return false;
- }
- if (day < 1 || day > 31) {
- return false;
- }
- if ((month == 4 || month == 6 || month == 9 || month == 11) &&
- (day == 31)) {
- return false;
- }
- if (month == 2) {
- var leap = (year % 4 == 0 &&
- (year % 100 != 0 || year % 400 == 0));
- if (day>29 || (day == 29 && !leap)) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-<!-- range is deprecated use intRange instead -->
- <validator name="range"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateIntRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateRange(form) {
- return validateIntRange(form);
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="intRange"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateIntRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="integer"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateIntRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new intRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var iMin = parseInt(oRange[x][2]("min"));
- var iMax = parseInt(oRange[x][2]("max"));
- var iValue = parseInt(field.value);
- if (!(iValue >= iMin && iValue <= iMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="floatRange"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateFloatRange"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends="float"
- msg="errors.range">
-
- <javascript><![CDATA[
- function validateFloatRange(form) {
- var isValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oRange = new floatRange();
- for (x in oRange) {
- var field = form[oRange[x][0]];
-
- if ((field.type == 'text' ||
- field.type == 'textarea') &&
- (field.value.length > 0)) {
-
- var fMin = parseFloat(oRange[x][2]("min"));
- var fMax = parseFloat(oRange[x][2]("max"));
- var fValue = parseFloat(field.value);
- if (!(fValue >= fMin && fValue <= fMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
- </javascript>
-
- </validator>
-
- <validator name="creditCard"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateCreditCard"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.creditcard">
-
- <javascript><![CDATA[
- function validateCreditCard(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oCreditCard = new creditCard();
- for (x in oCreditCard) {
- if ((form[oCreditCard[x][0]].type == 'text' ||
- form[oCreditCard[x][0]].type == 'textarea') &&
- (form[oCreditCard[x][0]].value.length > 0)) {
- if (!luhnCheck(form[oCreditCard[x][0]].value)) {
- if (i == 0) {
- focusField = form[oCreditCard[x][0]];
- }
- fields[i++] = oCreditCard[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
- */
- function luhnCheck(cardNumber) {
- if (isLuhnNum(cardNumber)) {
- var no_digit = cardNumber.length;
- var oddoeven = no_digit & 1;
- var sum = 0;
- for (var count = 0; count < no_digit; count++) {
- var digit = parseInt(cardNumber.charAt(count));
- if (!((count & 1) ^ oddoeven)) {
- digit *= 2;
- if (digit > 9) digit -= 9;
- };
- sum += digit;
- };
- if (sum == 0) return false;
- if (sum % 10 == 0) return true;
- };
- return false;
- }
-
- function isLuhnNum(argvalue) {
- argvalue = argvalue.toString();
- if (argvalue.length == 0) {
- return false;
- }
- for (var n = 0; n < argvalue.length; n++) {
- if ((argvalue.substring(n, n+1) < "0") ||
- (argvalue.substring(n,n+1) > "9")) {
- return false;
- }
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
-
- <validator name="email"
- classname="org.apache.struts.validator.FieldChecks"
- method="validateEmail"
- methodParams="java.lang.Object,
- org.apache.commons.validator.ValidatorAction,
- org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
- javax.servlet.http.HttpServletRequest"
- depends=""
- msg="errors.email">
-
- <javascript><![CDATA[
- function validateEmail(form) {
- var bValid = true;
- var focusField = null;
- var i = 0;
- var fields = new Array();
- oEmail = new email();
- for (x in oEmail) {
- if ((form[oEmail[x][0]].type == 'text' ||
- form[oEmail[x][0]].type == 'textarea') &&
- (form[oEmail[x][0]].value.length > 0)) {
- if (!checkEmail(form[oEmail[x][0]].value)) {
- if (i == 0) {
- focusField = form[oEmail[x][0]];
- }
- fields[i++] = oEmail[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
- * http://javascript.internet.com
- */
- function checkEmail(emailStr) {
- if (emailStr.length == 0) {
- return true;
- }
- var emailPat=/^(.+)@(.+)$/;
- var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
- var validChars="\[^\\s" + specialChars + "\]";
- var quotedUser="(\"[^\"]*\")";
- var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
- var atom=validChars + '+';
- var word="(" + atom + "|" + quotedUser + ")";
- var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
- var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
- var matchArray=emailStr.match(emailPat);
- if (matchArray == null) {
- return false;
- }
- var user=matchArray[1];
- var domain=matchArray[2];
- if (user.match(userPat) == null) {
- return false;
- }
- var IPArray = domain.match(ipDomainPat);
- if (IPArray != null) {
- for (var i = 1; i <= 4; i++) {
- if (IPArray[i] > 255) {
- return false;
- }
- }
- return true;
- }
- var domainArray=domain.match(domainPat);
- if (domainArray == null) {
- return false;
- }
- var atomPat=new RegExp(atom,"g");
- var domArr=domain.match(atomPat);
- var len=domArr.length;
- if ((domArr[domArr.length-1].length < 2) ||
- (domArr[domArr.length-1].length > 3)) {
- return false;
- }
- if (len < 2) {
- return false;
- }
- return true;
- }]]>
- </javascript>
-
- </validator>
-
<validator name="netui_validwhen"
classname="org.apache.beehive.netui.pageflow.validation.ValidatorRules"
method="validateValidWhen"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
- org.apache.struts.action.ActionErrors,
+ org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest,
javax.servlet.ServletContext" >
</validator>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-bean.tld Thu Dec 16 02:21:16 2004
@@ -8,10 +8,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>bean</shortname>
-<uri>http://jakarta.apache.org/struts/tags-bean</uri>
+<uri>http://struts.apache.org/tags-bean</uri>
<tag>
<name>cookie</name>
<tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-html.tld Thu Dec 16 02:21:16 2004
@@ -8,10 +8,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>html</shortname>
-<uri>http://jakarta.apache.org/struts/tags-html</uri>
+<uri>http://struts.apache.org/tags-html</uri>
<tag>
<name>base</name>
<tagclass>org.apache.struts.taglib.html.BaseTag</tagclass>
@@ -618,27 +618,27 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>enctype</name>
+<name>acceptCharset</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>focus</name>
+<name>enctype</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>focusIndex</name>
+<name>focus</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>method</name>
+<name>focusIndex</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>name</name>
+<name>method</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@@ -653,7 +653,7 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
-<name>scope</name>
+<name>scriptLanguage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
@@ -677,11 +677,6 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
-<attribute>
-<name>type</name>
-<required>false</required>
-<rtexprvalue>true</rtexprvalue>
-</attribute>
</tag>
<tag>
<name>frame</name>
@@ -692,6 +687,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -832,6 +832,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>disabled</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>indexed</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -952,6 +957,11 @@
<tagclass>org.apache.struts.taglib.html.HtmlTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
+<name>lang</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>locale</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1166,6 +1176,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>contextRelative</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>height</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1266,6 +1281,16 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>paramName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1326,6 +1351,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>useLocalEncoding</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>usemap</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1371,6 +1401,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>scriptLanguage</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>src</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1400,6 +1435,11 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1569,6 +1609,11 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
+<attribute>
+<name>useLocalEncoding</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
</tag>
<tag>
<name>messages</name>
@@ -2316,6 +2361,16 @@
<tagclass>org.apache.struts.taglib.html.RewriteTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>module</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -2372,6 +2427,11 @@
</attribute>
<attribute>
<name>transaction</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>useLocalEncoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/struts-logic.tld Thu Dec 16 02:21:16 2004
@@ -7,10 +7,10 @@
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
-<tlibversion>1.0</tlibversion>
+<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>logic</shortname>
-<uri>http://jakarta.apache.org/struts/tags-logic</uri>
+<uri>http://struts.apache.org/tags-logic</uri>
<tag>
<name>empty</name>
<tagclass>org.apache.struts.taglib.logic.EmptyTag</tagclass>
@@ -576,6 +576,11 @@
<name>redirect</name>
<tagclass>org.apache.struts.taglib.logic.RedirectTag</tagclass>
<attribute>
+<name>action</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
<name>anchor</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -632,6 +637,11 @@
</attribute>
<attribute>
<name>transaction</name>
+<required>false</required>
+<rtexprvalue>true</rtexprvalue>
+</attribute>
+<attribute>
+<name>useLocalEncoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml Thu Dec 16 02:21:16 2004
@@ -10,7 +10,7 @@
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
- value="/WEB-INF/netui-validator-rules.xml,/WEB-INF/strutsValidator-validation.xml"/>
+ value="/WEB-INF/netui-validator-rules.xml,/WEB-INF/validator-rules.xml,/WEB-INF/strutsValidator-validation.xml"/>
</plug-in>
</struts-config>
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml?view=auto&rev=122540
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml Thu Dec 16 02:21:16 2004
@@ -0,0 +1,287 @@
+<!DOCTYPE form-validation PUBLIC
+ "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
+ "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
+<!--
+ $Header: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v 1.52 2004/07/25 12:00:20 niallp Exp $
+ $Revision: 1.52 $
+ $Date: 2004/07/25 12:00:20 $
+
+ This file contains the default Struts Validator pluggable validator
+ definitions. It should be placed somewhere under /WEB-INF and
+ referenced in the struts-config.xml under the plug-in element
+ for the ValidatorPlugIn.
+
+ <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
+ <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
+ /WEB-INF/validation.xml"/>
+ </plug-in>
+
+ These are the default error messages associated with
+ each validator defined in this file. They should be
+ added to your projects ApplicationResources.properties
+ file or you can associate new ones by modifying the
+ pluggable validators msg attributes in this file.
+
+ # Struts Validator Error Messages
+ errors.required={0} is required.
+ errors.minlength={0} can not be less than {1} characters.
+ errors.maxlength={0} can not be greater than {1} characters.
+ errors.invalid={0} is invalid.
+
+ errors.byte={0} must be a byte.
+ errors.short={0} must be a short.
+ errors.integer={0} must be an integer.
+ errors.long={0} must be a long.
+ errors.float={0} must be a float.
+ errors.double={0} must be a double.
+
+ errors.date={0} is not a date.
+ errors.range={0} is not in the range {1} through {2}.
+ errors.creditcard={0} is an invalid credit card number.
+ errors.email={0} is an invalid e-mail address.
+
+ Note: Starting in Struts 1.2.0 the default javascript definitions have
+ been consolidated to commons-validator. The default can be overridden
+ by supplying a <javascript> element with a CDATA section, just as
+ in struts 1.1.
+
+-->
+
+<form-validation>
+
+ <global>
+
+ <validator name="required"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateRequired"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ msg="errors.required"/>
+
+ <validator name="requiredif"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateRequiredIf"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ org.apache.commons.validator.Validator,
+ javax.servlet.http.HttpServletRequest"
+ msg="errors.required"/>
+
+ <validator name="validwhen"
+ msg="errors.required"
+ classname="org.apache.struts.validator.validwhen.ValidWhen"
+ method="validateValidWhen"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ org.apache.commons.validator.Validator,
+ javax.servlet.http.HttpServletRequest"/>
+
+
+ <validator name="minlength"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMinLength"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.minlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMinLength"/>
+
+
+ <validator name="maxlength"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMaxLength"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.maxlength"
+ jsFunction="org.apache.commons.validator.javascript.validateMaxLength"/>
+
+
+
+ <validator name="mask"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateMask"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.invalid"/>
+
+
+ <validator name="byte"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateByte"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.byte"
+ jsFunctionName="ByteValidations"/>
+
+
+ <validator name="short"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateShort"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.short"
+ jsFunctionName="ShortValidations"/>
+
+
+ <validator name="integer"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateInteger"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.integer"
+ jsFunctionName="IntegerValidations"/>
+
+
+
+ <validator name="long"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateLong"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.long"/>
+
+
+ <validator name="float"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateFloat"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.float"
+ jsFunctionName="FloatValidations"/>
+
+ <validator name="double"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateDouble"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.double"/>
+
+
+ <validator name="date"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateDate"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.date"
+ jsFunctionName="DateValidations"/>
+
+
+ <validator name="intRange"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateIntRange"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends="integer"
+ msg="errors.range"/>
+
+
+ <validator name="floatRange"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateFloatRange"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends="float"
+ msg="errors.range"/>
+
+
+ <validator name="creditCard"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateCreditCard"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.creditcard"/>
+
+
+ <validator name="email"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateEmail"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.email"/>
+
+ <validator name="url"
+ classname="org.apache.struts.validator.FieldChecks"
+ method="validateUrl"
+ methodParams="java.lang.Object,
+ org.apache.commons.validator.ValidatorAction,
+ org.apache.commons.validator.Field,
+ org.apache.struts.action.ActionMessages,
+ javax.servlet.http.HttpServletRequest"
+ depends=""
+ msg="errors.url"/>
+
+ <!--
+ This simply allows struts to include the validateUtilities into a page, it should
+ not be used as a validation rule.
+ -->
+ <validator name="includeJavaScriptUtilities"
+ classname=""
+ method=""
+ methodParams=""
+ depends=""
+ msg=""
+ jsFunction="org.apache.commons.validator.javascript.validateUtilities"/>
+
+ </global>
+
+</form-validation>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/imageAnchorActions/error.jsp Thu Dec 16 02:21:16 2004
@@ -21,7 +21,7 @@
Null Action:<netui:imageAnchor action="${pageFlow.nullAction}"
src="/coreWeb/resources/images/back.gif"/><br>
<hr>
- <netui:anchor action="${pageFlow.actions[1]}">Home</netui:anchor><br>
+ <netui:anchor action="${pageFlow.actions[2]}">Home</netui:anchor><br>
</p>
</netui:body>
</netui:html>
Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MiscJpfTest13.xml Thu Dec 16 02:21:16 2004
@@ -1,76 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
-
-<recorderSession xmlns="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
-
- <sessionName>MiscJpfTest13</sessionName>
- <tester>Spencer Keller</tester>
- <startDate>16 Sep 2003, 06:55:27.421 PM MDT</startDate>
- <description>Test a pure 100% struts app. running under the PageFlowActionServlet.</description>
-
- <tests>
- <test>
- <testNumber>1</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/loadStruts.do</uri>
- <method>GET</method>
-
- <parameters>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/StartTest.jsp</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>MiscJpfTest13</ses:sessionName>
+ <ses:tester>rich</ses:tester>
+ <ses:startDate>13 Dec 2004, 01:14:21.315 AM MST</ses:startDate>
+ <ses:description>Test a pure Struts app.</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/loadStruts.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -120,97 +121,101 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
- <test>
- <testNumber>2</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/submit.do</uri>
- <method>POST</method>
-
- <parameters>
- <parameter>
- <name>address</name>
- <value></value>
- </parameter>
- <parameter>
- <name>age</name>
- <value>a</value>
- </parameter>
- <parameter>
- <name>lastName</name>
- <value>John Doe</value>
- </parameter>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Cache-Control</name>
- <value>no-cache</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Content-Length</name>
- <value>32</value>
- </header>
- <header>
- <name>Content-Type</name>
- <value>application/x-www-form-urlencoded</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/loadStruts.do</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>2</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/submit.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>address</ses:name>
+ <ses:value/>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>age</ses:name>
+ <ses:value>a</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>lastName</ses:name>
+ <ses:value>John Doe</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>32</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miscJpf/test13/loadStruts.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -219,11 +224,7 @@
<hr width="95%"/>
<br/>
<center>
- <h4>Validation Error(s)</h4><ul>
-<li>Please enter your address. It's required.
-<li>Please enter your sex. It's required.
-</ul><hr>
-
+ <h4>Validation Error(s)</h4><ul><li>Please enter your address. It's required.<li>Please enter your sex. It's required.</ul><hr>
</center>
<form name="submitForm" method="post" action="/coreWeb/miscJpf/test13/submit.do">
@@ -264,97 +265,101 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
- <test>
- <testNumber>3</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/submit.do</uri>
- <method>POST</method>
-
- <parameters>
- <parameter>
- <name>address</name>
- <value>123 street</value>
- </parameter>
- <parameter>
- <name>age</name>
- <value>a</value>
- </parameter>
- <parameter>
- <name>lastName</name>
- <value>John Doe</value>
- </parameter>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Cache-Control</name>
- <value>no-cache</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Content-Length</name>
- <value>42</value>
- </header>
- <header>
- <name>Content-Type</name>
- <value>application/x-www-form-urlencoded</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/submit.do</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>3</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/submit.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>address</ses:name>
+ <ses:value>123 Street</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>age</ses:name>
+ <ses:value>a</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>lastName</ses:name>
+ <ses:value>John Doe</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>42</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miscJpf/test13/submit.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -363,10 +368,7 @@
<hr width="95%"/>
<br/>
<center>
- <h4>Validation Error(s)</h4><ul>
-<li>Please enter your sex. It's required.
-</ul><hr>
-
+ <h4>Validation Error(s)</h4><ul><li>Please enter your sex. It's required.</ul><hr>
</center>
<form name="submitForm" method="post" action="/coreWeb/miscJpf/test13/submit.do">
@@ -377,7 +379,7 @@
</tr>
<tr align="center">
<td align="right">Address:</td>
- <td align="left"><textarea name="address">123 street</textarea></td>
+ <td align="left"><textarea name="address">123 Street</textarea></td>
</tr>
<tr align="center">
<td align="right">Sex:</td>
@@ -407,101 +409,105 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
- <test>
- <testNumber>4</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/submit.do</uri>
- <method>POST</method>
-
- <parameters>
- <parameter>
- <name>address</name>
- <value>123 street</value>
- </parameter>
- <parameter>
- <name>age</name>
- <value>a</value>
- </parameter>
- <parameter>
- <name>lastName</name>
- <value>John Doe</value>
- </parameter>
- <parameter>
- <name>sex</name>
- <value>M</value>
- </parameter>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Cache-Control</name>
- <value>no-cache</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Content-Length</name>
- <value>48</value>
- </header>
- <header>
- <name>Content-Type</name>
- <value>application/x-www-form-urlencoded</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/submit.do</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>4</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/submit.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>address</ses:name>
+ <ses:value>123 Street</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>age</ses:name>
+ <ses:value>a</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>lastName</ses:name>
+ <ses:value>John Doe</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>sex</ses:name>
+ <ses:value>M</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>48</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miscJpf/test13/submit.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -521,7 +527,7 @@
</tr>
<tr align="center">
<td align="right">Address:</td>
- <td align="left"><textarea name="address">123 street</textarea></td>
+ <td align="left"><textarea name="address">123 Street</textarea></td>
</tr>
<tr align="center">
<td align="right">Sex:</td>
@@ -558,101 +564,105 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
- <test>
- <testNumber>5</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/submit.do</uri>
- <method>POST</method>
-
- <parameters>
- <parameter>
- <name>address</name>
- <value>123 street</value>
- </parameter>
- <parameter>
- <name>age</name>
- <value>a</value>
- </parameter>
- <parameter>
- <name>lastName</name>
- <value>John Doe</value>
- </parameter>
- <parameter>
- <name>sex</name>
- <value>F</value>
- </parameter>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Cache-Control</name>
- <value>no-cache</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Content-Length</name>
- <value>48</value>
- </header>
- <header>
- <name>Content-Type</name>
- <value>application/x-www-form-urlencoded</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/submit.do</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>5</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/submit.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>address</ses:name>
+ <ses:value>123 Street</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>age</ses:name>
+ <ses:value>a</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>lastName</ses:name>
+ <ses:value>John Doe</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>sex</ses:name>
+ <ses:value>F</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>48</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miscJpf/test13/submit.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -672,7 +682,7 @@
</tr>
<tr align="center">
<td align="right">Address:</td>
- <td align="left"><textarea name="address">123 street</textarea></td>
+ <td align="left"><textarea name="address">123 Street</textarea></td>
</tr>
<tr align="center">
<td align="right">Sex:</td>
@@ -709,101 +719,105 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
- <test>
- <testNumber>6</testNumber>
-
- <request>
-
- <protocol>HTTP</protocol>
- <protocolVersion>1.1</protocolVersion>
- <host>localhost</host>
- <port>7001</port>
- <uri>/coreWeb/miscJpf/test13/submit.do</uri>
- <method>POST</method>
-
- <parameters>
- <parameter>
- <name>address</name>
- <value>123 street</value>
- </parameter>
- <parameter>
- <name>age</name>
- <value>c</value>
- </parameter>
- <parameter>
- <name>lastName</name>
- <value>John Doe</value>
- </parameter>
- <parameter>
- <name>sex</name>
- <value>F</value>
- </parameter>
- </parameters>
-
- <cookies>
- <cookie>
- <name>JSESSIONID</name>
- <value>1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </cookie>
- </cookies>
-
- <headers>
- <header>
- <name>Accept</name>
- <value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*</value>
- </header>
- <header>
- <name>Accept-Encoding</name>
- <value>gzip, deflate</value>
- </header>
- <header>
- <name>Accept-Language</name>
- <value>en-us</value>
- </header>
- <header>
- <name>Cache-Control</name>
- <value>no-cache</value>
- </header>
- <header>
- <name>Connection</name>
- <value>Keep-Alive</value>
- </header>
- <header>
- <name>Content-Length</name>
- <value>48</value>
- </header>
- <header>
- <name>Content-Type</name>
- <value>application/x-www-form-urlencoded</value>
- </header>
- <header>
- <name>Cookie</name>
- <value>JSESSIONID=1nwW7qpIvMcEjOmR46JsUnoQl0oeKFvk40Xlgou5W0iuGsCJo9pP!-1959492689</value>
- </header>
- <header>
- <name>Host</name>
- <value>localhost:7001</value>
- </header>
- <header>
- <name>Referer</name>
- <value>http://localhost:7001/coreWeb/miscJpf/test13/submit.do</value>
- </header>
- <header>
- <name>User-Agent</name>
- <value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)</value>
- </header>
- </headers>
-
- </request>
-
- <response>
- <statusCode>200</statusCode>
- <reason></reason>
- <responseBody><![CDATA[<html>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>6</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/miscJpf/test13/submit.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>address</ses:name>
+ <ses:value>123 Street</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>age</ses:name>
+ <ses:value>c</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>lastName</ses:name>
+ <ses:value>John Doe</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>sex</ses:name>
+ <ses:value>F</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AC3128D04761ECE0CEB5C4274D511B07</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID_QA_CONSUMER</ses:name>
+ <ses:value>B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>ADMINCONSOLESESSION</ses:name>
+ <ses:value>B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>48</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=AC3128D04761ECE0CEB5C4274D511B07; JSESSIONID_QA_CONSUMER=B9Ssjg2sccsKUy8QJVYwFdAIT8hsmqPKhJG4p2aMcdUmkFfpbYVA!1030034076; ADMINCONSOLESESSION=B9PTUnZJaqaBZ0jCeHHN2T9b2k2csL1X2RA011UMzEHhwpv492Up!1030034076</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miscJpf/test13/submit.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
<head>
<title>MiscJpf Test13</title>
</head>
@@ -823,7 +837,7 @@
</tr>
<tr align="center">
<td align="right">Address:</td>
- <td align="left"><textarea name="address">123 street</textarea></td>
+ <td align="left"><textarea name="address">123 Street</textarea></td>
</tr>
<tr align="center">
<td align="right">Sex:</td>
@@ -860,14 +874,10 @@
</center>
</body>
-</html>]]></responseBody>
-
- </response>
- </test>
-
- </tests>
-
- <endDate>16 Sep 2003, 06:56:19.722 PM MDT</endDate>
- <testCount>6</testCount>
-
-</recorderSession>
\ No newline at end of file
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>13 Dec 2004, 01:15:01.552 AM MST</ses:endDate>
+ <ses:testCount>6</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file
Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml?view=diff&rev=122540&p1=incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml&r1=122539&p2=incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml&r2=122540
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml Thu Dec 16 02:21:16 2004
@@ -107,31 +107,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>
@@ -251,31 +251,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>
@@ -395,31 +395,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>
@@ -539,31 +539,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>
@@ -683,31 +683,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>
@@ -827,31 +827,31 @@
Actions in this pageflow:
<ul>
- <li><span>normalReturnWithForm</span>
-
+ <li><span>begin</span>
+
+ <li><span>conflictsWithNonAction</span>
+
<li><span>nestReturnForm1</span>
-
- <li><span>nestReturnUnknownForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
-
- <li><span>nestReturnNormalWithoutForm</span>
-
- <li><span>normalReturnWithoutForm</span>
-
- <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
-
- <li><span>nestReturnNormalWithForm</span>
-
+
<li><span>nestReturnForm2</span>
-
- <li><span>conflictsWithNonAction</span>
-
+
<li><span>nestReturnNoForm</span>
-
- <li><span>begin</span>
-
+
+ <li><span>nestReturnNormalWithForm</span>
+
+ <li><span>nestReturnNormalWithoutForm</span>
+
+ <li><span>nestReturnUnknownForm</span>
+
+ <li><span>normalReturnWithForm</span>
+
+ <li><span>normalReturnWithoutForm</span>
+
<li><span>overloaded</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form1</span>
+
+ <li><span>overloaded_miniTests_overloadedActions_Controller_Form2</span>
</ul>