struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r392100 [1/4] - in /struts/action/trunk/apps: faces-example1/src/main/java/ faces-example1/src/main/java/org/ faces-example1/src/main/java/org/apache/ faces-example1/src/main/java/org/apache/struts/ faces-example1/src/main/java/org/apache/s...
Date Thu, 06 Apr 2006 22:31:41 GMT
Author: mrdon
Date: Thu Apr  6 15:31:36 2006
New Revision: 392100

URL: http://svn.apache.org/viewcvs?rev=392100&view=rev
Log:
Adding back the java sources (doh!), renaming web directory to webapp

Added:
    struts/action/trunk/apps/faces-example1/src/main/java/
    struts/action/trunk/apps/faces-example1/src/main/java/org/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/AbstractBacking.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationMapping.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources.properties
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ja.properties
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ru.properties
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/CheckLogonTag.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Constants.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditRegistrationAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditSubscriptionAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ExpiredPasswordException.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/IndexBacking.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkSubscriptionTag.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkUserTag.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogoffAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonForm.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/MainMenuBacking.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/RegistrationBacking.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/RegistrationForm.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/SaveRegistrationAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/SaveSubscriptionAction.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Subscription.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/SubscriptionForm.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/User.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/UserDatabase.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/MemoryDatabasePlugIn.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/MemorySubscription.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/MemoryUser.java
    struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/MemoryUserDatabase.java
    struts/action/trunk/apps/faces-example1/src/main/webapp/
      - copied from r392097, struts/action/trunk/apps/faces-example1/src/main/web/
    struts/action/trunk/apps/faces-example2/src/main/java/
    struts/action/trunk/apps/faces-example2/src/main/java/org/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/ApplicationMapping.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/ApplicationResources.properties
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/ApplicationResources_ja.properties
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/ApplicationResources_ru.properties
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/CheckLogonTag.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/Constants.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/EditRegistrationAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/EditSubscriptionAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/ExpiredPasswordException.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LinkSubscriptionTag.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LinkUserTag.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LoggedOff.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LoggedOn.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LogoffAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LogonAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/LogonForm.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/RegistrationBacking.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/RegistrationForm.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/SaveRegistrationAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/SaveSubscriptionAction.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/Subscription.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/SubscriptionForm.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/User.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/UserDatabase.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/MemoryDatabasePlugIn.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/MemorySubscription.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/MemoryUser.java
    struts/action/trunk/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/MemoryUserDatabase.java
    struts/action/trunk/apps/faces-example2/src/main/webapp/
      - copied from r392096, struts/action/trunk/apps/faces-example2/src/main/web/
Removed:
    struts/action/trunk/apps/faces-example1/src/main/web/
    struts/action/trunk/apps/faces-example2/src/main/web/

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/AbstractBacking.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/AbstractBacking.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/AbstractBacking.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/AbstractBacking.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,126 @@
+/*
+ * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+
+/**
+ * <p>Abstract base class for backing beans.</p>
+ */
+
+abstract class AbstractBacking {
+
+
+    // ------------------------------------------------------- Protected Methods
+
+
+    /**
+     * <p>Return the context relative path for the specified action.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     * @param action Name of the requested action
+     */
+    protected StringBuffer action(FacesContext context, String action) {
+
+        // FIXME - assumes extension mapping for Struts
+        StringBuffer sb = new StringBuffer(action);
+        sb.append(".do");
+        return (sb);
+
+    }
+
+
+    /**
+     * <p>Forward to the specified URL and mark this response as having
+     * been completed.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     * @param url Context-relative URL to forward to
+     *
+     * @exception FacesException if any error occurs
+     */
+    protected void forward(FacesContext context, String url) {
+
+        try {
+            context.getExternalContext().dispatch(url);
+        } catch (IOException e) {
+            throw new FacesException(e);
+        } finally {
+            context.responseComplete();
+        }
+
+    }
+
+
+    /**
+     * <p>Return the context relative base URL for the "logoff"
+     * action.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    protected StringBuffer logoff(FacesContext context) {
+
+        return (action(context, "/logoff"));
+
+    }
+
+
+    /**
+     * <p>Return the context relative base URL for the "logon"
+     * action.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    protected StringBuffer logon(FacesContext context) {
+
+        return (action(context, "/logon"));
+
+    }
+
+
+    /**
+     * <p>Return the context relative base URL for the "edit registration"
+     * action.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    protected StringBuffer registration(FacesContext context) {
+
+        return (action(context, "/editRegistration"));
+
+    }
+
+
+    /**
+     * <p>Return the context relative base URL for the "edit subscriptions"
+     * action.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    protected StringBuffer subscription(FacesContext context) {
+
+        return (action(context, "/editSubscription"));
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationMapping.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationMapping.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationMapping.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationMapping.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,105 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import org.apache.struts.action.ActionMapping;
+
+
+/**
+ * Implementation of <strong>ActionMapping</strong> for the Struts
+ * example application.  It defines the following custom properties:
+ * <ul>
+ * <li><b>failure</b> - The context-relative URI to which this request
+ *     should be forwarded if a validation error occurs on the input
+ *     information (typically goes back to the input form).
+ * <li><b>success</b> - The context-relative URI to which this request
+ *     should be forwarded if the requested action is successfully
+ *     completed.
+ * </ul>
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 54934 $ $Date: 2004-10-16 10:07:50 -0700 (Sat, 16 Oct 2004) $
+ */
+
+public final class ApplicationMapping extends ActionMapping {
+
+
+    // --------------------------------------------------- Instance Variables
+
+
+    /**
+     * The failure URI for this mapping.
+     */
+    private String failure = null;
+
+
+    /**
+     * The success URI for this mapping.
+     */
+    private String success = null;
+
+
+    // ----------------------------------------------------------- Properties
+
+
+    /**
+     * Return the failure URI for this mapping.
+     */
+    public String getFailure() {
+
+	return (this.failure);
+
+    }
+
+
+    /**
+     * Set the failure URI for this mapping.
+     *
+     * @param failure The failure URI for this mapping
+     */
+    public void setFailure(String failure) {
+
+	this.failure = failure;
+
+    }
+
+
+    /**
+     * Return the success URI for this mapping.
+     */
+    public String getSuccess() {
+
+	return (this.success);
+
+    }
+
+
+    /**
+     * Set the success URI for this mapping.
+     *
+     * @param success The success URI for this mapping
+     */
+    public void setSuccess(String success) {
+
+	this.success = success;
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources.properties
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources.properties?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources.properties (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources.properties Thu Apr  6 15:31:36 2006
@@ -0,0 +1,111 @@
+# ==============================================================================
+# Copyright 2002,2004 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+#
+button.add=Add New
+button.cancel=Cancel
+button.confirm=Confirm
+button.delete=Delete
+button.edit=Edit
+button.logon=Log On
+button.reset=Reset
+button.save=Save
+button.update=Update
+change.message=Your password has expired.  Please ask the system administrator to change it.
+change.try=Try Again
+change.title=Password Has Expired
+database.load=Cannot load database from {0}
+error.database.missing=<li>User database is missing, cannot validate logon credentials</li>
+error.fromAddress.format=<li>Invalid format for From Address</li>
+error.fromAddress.required=<li>From Address is required</li>
+error.fullName.required=<li>Full Name is required</li>
+error.host.required=<li>Mail Server is required</li>
+error.noSubscription=<li>No Subscription bean in user session</li>
+error.password.expired=Your password has expired for username {0}
+error.password.required=<li>Password is required</li>
+error.password2.required=<li>Confirmation password is required</li>
+error.password.match=<li>Password and confirmation password must match</li>
+error.password.mismatch=<li>Invalid username and/or password, please try again</li>
+error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
+error.transaction.token=<li>Cannot submit this form out of order</li>
+error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
+error.type.required=<li>Server Type is required</li>
+error.username.required=<li>Username is required</li>
+error.username.unique=<li>That username is already in use - please select another</li>
+errors.footer=</ul><hr>
+errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
+errors.ioException=I/O exception rendering error messages: {0}
+expired.password=User Password has expired for {0}
+heading.autoConnect=Auto
+heading.subscriptions=Current Subscriptions
+heading.host=Host Name
+heading.user=User Name
+heading.type=Server Type
+heading.action=Action
+index.heading=MailReader Demonstration Application Options
+index.logon=Log on to the MailReader Demonstration Application
+index.registration=Register with the MailReader Demonstration Application
+index.title=MailReader Demonstration Application (Struts 1.1-dev)
+index.tour=A Walking Tour of the Example Application
+linkSubscription.io=I/O Error: {0}
+linkSubscription.noSubscription=No subscription under attribute {0}
+linkUser.io=I/O Error: {0}
+linkUser.noUser=No user under attribute {0}
+logon.footer=Enter your username and password, and press the Log On button
+logon.header=Logon Form
+logon.title=MailReader Demonstration Application - Logon
+mainMenu.heading=Main Menu Options for 
+mainMenu.logoff=Log off MailReader Demonstration Application
+mainMenu.registration=Edit your user registration profile
+mainMenu.title=MailReader Demonstration Application - Main Menu
+option.imap=IMAP Protocol
+option.pop3=POP3 Protocol
+prompt.autoConnect=Auto Connect:
+prompt.fromAddress=From Address:
+prompt.fullName=Full Name:
+prompt.mailHostname=Mail Server:
+prompt.mailPassword=Mail Password:
+prompt.mailServerType=Server Type:
+prompt.mailUsername=Mail Username:
+prompt.password=Password:
+prompt.password2=(Repeat) Password:
+prompt.replyToAddress=Reply To Address:
+prompt.username=Username:
+registration.addSubscription=Add
+registration.deleteSubscription=Delete
+registration.editSubscription=Edit
+registration.header.create=Enter Registration Information
+registration.header.edit=Edit Your Registration Information
+registration.title.create=Register for the MailReader Demostration Application
+registration.title.edit=Edit Registration for the MailReader Demonstration Application
+subscription.title.create=Create New Mail Subscription
+subscription.title.delete=Delete Existing Mail Subscription
+subscription.title.edit=Edit Existing Mail Subscription
+
+# Standard error messages for validator framework checks
+errors.required={0} is required.
+errors.minlength={0} cannot be less than {1} characters.
+errors.maxlength={0} cannot be greater than {1} characters.
+errors.invalid={0} is invalid.
+errors.byte={0} must be an byte.
+errors.short={0} must be an short.
+errors.integer={0} must be an integer.
+errors.long={0} must be an long.
+errors.float={0} must be an float.
+errors.double={0} must be an double.
+errors.date={0} is not a date.
+errors.range={0} is not in the range {1} through {2}.
+errors.creditcard={0} is not a valid credit card number.
+errors.email={0} is an invalid e-mail address.

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ja.properties
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ja.properties?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ja.properties (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ja.properties Thu Apr  6 15:31:36 2006
@@ -0,0 +1,110 @@
+# ==============================================================================
+# Copyright 2002,2004 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+#
+button.cancel=\u30ad\u30e3\u30f3\u30bb\u30eb
+button.confirm=\u78ba\u8a8d
+button.reset=\u30ea\u30bb\u30c3\u30c8
+button.save=\u4fdd\u5b58
+change.message=\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F\u3002\u30B7\u30B9\u30C6\u30E0\u7BA1\u7406\u8005\u306B\u304A\u554F\u3044\u5408\u308F\u305B\u4E0B\u3055\u3044
+change.try=\u518D\u8A66\u884C
+change.title=\u30d1\u30b9\u30ef\u30fc\u30c9\u671f\u9650\u5207\u308c
+database.load= {0} \u304B\u3089\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
+error.database.missing=<li>\u30E6\u30FC\u30B6\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30ED\u30B0\u30AA\u30F3\u306E\u8A8D\u8A3C\u304C\u51FA\u6765\u307E\u305B\u3093</li>
+error.fromAddress.format=<li>From\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093</li>
+error.fromAddress.required=<li>From\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.fullName.required=<li>\u30D5\u30EB\u30CD\u30FC\u30E0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.host.required=<li>\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.noSubscription=<li>Subscription bean \u304c\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u3042\u308a\u307e\u305b\u3093</li>
+error.password.expired=\u30E6\u30FC\u30B6 {0} \u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F
+error.password.required=<li>\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059</li>
+error.password2.required=<li>\u30D1\u30B9\u30EF\u30FC\u30C9(\u78BA\u8A8D\u7528)\u304C\u5FC5\u8981\u3067\u3059</li>
+error.password.match=<li>\u30D1\u30B9\u30EF\u30FC\u30C9\u3068\u78BA\u8A8D\u7528\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E00\u81F4\u3057\u3066\u3044\u307E\u305B\u3093</li>
+error.password.mismatch=<li>\u30E6\u30FC\u30B6\u540D\u307E\u305F\u306F\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E0D\u6B63\u3067\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.replyToAddress.format=<li>\u8FD4\u4FE1\u30A2\u30C9\u30EC\u30B9\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093</li>
+error.transaction.token=<li>\u3053\u306E\u30D5\u30A9\u30FC\u30E0\u306E\u5185\u5BB9\u304C\u6B63\u3057\u304F\u306A\u3044\u305F\u3081\u9001\u4FE1\u3059\u308B\u3053\u3068\u304C\u51FA\u6765\u307E\u305B\u3093</li>
+error.type.invalid=<li>\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u306F 'imap' \u304B 'pop3'\u306E\u3069\u3061\u3089\u304B\u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093</li>
+error.type.required=<li>\u30B5\u30FC\u30D0\u30BF\u30A4\u30D7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.username.required=<li>\u30E6\u30FC\u30B6\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044</li>
+error.username.unique=<li>\u305D\u306E\u30E6\u30FC\u30B6\u540D\u306F\u65E2\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002 \u5225\u306E\u30E6\u30FC\u30B6\u540D\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</li>
+errors.footer=</ul><hr>
+errors.header=<h3><font color="red">\u5165\u529b\u30c1\u30a7\u30c3\u30af\u30a8\u30e9\u30fc</font></h3>\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044:<ul>
+errors.ioException=I/O\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {0}
+expired.password=\u30E6\u30FC\u30B6 {0} \u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u306E\u6709\u52B9\u671F\u9650\u304C\u904E\u304E\u307E\u3057\u305F
+heading.autoConnect=\u81ea\u52d5\u63a5\u7d9a
+heading.subscriptions=\u73fe\u5728\u306e\u8cfc\u8aad\u60c5\u5831
+heading.host=\u30db\u30b9\u30c8\u540d
+heading.user=\u30e6\u30fc\u30b6\u540d
+heading.type=\u30b5\u30fc\u30d0\u30bf\u30a4\u30d7
+heading.action=\u64cd\u4f5c
+index.heading=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 \u30aa\u30d7\u30b7\u30e7\u30f3
+index.logon=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30ed\u30b0\u30aa\u30f3
+index.registration=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e6\u30fc\u30b6\u767b\u9332
+index.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3(Struts 1.1-dev)
+index.tour=\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6563\u7b56\u3059\u308b
+linkSubscription.io=I/O\u30a8\u30e9\u30fc: {0}
+linkSubscription.noSubscription=\u5c5e\u6027 {0} \u306b\u8cfc\u8aad\u60c5\u5831\u304c\u5b58\u5728\u3057\u307e\u305b\u3093  
+linkUser.io=I/O\u30a8\u30e9\u30fc: {0}
+linkUser.noUser=\u5c5e\u6027 {0} \u306b\u30e6\u30fc\u30b6\u60c5\u5831\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
+logon.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30ed\u30b0\u30aa\u30f3
+mainMenu.heading=\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
+mainMenu.logoff=MailReader \u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u30aa\u30d5
+mainMenu.registration=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6
+mainMenu.title=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
+option.imap=IMAP \u30d7\u30ed\u30c8\u30b3\u30eb
+option.pop3=POP3 \u30d7\u30ed\u30c8\u30b3\u30eb
+prompt.autoConnect=\u81ea\u52d5\u63a5\u7d9a
+prompt.fromAddress=From\u30a2\u30c9\u30ec\u30b9
+prompt.fullName=\u30d5\u30eb\u30cd\u30fc\u30e0
+prompt.mailHostname=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0
+prompt.mailPassword=\u30e1\u30fc\u30eb\u30d1\u30b9\u30ef\u30fc\u30c9
+prompt.mailServerType=\u30b5\u30fc\u30d0\u30bf\u30a4\u30d7
+prompt.mailUsername=\u30e1\u30fc\u30eb\u30e6\u30fc\u30b6\u540d
+prompt.password=\u30d1\u30b9\u30ef\u30fc\u30c9
+prompt.password2=\u30d1\u30b9\u30ef\u30fc\u30c9(\u78ba\u8a8d\u7528)
+prompt.replyToAddress=\u8fd4\u4fe1\u30a2\u30c9\u30ec\u30b9
+prompt.username=\u30e6\u30fc\u30b6\u540d
+registration.addSubscription=\u65b0\u898f\u4f5c\u6210
+registration.deleteSubscription=\u524a\u9664
+registration.editSubscription=\u7de8\u96c6
+registration.title.create=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30e6\u30fc\u30b6\u767b\u9332
+registration.title.edit=MailReader\u30c7\u30e2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 - \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6
+subscription.title.create=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u65b0\u898f\u4f5c\u6210
+subscription.title.delete=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u524a\u9664
+subscription.title.edit=\u30e1\u30fc\u30eb\u8cfc\u8aad\u60c5\u5831\u306e\u7de8\u96c6
+
+# Standard error messages for validator framework checks
+errors.required={0} \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+errors.minlength={0} \u306f {1} \u6587\u5b57\u4ee5\u4e0a\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.maxlength={0} \u306f {2} \u6587\u5b57\u4ee5\u4e0b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.invalid={0} \u306f\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.byte={0} \u306fbyte\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.short={0} \u306fshort\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.integer={0} \u306finteger\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.long={0} \u306flong\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.float={0} \u306ffloat\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.double={0} \u306fdouble\u578b\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.date={0} \u306f\u65e5\u4ed8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.range={0} \u306f {1} \u304b\u3089 {2} \u306e\u9593\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
+errors.creditcard={0} \u306f\u6b63\u3057\u3044\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+errors.email={0} \u306f\u6b63\u3057\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+
+logon.footer=\u30E6\u30FC\u30B6\u540D\u3068\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u30ED\u30B0\u30AA\u30F3\u30DC\u30BF\u30F3\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044
+
+logon.header=\u30ED\u30B0\u30AA\u30F3\u30D5\u30A9\u30FC\u30E0
+
+registration.header.create=\u767B\u9332\u60C5\u5831\u5165\u529B
+
+registration.header.edit=\u767B\u9332\u60C5\u5831\u7DE8\u96C6

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ru.properties
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ru.properties?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ru.properties (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ApplicationResources_ru.properties Thu Apr  6 15:31:36 2006
@@ -0,0 +1,81 @@
+# ==============================================================================
+# Copyright 2002,2004 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+#
+button.cancel=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c
+button.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c
+button.reset=\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c
+button.save=\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c
+database.load=\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0438\u0437 {0}
+error.database.missing=<li>\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f - \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.</li>
+error.fromAddress.format=<li>\u0412 \u043f\u043e\u043b\u0435 '\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:' \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0434\u0440\u0435\u0441 \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.</li>
+error.fromAddress.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0432 \u043f\u043e\u043b\u0435 '\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:'.</li>
+error.fullName.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f.</li>
+error.host.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.</li>
+error.noSubscription=<li>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</li>
+error.password.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c.</li>
+error.password2.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f.</li>
+error.password.match=<li>\u041f\u0430\u0440\u043e\u043b\u044c \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.</li>
+error.password.mismatch=<li>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u044f \u0438/\u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c - \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043d\u043e\u0432\u0430.</li>
+error.replyToAddress.format=<li>\u0412 \u043f\u043e\u043b\u0435 '\u0410\u0434\u0440\u0435\u0441 \u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430:' \u0443\u043a\u0430\u0437\u0430\u043d \u0430\u0434\u0440\u0435\u0441 \u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.</li>
+error.transaction.token=<li>\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 - \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.</li>
+error.type.invalid=<li>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0438\u043f\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043b\u0438\u0448\u044c 'imap' \u0438\u043b\u0438 'pop3'</li>
+error.type.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0430</li>
+error.username.required=<li>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</li>
+error.username.unique=<li>\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f - \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043c\u044f.</li>
+errors.footer=</ul><hr>
+errors.header=<h3><font color="red">\u041e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445</font></h3>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0438:<ul>
+errors.ioException=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u0434\u0430/\u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445: {0}
+heading.autoConnect=\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438
+heading.subscriptions=\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438
+heading.host=\u0421\u0435\u0440\u0432\u0435\u0440
+heading.user=\u0418\u043c\u044f
+heading.type=\u0422\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0430
+heading.action=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
+index.heading=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 '\u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b'
+index.logon=\u0412\u043e\u0439\u0442\u0438 \u043a\u0430\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c
+index.registration=\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f
+index.title=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 '\u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b' (Struts 1.1-dev)
+index.tour=\u041e\u0431\u0437\u043e\u0440 \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f '\u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b'
+linkSubscription.io=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u0434\u0430/\u0432\u044b\u0432\u043e\u0434\u0430 (\u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438): {0}
+linkSubscription.noSubscription=\u0410\u0442\u0440\u0438\u0431\u0443\u0442 {0} \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 \u0438\u043b\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.
+linkUser.io=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u0434\u0430/\u0432\u044b\u0432\u043e\u0434\u0430 (\u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f): {0}
+linkUser.noUser=\u0410\u0442\u0440\u0438\u0431\u0443\u0442 {0} \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438\u043b\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.
+logon.title=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b - \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043c\u0435\u043d\u0438 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.
+mainMenu.heading=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u0434\u043b\u044f
+mainMenu.logoff=\u0412\u044b\u0439\u0442\u0438
+mainMenu.registration=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
+mainMenu.title=\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 '\u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u044b' - \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e
+option.imap=\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b IMAP 
+option.pop3=\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b POP3 
+prompt.autoConnect=\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435:
+prompt.fromAddress=\u0410\u0434\u0440\u0435\u0441 \u041e\u0442:
+prompt.fullName=\u041f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f:
+prompt.mailHostname=\u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440:
+prompt.mailPassword=\u041f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430:
+prompt.mailServerType=\u0422\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0430:
+prompt.mailUsername=\u0418\u043c\u044f \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430:
+prompt.password=\u041f\u0430\u0440\u043e\u043b\u044c:
+prompt.password2=(\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435) \u041f\u0430\u0440\u043e\u043b\u044c:
+prompt.replyToAddress=\u0410\u0434\u0440\u0435\u0441 \u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430:
+prompt.username=\u0418\u043c\u044f:
+registration.addSubscription=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c
+registration.deleteSubscription=\u0423\u0434\u0430\u043b\u0438\u0442\u044c
+registration.editSubscription=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c
+registration.title.create=\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f
+registration.title.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u0432\u043e\u0435\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438
+subscription.title.create=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443
+subscription.title.delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443
+subscription.title.edit=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/CheckLogonTag.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/CheckLogonTag.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/CheckLogonTag.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/CheckLogonTag.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,157 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.TagSupport;
+
+
+/**
+ * Check for a valid User logged on in the current session.  If there is no
+ * such user, forward control to the logon page.
+ *
+ * @author Craig R. McClanahan
+ * @author Marius Barduta
+ * @version $Rev: 54934 $ $Date: 2004-10-16 10:07:50 -0700 (Sat, 16 Oct 2004) $
+ */
+
+public final class CheckLogonTag extends TagSupport {
+
+
+    // --------------------------------------------------- Instance Variables
+
+
+    /**
+     * The key of the session-scope bean we look for.
+     */
+    private String name = Constants.USER_KEY;
+
+
+    /**
+     * The page to which we should forward for the user to log on.
+     */
+    private String page = "/logon.jsp";
+
+
+    // ----------------------------------------------------------- Properties
+
+
+    /**
+     * Return the bean name.
+     */
+    public String getName() {
+
+	return (this.name);
+
+    }
+
+
+    /**
+     * Set the bean name.
+     *
+     * @param name The new bean name
+     */
+    public void setName(String name) {
+
+	this.name = name;
+
+    }
+
+
+    /**
+     * Return the forward page.
+     */
+    public String getPage() {
+
+	return (this.page);
+
+    }
+
+
+    /**
+     * Set the forward page.
+     *
+     * @param page The new forward page
+     */
+    public void setPage(String page) {
+
+	this.page = page;
+
+    }
+
+
+    // ------------------------------------------------------- Public Methods
+
+
+    /**
+     * Defer our checking until the end of this tag is encountered.
+     *
+     * @exception JspException if a JSP exception has occurred
+     */
+    public int doStartTag() throws JspException {
+
+	return (SKIP_BODY);
+
+    }
+
+
+    /**
+     * Perform our logged-in user check by looking for the existence of
+     * a session scope bean under the specified name.  If this bean is not
+     * present, control is forwarded to the specified logon page.
+     *
+     * @exception JspException if a JSP exception has occurred
+     */
+    public int doEndTag() throws JspException {
+
+	// Is there a valid user logged on?
+	boolean valid = false;
+	HttpSession session = pageContext.getSession();
+	if ((session != null) && (session.getAttribute(name) != null))
+	    valid = true;
+
+	// Forward control based on the results
+	if (valid)
+	    return (EVAL_PAGE);
+	else {
+	    try {
+		pageContext.forward(page);
+	    } catch (Exception e) {
+		throw new JspException(e.toString());
+	    }
+	    return (SKIP_PAGE);
+	}
+
+    }
+
+
+    /**
+     * Release any acquired resources.
+     */
+    public void release() {
+
+        super.release();
+        this.name = Constants.USER_KEY;
+        this.page = "/logon.jsp";
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Constants.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Constants.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Constants.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/Constants.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,57 @@
+/*
+ * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+/**
+ * Manifest constants for the example application.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 54934 $ $Date: 2004-10-16 10:07:50 -0700 (Sat, 16 Oct 2004) $
+ */
+
+public final class Constants {
+
+
+    /**
+     * The package name for this application.
+     */
+    public static final String Package = "org.apache.struts.webapp.example";
+
+
+    /**
+     * The application scope attribute under which our user database
+     * is stored.
+     */
+    public static final String DATABASE_KEY = "database";
+
+
+    /**
+     * The session scope attribute under which the Subscription object
+     * currently selected by our logged-in User is stored.
+     */
+    public static final String SUBSCRIPTION_KEY = "subscription";
+
+
+    /**
+     * The session scope attribute under which the User object
+     * for the currently logged in user is stored.
+     */
+    public static final String USER_KEY = "user";
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditRegistrationAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditRegistrationAction.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditRegistrationAction.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditRegistrationAction.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,154 @@
+/*
+ * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Locale;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+
+/**
+ * Implementation of <strong>Action</strong> that populates an instance of
+ * <code>RegistrationForm</code> from the profile of the currently logged on
+ * User (if any).
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 155884 $ $Date: 2005-03-01 22:03:56 -0800 (Tue, 01 Mar 2005) $
+ */
+
+public final class EditRegistrationAction extends Action {
+
+
+    // ----------------------------------------------------- Instance Variables
+
+
+    /**
+     * The <code>Log</code> instance for this application.
+     */
+    private Log log =
+        LogFactory.getLog("org.apache.struts.webapp.Example");
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Process the specified HTTP request, and create the corresponding HTTP
+     * response (or forward to another web component that will create it).
+     * Return an <code>ActionForward</code> instance describing where and how
+     * control should be forwarded, or <code>null</code> if the response has
+     * already been completed.
+     *
+     * @param mapping The ActionMapping used to select this instance
+     * @param form The optional ActionForm bean for this request (if any)
+     * @param request The HTTP request we are processing
+     * @param response The HTTP response we are creating
+     *
+     * @exception Exception if the application business logic throws
+     *  an exception
+     */
+    public ActionForward execute(ActionMapping mapping,
+				 ActionForm form,
+				 HttpServletRequest request,
+				 HttpServletResponse response)
+	throws Exception {
+
+	// Extract attributes we will need
+	HttpSession session = request.getSession();
+	String action = request.getParameter("action");
+	if (action == null)
+	    action = "Create";
+        if (log.isDebugEnabled()) {
+            log.debug("EditRegistrationAction:  Processing " + action +
+                        " action");
+        }
+
+	// Is there a currently logged on user?
+	User user = null;
+	if (!"Create".equals(action)) {
+	    user = (User) session.getAttribute(Constants.USER_KEY);
+	    if (user == null) {
+                if (log.isDebugEnabled()) {
+                    log.debug(" User is not logged on in session "
+                              + session.getId());
+                }
+		return (mapping.findForward("logon"));
+	    }
+	}
+
+	// Populate the user registration form
+	if (form == null) {
+            if (log.isTraceEnabled()) {
+                log.trace(" Creating new RegistrationForm bean under key "
+                          + mapping.getAttribute());
+            }
+	    form = new RegistrationForm();
+            if ("request".equals(mapping.getScope()))
+                request.setAttribute(mapping.getAttribute(), form);
+            else
+                session.setAttribute(mapping.getAttribute(), form);
+	}
+	RegistrationForm regform = (RegistrationForm) form;
+	if (user != null) {
+            if (log.isTraceEnabled()) {
+                log.trace(" Populating form from " + user);
+            }
+            try {
+                PropertyUtils.copyProperties(regform, user);
+                regform.setAction(action);
+                regform.setPassword(null);
+                regform.setPassword2(null);
+            } catch (InvocationTargetException e) {
+                Throwable t = e.getTargetException();
+                if (t == null)
+                    t = e;
+                log.error("RegistrationForm.populate", t);
+                throw new ServletException("RegistrationForm.populate", t);
+            } catch (Throwable t) {
+                log.error("RegistrationForm.populate", t);
+                throw new ServletException("RegistrationForm.populate", t);
+            }
+	}
+
+        // Set a transactional control token to prevent double posting
+        if (log.isTraceEnabled()) {
+            log.trace(" Setting transactional control token");
+        }
+        saveToken(request);
+
+	// Forward control to the edit user registration page
+        if (log.isTraceEnabled()) {
+            log.trace(" Forwarding to 'success' page");
+        }
+	return (mapping.findForward("success"));
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditSubscriptionAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditSubscriptionAction.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditSubscriptionAction.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/EditSubscriptionAction.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,161 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Locale;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+
+/**
+ * Implementation of <strong>Action</strong> that populates an instance of
+ * <code>SubscriptionForm</code> from the currently specified subscription.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 155884 $ $Date: 2005-03-01 22:03:56 -0800 (Tue, 01 Mar 2005) $
+ */
+
+public final class EditSubscriptionAction extends Action {
+
+
+    // ----------------------------------------------------- Instance Variables
+
+
+    /**
+     * The <code>Log</code> instance for this application.
+     */
+    private Log log =
+        LogFactory.getLog("org.apache.struts.webapp.Example");
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Process the specified HTTP request, and create the corresponding HTTP
+     * response (or forward to another web component that will create it).
+     * Return an <code>ActionForward</code> instance describing where and how
+     * control should be forwarded, or <code>null</code> if the response has
+     * already been completed.
+     *
+     * @param mapping The ActionMapping used to select this instance
+     * @param form The optional ActionForm bean for this request (if any)
+     * @param request The HTTP request we are processing
+     * @param response The HTTP response we are creating
+     *
+     * @exception Exception if the application business logic throws
+     *  an exception
+     */
+    public ActionForward execute(ActionMapping mapping,
+				 ActionForm form,
+				 HttpServletRequest request,
+				 HttpServletResponse response)
+	throws Exception {
+
+	// Extract attributes we will need
+	Locale locale = getLocale(request);
+	HttpSession session = request.getSession();
+	String action = request.getParameter("action");
+	if (action == null) {
+	    action = "Create";
+        }
+	String host = request.getParameter("host");
+        if (log.isDebugEnabled()) {
+            log.debug("EditSubscriptionAction:  Processing " + action +
+                      " action");
+        }
+
+	// Is there a currently logged on user?
+	User user = (User) session.getAttribute(Constants.USER_KEY);
+	if (user == null) {
+            if (log.isTraceEnabled()) {
+                log.trace(" User is not logged on in session "
+                          + session.getId());
+            }
+	    return (mapping.findForward("logon"));
+	}
+
+	// Identify the relevant subscription
+	Subscription subscription =
+            user.findSubscription(request.getParameter("host"));
+	if ((subscription == null) && !action.equals("Create")) {
+            if (log.isTraceEnabled()) {
+                log.trace(" No subscription for user " +
+                          user.getUsername() + " and host " + host);
+            }
+	    return (mapping.findForward("failure"));
+	}
+        if (subscription != null) {
+            session.setAttribute(Constants.SUBSCRIPTION_KEY, subscription);
+        }
+
+	// Populate the subscription form
+	if (form == null) {
+            if (log.isTraceEnabled()) {
+                log.trace(" Creating new SubscriptionForm bean under key "
+                          + mapping.getAttribute());
+            }
+	    form = new SubscriptionForm();
+            if ("request".equals(mapping.getScope())) {
+                request.setAttribute(mapping.getAttribute(), form);
+            } else {
+                session.setAttribute(mapping.getAttribute(), form);
+            }
+	}
+	SubscriptionForm subform = (SubscriptionForm) form;
+	subform.setAction(action);
+        if (!action.equals("Create")) {
+            if (log.isTraceEnabled()) {
+                log.trace(" Populating form from " + subscription);
+            }
+            try {
+                PropertyUtils.copyProperties(subform, subscription);
+                subform.setAction(action);
+            } catch (InvocationTargetException e) {
+                Throwable t = e.getTargetException();
+                if (t == null)
+                    t = e;
+                log.error("SubscriptionForm.populate", t);
+                throw new ServletException("SubscriptionForm.populate", t);
+            } catch (Throwable t) {
+                log.error("SubscriptionForm.populate", t);
+                throw new ServletException("SubscriptionForm.populate", t);
+            }
+        }
+
+	// Forward control to the edit subscription page
+        if (log.isTraceEnabled()) {
+            log.trace(" Forwarding to 'success' page");
+        }
+	return (mapping.findForward("success"));
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ExpiredPasswordException.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ExpiredPasswordException.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ExpiredPasswordException.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/ExpiredPasswordException.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+import org.apache.struts.util.ModuleException;
+
+/**
+ * Example of an application-specific exception for which a handler
+ * can be configured.
+ */
+
+
+public class ExpiredPasswordException extends ModuleException {
+
+
+    /**
+     * Construct a new instance of this exception for the specified username.
+     *
+     * @param username Username whose password has expired
+     */
+    public ExpiredPasswordException(String username) {
+        super("error.password.expired", username);
+    }
+
+
+}
+

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/IndexBacking.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/IndexBacking.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/IndexBacking.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/IndexBacking.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import javax.faces.context.FacesContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * <p>Backing bean for the <code>index.jsp</code> page.</p>
+ */
+
+public class IndexBacking extends AbstractBacking {
+
+
+    // -------------------------------------------------------- Static Variables
+
+
+    private static final Log log = LogFactory.getLog(IndexBacking.class);
+
+
+    // ----------------------------------------------------------------- Actions
+
+
+    /**
+     * <p>Forward to the <em>Create Registration</em> action.</p>
+     */
+    public String create() {
+
+        if (log.isDebugEnabled()) {
+            log.debug("create()");
+        }
+        FacesContext context = FacesContext.getCurrentInstance();
+        StringBuffer sb = registration(context);
+        sb.append("?action=Create");
+        forward(context, sb.toString());
+        return (null);
+
+    }
+
+
+    /**
+     * <p>Forward to the <em>Logon</em> page.</p>
+     */
+    public String logon() {
+
+        if (log.isDebugEnabled()) {
+            log.debug("logon()");
+        }
+        return "logon";
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkSubscriptionTag.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkSubscriptionTag.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkSubscriptionTag.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkSubscriptionTag.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,130 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+
+
+/**
+ * Generate a URL-encoded hyperlink to the specified URI, with
+ * associated query parameters selecting a specified Subscription.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 54934 $ $Date: 2004-10-16 10:07:50 -0700 (Sat, 16 Oct 2004) $
+ */
+
+public class LinkSubscriptionTag extends UIComponentTag {
+
+
+    // -------------------------------------------------------------- Attributes
+
+
+    /**
+     * The attribute name.
+     */
+    protected String name = "subscription";
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+    /**
+     * The context-relative URI.
+     */
+    protected String page = null;
+
+    public void setPage(String page) {
+        this.page = page;
+    }
+
+
+    // ---------------------------------------------------------- Public Methods
+
+
+    /**
+     * Return the component type for this tag.</p>
+     */
+    public String getComponentType() {
+
+        return ("javax.faces.Output");
+
+    }
+
+
+    /**
+     * <p>Return the renderer type associated with this tag.</p>
+     */
+    public String getRendererType() {
+
+        return ("org.apache.struts.webapp.example.LinkSubscription");
+
+    }
+
+
+    /**
+     * <p>Release resources allocated to this tag instance.</p>
+     */
+    public void release() {
+
+        super.release();
+        this.name = "subscription";
+        this.page = null;
+
+    }
+
+
+    // ------------------------------------------------------- Protected Methods
+
+
+    /**
+     * <p>Override attributes set on this tag instance.</p>
+     *
+     * @param component Component whose attributes should be overridden
+     */
+    protected void setProperties(UIComponent component) {
+
+        super.setProperties(component);
+        FacesContext context = getFacesContext();
+        if (name != null) {
+            if (isValueReference(name)) {
+                ValueBinding vb =
+                    context.getApplication().createValueBinding(name);
+                component.setValueBinding("name", vb);
+            } else {
+                component.getAttributes().put("name", name);
+            }
+        }
+        if (page != null) {
+            if (isValueReference(page)) {
+                ValueBinding vb =
+                    context.getApplication().createValueBinding(page);
+                component.setValueBinding("page", vb);
+            } else {
+                component.getAttributes().put("page", page);
+            }
+        }
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkUserTag.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkUserTag.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkUserTag.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LinkUserTag.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,202 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.apache.struts.util.MessageResources;
+import org.apache.struts.util.ResponseUtils;
+
+
+/**
+ * Generate a URL-encoded hyperlink to the specified URI, with
+ * associated query parameters selecting a specified User.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 54934 $ $Date: 2004-10-16 10:07:50 -0700 (Sat, 16 Oct 2004) $
+ */
+
+public class LinkUserTag extends TagSupport {
+
+
+    // ------------------------------------------------------ Instance Variables
+
+
+    /**
+     * The hyperlink URI.
+     */
+    protected String page = null;
+
+
+    /**
+     * The message resources for this package.
+     */
+    protected static MessageResources messages =
+	MessageResources.getMessageResources
+	("org.apache.struts.webapp.example.ApplicationResources");
+
+
+    /**
+     * The attribute name.
+     */
+    private String name = "user";
+
+
+    // ------------------------------------------------------------- Properties
+
+
+    /**
+     * Return the hyperlink URI.
+     */
+    public String getPage() {
+
+	return (this.page);
+
+    }
+
+
+    /**
+     * Set the hyperlink URI.
+     *
+     * @param page Set the hyperlink URI
+     */
+    public void setPage(String page) {
+
+	this.page = page;
+
+    }
+
+
+    /**
+     * Return the attribute name.
+     */
+    public String getName() {
+
+	return (this.name);
+
+    }
+
+
+    /**
+     * Set the attribute name.
+     *
+     * @param name The new attribute name
+     */
+    public void setName(String name) {
+
+	this.name = name;
+
+    }
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Render the beginning of the hyperlink.
+     *
+     * @exception JspException if a JSP exception has occurred
+     */
+    public int doStartTag() throws JspException {
+
+	// Generate the URL to be encoded
+        HttpServletRequest request =
+            (HttpServletRequest) pageContext.getRequest();
+        StringBuffer url = new StringBuffer(request.getContextPath());
+        url.append(page);
+	User user = null;
+	try {
+	    user = (User) pageContext.findAttribute(name);
+        } catch (ClassCastException e) {
+	    user = null;
+	}
+	if (user == null)
+	    throw new JspException
+	        (messages.getMessage("linkUser.noUser", name));
+	if (page.indexOf("?") < 0)
+	    url.append("?");
+	else
+	    url.append("&");
+	url.append("username=");
+	url.append(ResponseUtils.filter(user.getUsername()));
+
+	// Generate the hyperlink start element
+	HttpServletResponse response =
+	  (HttpServletResponse) pageContext.getResponse();
+	StringBuffer results = new StringBuffer("<a href=\"");
+	results.append(response.encodeURL(url.toString()));
+	results.append("\">");
+
+	// Print this element to our output writer
+	JspWriter writer = pageContext.getOut();
+	try {
+	    writer.print(results.toString());
+	} catch (IOException e) {
+	    throw new JspException
+		(messages.getMessage("linkUser.io", e.toString()));
+	}
+
+	// Evaluate the body of this tag
+	return (EVAL_BODY_INCLUDE);
+
+    }
+
+
+
+    /**
+     * Render the end of the hyperlink.
+     *
+     * @exception JspException if a JSP exception has occurred
+     */
+    public int doEndTag() throws JspException {
+
+
+	// Print the ending element to our output writer
+	JspWriter writer = pageContext.getOut();
+	try {
+	    writer.print("</a>");
+	} catch (IOException e) {
+	    throw new JspException
+	        (messages.getMessage("link.io", e.toString()));
+	}
+
+	return (EVAL_PAGE);
+
+    }
+
+
+    /**
+     * Release any acquired resources.
+     */
+    public void release() {
+
+        super.release();
+        this.page = null;
+        this.name = "user";
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogoffAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogoffAction.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogoffAction.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogoffAction.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,104 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.util.Locale;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+
+/**
+ * Implementation of <strong>Action</strong> that processes a
+ * user logoff.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 155884 $ $Date: 2005-03-01 22:03:56 -0800 (Tue, 01 Mar 2005) $
+ */
+
+public final class LogoffAction extends Action {
+
+
+    // ----------------------------------------------------- Instance Variables
+
+
+    /**
+     * The <code>Log</code> instance for this application.
+     */
+    private Log log =
+        LogFactory.getLog("org.apache.struts.webapp.Example");
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Process the specified HTTP request, and create the corresponding HTTP
+     * response (or forward to another web component that will create it).
+     * Return an <code>ActionForward</code> instance describing where and how
+     * control should be forwarded, or <code>null</code> if the response has
+     * already been completed.
+     *
+     * @param mapping The ActionMapping used to select this instance
+     * @param form The optional ActionForm bean for this request (if any)
+     * @param request The HTTP request we are processing
+     * @param response The HTTP response we are creating
+     *
+     * @exception Exception if business logic throws an exception
+     */
+    public ActionForward execute(ActionMapping mapping,
+				 ActionForm form,
+				 HttpServletRequest request,
+				 HttpServletResponse response)
+	throws Exception {
+
+	// Extract attributes we will need
+	Locale locale = getLocale(request);
+	HttpSession session = request.getSession();
+	User user = (User) session.getAttribute(Constants.USER_KEY);
+
+	// Process this user logoff
+	if (user != null) {
+            if (log.isDebugEnabled()) {
+                log.debug("LogoffAction: User '" + user.getUsername() +
+                          "' logged off in session " + session.getId());
+            }
+	} else {
+            if (log.isDebugEnabled()) {
+                log.debug("LogoffActon: User logged off in session " +
+                          session.getId());
+            }
+	}
+	session.removeAttribute(Constants.SUBSCRIPTION_KEY);
+	session.removeAttribute(Constants.USER_KEY);
+	session.invalidate();
+
+	// Forward control to the specified success URI
+	return (mapping.findForward("success"));
+
+    }
+
+
+}

Added: struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonAction.java?rev=392100&view=auto
==============================================================================
--- struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonAction.java (added)
+++ struts/action/trunk/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/LogonAction.java Thu Apr  6 15:31:36 2006
@@ -0,0 +1,164 @@
+/*
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.struts.webapp.example;
+
+
+import java.util.Locale;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import org.apache.struts.util.ModuleException;
+import org.apache.commons.beanutils.PropertyUtils;
+
+
+/**
+ * Implementation of <strong>Action</strong> that validates a user logon.
+ *
+ * @author Craig R. McClanahan
+ * @version $Rev: 155884 $ $Date: 2005-03-01 22:03:56 -0800 (Tue, 01 Mar 2005) $
+ */
+
+public final class LogonAction extends Action {
+
+
+    // ----------------------------------------------------- Instance Variables
+
+
+    /**
+     * The <code>Log</code> instance for this application.
+     */
+    private Log log =
+        LogFactory.getLog("org.apache.struts.webapp.Example");
+
+
+    // --------------------------------------------------------- Public Methods
+
+
+    /**
+     * Process the specified HTTP request, and create the corresponding HTTP
+     * response (or forward to another web component that will create it).
+     * Return an <code>ActionForward</code> instance describing where and how
+     * control should be forwarded, or <code>null</code> if the response has
+     * already been completed.
+     *
+     * @param mapping The ActionMapping used to select this instance
+     * @param form The optional ActionForm bean for this request (if any)
+     * @param request The HTTP request we are processing
+     * @param response The HTTP response we are creating
+     *
+     * @exception Exception if business logic throws an exception
+     */
+    public ActionForward execute(ActionMapping mapping,
+				 ActionForm form,
+				 HttpServletRequest request,
+				 HttpServletResponse response)
+	throws Exception {
+
+	// Extract attributes we will need
+	Locale locale = getLocale(request);
+	User user = null;
+
+	// Validate the request parameters specified by the user
+	ActionErrors errors = new ActionErrors();
+	String username = (String)
+            PropertyUtils.getSimpleProperty(form, "username");
+        String password = (String)
+            PropertyUtils.getSimpleProperty(form, "password");
+	UserDatabase database = (UserDatabase)
+	  servlet.getServletContext().getAttribute(Constants.DATABASE_KEY);
+	if (database == null)
+            errors.add(ActionErrors.GLOBAL_ERROR,
+                       new ActionError("error.database.missing"));
+	else {
+	    user = getUser(database, username);
+	    if ((user != null) && !user.getPassword().equals(password))
+		user = null;
+	    if (user == null)
+                errors.add(ActionErrors.GLOBAL_ERROR,
+                           new ActionError("error.password.mismatch"));
+	}
+
+	// Report any errors we have discovered back to the original form
+	if (!errors.isEmpty()) {
+	    saveErrors(request, errors);
+            return (mapping.getInputForward());
+	}
+
+	// Save our logged-in user in the session
+	HttpSession session = request.getSession();
+	session.setAttribute(Constants.USER_KEY, user);
+        if (log.isDebugEnabled()) {
+            log.debug("LogonAction: User '" + user.getUsername() +
+                      "' logged on in session " + session.getId());
+        }
+
+        // Remove the obsolete form bean
+	if (mapping.getAttribute() != null) {
+            if ("request".equals(mapping.getScope()))
+                request.removeAttribute(mapping.getAttribute());
+            else
+                session.removeAttribute(mapping.getAttribute());
+        }
+
+	// Forward control to the specified success URI
+	return (mapping.findForward("success"));
+
+    }
+
+
+    // ------------------------------------------------------ Protected Methods
+
+
+    /**
+     * Look up the user, throwing an exception to simulate business logic
+     * rule exceptions.
+     *
+     * @param database Database in which to look up the user
+     * @param username Username specified on the logon form
+     *
+     * @exception AppException if a business logic rule is violated
+     */
+    public User getUser(UserDatabase database, String username)
+        throws ModuleException {
+
+        // Force an ArithmeticException which can be handled explicitly
+        if ("arithmetic".equals(username)) {
+            throw new ArithmeticException();
+        }
+
+        // Force an application-specific exception which can be handled
+        if ("expired".equals(username)) {
+            throw new ExpiredPasswordException(username);
+        }
+
+        // Look up and return the specified user
+        return (database.findUser(username));
+
+    }
+
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message