From 3464d4d16dc6a0040e3373e2c6799dcfc99acac4 Mon Sep 17 00:00:00 2001 From: Ted Nathan Husted Date: Tue, 5 Sep 2006 19:10:19 +0000 Subject: [PATCH] WW-1340 In MailReader, Update naming conventions to use "Login" rather than "Logon". git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@440443 13f79535-47bb-0310-9956-ffa450edef68 --- .../mailreader2/{Logon.java => Login.java} | 6 +- .../mailreader2/{Logoff.java => Logout.java} | 4 +- .../main/java/mailreader2/Registration.java | 4 +- .../src/main/resources/alternate.properties | 2 +- .../src/main/resources/mailreader-default.xml | 2 +- .../src/main/resources/mailreader-support.xml | 18 +-- .../mailreader2/MailreaderSupport.properties | 8 +- .../MailreaderSupport_ja.properties | 6 +- .../MailreaderSupport_ru.properties | 6 +- .../webapp/{pages => }/ChangePassword.jsp | 2 +- .../src/main/webapp/{pages => }/Error.jsp | 0 .../src/main/webapp/{pages => }/Footer.jsp | 0 .../webapp/{pages/Logon.jsp => Login.jsp} | 8 +- .../src/main/webapp/{pages => }/MainMenu.jsp | 4 +- .../main/webapp/{pages => }/Registration.jsp | 0 .../main/webapp/{pages => }/Subscription.jsp | 0 .../src/main/webapp/{pages => }/Welcome.jsp | 4 +- .../src/main/webapp/{pages => }/tour.html | 124 +++++++++--------- 18 files changed, 99 insertions(+), 99 deletions(-) rename apps/mailreader/src/main/java/mailreader2/{Logon.java => Login.java} (87%) rename apps/mailreader/src/main/java/mailreader2/{Logoff.java => Logout.java} (87%) rename apps/mailreader/src/main/webapp/{pages => }/ChangePassword.jsp (92%) rename apps/mailreader/src/main/webapp/{pages => }/Error.jsp (100%) rename apps/mailreader/src/main/webapp/{pages => }/Footer.jsp (100%) rename apps/mailreader/src/main/webapp/{pages/Logon.jsp => Login.jsp} (78%) rename apps/mailreader/src/main/webapp/{pages => }/MainMenu.jsp (89%) rename apps/mailreader/src/main/webapp/{pages => }/Registration.jsp (100%) rename apps/mailreader/src/main/webapp/{pages => }/Subscription.jsp (100%) rename apps/mailreader/src/main/webapp/{pages => }/Welcome.jsp (93%) rename apps/mailreader/src/main/webapp/{pages => }/tour.html (95%) diff --git a/apps/mailreader/src/main/java/mailreader2/Logon.java b/apps/mailreader/src/main/java/mailreader2/Login.java similarity index 87% rename from apps/mailreader/src/main/java/mailreader2/Logon.java rename to apps/mailreader/src/main/java/mailreader2/Login.java index 0c8fa735e..3ea958cf9 100644 --- a/apps/mailreader/src/main/java/mailreader2/Logon.java +++ b/apps/mailreader/src/main/java/mailreader2/Login.java @@ -1,5 +1,5 @@ /* - * $Id: LogonAction.java 360442 2005-12-31 20:10:04Z husted $ + * $Id: LoginAction.java 360442 2005-12-31 20:10:04Z husted $ * * Copyright 2000-2004 Apache Software Foundation * @@ -22,9 +22,9 @@ import org.apache.struts.apps.mailreader.dao.User; import org.apache.struts.apps.mailreader.dao.ExpiredPasswordException; /** - *

Validate a user logon.

+ *

Validate a user login.

*/ -public final class Logon extends MailreaderSupport { +public final class Login extends MailreaderSupport { public String execute() throws ExpiredPasswordException { diff --git a/apps/mailreader/src/main/java/mailreader2/Logoff.java b/apps/mailreader/src/main/java/mailreader2/Logout.java similarity index 87% rename from apps/mailreader/src/main/java/mailreader2/Logoff.java rename to apps/mailreader/src/main/java/mailreader2/Logout.java index 4cbafa55a..468954a8f 100644 --- a/apps/mailreader/src/main/java/mailreader2/Logoff.java +++ b/apps/mailreader/src/main/java/mailreader2/Logout.java @@ -1,5 +1,5 @@ /* - * $Id: LogonAction.java 360442 2005-12-31 20:10:04Z husted $ + * $Id: LoginAction.java 360442 2005-12-31 20:10:04Z husted $ * * Copyright 2000-2004 Apache Software Foundation * @@ -21,7 +21,7 @@ package mailreader2; /** *

Log user out of the current session.

*/ -public class Logoff extends MailreaderSupport { +public class Logout extends MailreaderSupport { public String execute() { diff --git a/apps/mailreader/src/main/java/mailreader2/Registration.java b/apps/mailreader/src/main/java/mailreader2/Registration.java index 3ef339459..e87fdf2c5 100644 --- a/apps/mailreader/src/main/java/mailreader2/Registration.java +++ b/apps/mailreader/src/main/java/mailreader2/Registration.java @@ -9,9 +9,9 @@ import org.apache.struts.apps.mailreader.dao.User; public class Registration extends MailreaderSupport { /** - *

Double check that there is not a valid User logon.

+ *

Double check that there is not a valid User login.

* - * @return True if there is not a valid User logon + * @return True if there is not a valid User login */ private boolean isCreating() { User user = getUser(); diff --git a/apps/mailreader/src/main/resources/alternate.properties b/apps/mailreader/src/main/resources/alternate.properties index 45f4dd5f8..03dbf277b 100644 --- a/apps/mailreader/src/main/resources/alternate.properties +++ b/apps/mailreader/src/main/resources/alternate.properties @@ -1,3 +1,3 @@ password=Enter your Password here ==> -struts.logo.path=/struts-power.gif +struts.logo.path=struts-power.gif struts.logo.alt=Powered by Struts diff --git a/apps/mailreader/src/main/resources/mailreader-default.xml b/apps/mailreader/src/main/resources/mailreader-default.xml index bedba1cae..973551b39 100644 --- a/apps/mailreader/src/main/resources/mailreader-default.xml +++ b/apps/mailreader/src/main/resources/mailreader-default.xml @@ -33,7 +33,7 @@ /pages/Error.jsp /pages/Error.jsp - Logon!input + Login!input diff --git a/apps/mailreader/src/main/resources/mailreader-support.xml b/apps/mailreader/src/main/resources/mailreader-support.xml index ef79ea6a6..6e5fd8cb3 100644 --- a/apps/mailreader/src/main/resources/mailreader-support.xml +++ b/apps/mailreader/src/main/resources/mailreader-support.xml @@ -7,21 +7,21 @@ - /pages/tour.html + /tour.html - /pages/Welcome.jsp + /Welcome.jsp - + Welcome - - /pages/Logon.jsp + + /Login.jsp Welcome MainMenu ChangePassword @@ -32,25 +32,25 @@ - /pages/Registration.jsp + /Registration.jsp MainMenu - /pages/Subscription.jsp + /Subscription.jsp Registration!input - /pages/Subscription.jsp + /Subscription.jsp Registration!input - /pages/{1}.jsp + /{1}.jsp diff --git a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport.properties b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport.properties index df33d47cc..6fd171ba2 100644 --- a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport.properties +++ b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport.properties @@ -9,7 +9,7 @@ change.message=Your password has expired. Please ask the system administrator t change.try=Try Again change.title=Password Has Expired database.load=Cannot load database from {0} -error.database.missing=User database is missing, cannot validate logon credentials +error.database.missing=User database is missing, cannot validate login credentials error.fromAddress.format=Invalid format for From Address error.fromAddress.required=From Address is required error.fullName.required=Full Name is required @@ -39,7 +39,7 @@ 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.login=Log on to the MailReader Demonstration Application index.registration=Register with the MailReader Demonstration Application index.title=MailReader Demonstration Application index.tour=A Walking Tour of the MailReader Demonstration Application @@ -47,9 +47,9 @@ 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.title=MailReader Demonstration Application - Logon +login.title=MailReader Demonstration Application - Login mainMenu.heading=Main Menu Options for -mainMenu.logoff=Log off MailReader Demonstration Application +mainMenu.logout=Log off MailReader Demonstration Application mainMenu.registration=Edit your user registration profile mainMenu.title=MailReader Demonstration Application - Main Menu option.imap=IMAP Protocol diff --git a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ja.properties b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ja.properties index df4f174e4..6bb198a05 100644 --- a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ja.properties +++ b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ja.properties @@ -36,7 +36,7 @@ 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.login=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 @@ -44,9 +44,9 @@ 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 +login.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.logout=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 diff --git a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ru.properties b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ru.properties index b80ecd55c..e7d1772f5 100644 --- a/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ru.properties +++ b/apps/mailreader/src/main/resources/mailreader2/MailreaderSupport_ru.properties @@ -36,7 +36,7 @@ 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.login=\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' @@ -44,9 +44,9 @@ linkSubscription.io=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u043 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. +login.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.logout=\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 diff --git a/apps/mailreader/src/main/webapp/pages/ChangePassword.jsp b/apps/mailreader/src/main/webapp/ChangePassword.jsp similarity index 92% rename from apps/mailreader/src/main/webapp/pages/ChangePassword.jsp rename to apps/mailreader/src/main/webapp/ChangePassword.jsp index 667834d9f..7743bf1b1 100644 --- a/apps/mailreader/src/main/webapp/pages/ChangePassword.jsp +++ b/apps/mailreader/src/main/webapp/ChangePassword.jsp @@ -16,7 +16,7 @@

- "> + ">

diff --git a/apps/mailreader/src/main/webapp/pages/Error.jsp b/apps/mailreader/src/main/webapp/Error.jsp similarity index 100% rename from apps/mailreader/src/main/webapp/pages/Error.jsp rename to apps/mailreader/src/main/webapp/Error.jsp diff --git a/apps/mailreader/src/main/webapp/pages/Footer.jsp b/apps/mailreader/src/main/webapp/Footer.jsp similarity index 100% rename from apps/mailreader/src/main/webapp/pages/Footer.jsp rename to apps/mailreader/src/main/webapp/Footer.jsp diff --git a/apps/mailreader/src/main/webapp/pages/Logon.jsp b/apps/mailreader/src/main/webapp/Login.jsp similarity index 78% rename from apps/mailreader/src/main/webapp/pages/Logon.jsp rename to apps/mailreader/src/main/webapp/Login.jsp index 4c8ce0bd9..39ca9e049 100644 --- a/apps/mailreader/src/main/webapp/pages/Logon.jsp +++ b/apps/mailreader/src/main/webapp/Login.jsp @@ -4,15 +4,15 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <s:text name="logon.title"/> + <s:text name="login.title"/> " rel="stylesheet" type="text/css"/> - + - + @@ -21,7 +21,7 @@ - diff --git a/apps/mailreader/src/main/webapp/pages/MainMenu.jsp b/apps/mailreader/src/main/webapp/MainMenu.jsp similarity index 89% rename from apps/mailreader/src/main/webapp/pages/MainMenu.jsp rename to apps/mailreader/src/main/webapp/MainMenu.jsp index 8c4c98a59..4b96feb01 100644 --- a/apps/mailreader/src/main/webapp/pages/MainMenu.jsp +++ b/apps/mailreader/src/main/webapp/MainMenu.jsp @@ -17,8 +17,8 @@ -
  • "> - +
  • "> + diff --git a/apps/mailreader/src/main/webapp/pages/Registration.jsp b/apps/mailreader/src/main/webapp/Registration.jsp similarity index 100% rename from apps/mailreader/src/main/webapp/pages/Registration.jsp rename to apps/mailreader/src/main/webapp/Registration.jsp diff --git a/apps/mailreader/src/main/webapp/pages/Subscription.jsp b/apps/mailreader/src/main/webapp/Subscription.jsp similarity index 100% rename from apps/mailreader/src/main/webapp/pages/Subscription.jsp rename to apps/mailreader/src/main/webapp/Subscription.jsp diff --git a/apps/mailreader/src/main/webapp/pages/Welcome.jsp b/apps/mailreader/src/main/webapp/Welcome.jsp similarity index 93% rename from apps/mailreader/src/main/webapp/pages/Welcome.jsp rename to apps/mailreader/src/main/webapp/Welcome.jsp index 9b307eaca..a707fba4f 100644 --- a/apps/mailreader/src/main/webapp/pages/Welcome.jsp +++ b/apps/mailreader/src/main/webapp/Welcome.jsp @@ -16,8 +16,8 @@

    Language Options

    diff --git a/apps/mailreader/src/main/webapp/pages/tour.html b/apps/mailreader/src/main/webapp/tour.html similarity index 95% rename from apps/mailreader/src/main/webapp/pages/tour.html rename to apps/mailreader/src/main/webapp/tour.html index 35c8ccc70..4277e16e8 100644 --- a/apps/mailreader/src/main/webapp/pages/tour.html +++ b/apps/mailreader/src/main/webapp/tour.html @@ -62,18 +62,18 @@
    • - Logon + Login
    • @@ -450,7 +450,7 @@ public class Welcome extends MailreaderSupport {
       <global-results>
         <result name="error">/pages/Error.jsp</result>
         <result name="invalid.token">/pages/Error.jsp</result>
      -  <result name="login" type="redirect-action">Logon!input</result>
      +  <result name="login" type="redirect-action">Login!input</result>
       </global-results>

      @@ -534,7 +534,7 @@ public class Welcome extends MailreaderSupport {
      Message Resource entries used by the Welcome page
      index.heading=MailReader Application Options
      -index.logon=Log on to the MailReader Application
      +index.login=Log on to the MailReader Application
       index.registration=Register with the MailReader Application
       index.title=MailReader Demonstration Application
       index.tour=A Walking Tour of the MailReader Demonstration Application
      @@ -574,8 +574,8 @@ public class Welcome extends MailreaderSupport { <ul> <li><a href="<s:url action="Registration!input"/>"><s:text name="index.registration"/></a></li> - <li><a href="<s:url action="Logon!input"/>"><s:text - name="index.logon"/></a></li> + <li><a href="<s:url action="Login!input"/>"><s:text + name="index.login"/></a></li> </ul> <h3>Language Options</h3> @@ -693,21 +693,21 @@ public class Welcome extends MailreaderSupport { When rendered, the Welcome page lists two menu options: one to register with the application and one to log on (if you have already registered). - Let's follow the Logon link first. + Let's follow the Login link first.

      -

      Logon

      +

      Login

      - If you choose the Logon link, and all goes well, the Logon action forwards - control to the Logon page. + If you choose the Login link, and all goes well, the Login action forwards + control to the Login page.

      -

      Logon Page

      +

      Login Page

      - The Logon page displays a form that accepts a username and password. - You can use the default username and password to logon + The Login page displays a form that accepts a username and password. + You can use the default username and password to login (user and pass), if you like. Try omitting or misspelling the username and password in various combinations to see how the application reacts. @@ -722,18 +722,18 @@ public class Welcome extends MailreaderSupport { "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <title><s:text name="logon.title"/></title> + <title><s:text name="login.title"/></title> <link href="<s:url value="/css/mailreader.css"/>" rel="stylesheet" type="text/css"/> </head> - <body onLoad="self.focus();document.Logon.username.focus()"> + <body onLoad="self.focus();document.Login.username.focus()"> <s:actionerror/> - <s:form action="Logon" validate="true"> + <s:form action="Login" validate="true"> <s:textfield label="%{getText('username')}" name="username"/> <s:password label="%{getText('password')}" name="password"/> <s:submit value="%{getText('button.save')}"/> <s:reset value="%{getText('button.reset')}"/> - <s:submit action="Logon!cancel" onclick="form.onsubmit=null" + <s:submit action="Login!cancel" onclick="form.onsubmit=null" value="%{getText('button.cancel')}"/> </s:form> <jsp:include page="Footer.jsp"/> @@ -742,12 +742,12 @@ public class Welcome extends MailreaderSupport {


      - We already saw some of the tags used by the Logon page on the Welcome page. + We already saw some of the tags used by the Login page on the Welcome page. Let's focus on the new tags.

      - The first new tag on the Logon page is actionerrors. + The first new tag on the Login page is actionerrors. Most of the possible validation errors are related to a single field. If you don't enter a username, the framework can place an error message near the tag prompting you to @@ -803,10 +803,10 @@ public class Welcome extends MailreaderSupport {


      <tr>
         <td class="tdLabel">
      -    <label for="Logon_username" class="label">Username:</label>
      +    <label for="Login_username" class="label">Username:</label>
         </td>
         <td>
      -    <input type="text" name="username" value="" id="Logon_username"/>
      +    <input type="text" name="username" value="" id="Login_username"/>
         </td>
       </tr>

      @@ -875,14 +875,14 @@ public class Welcome extends MailreaderSupport { The second submit button is more interesting.

      -
        <s:submit action="Logon!cancel" onclick="form.onsubmit=null"
      +
        <s:submit action="Login!cancel" onclick="form.onsubmit=null"
           value="%{getText('button.cancel')}"/>
       

      Here we are creating the Cancel button for the form. - The button's attribute action="Logon!cancel" - tells the framework to submit to the Logon's "cancel" method + The button's attribute action="Login!cancel" + tells the framework to submit to the Login's "cancel" method instead of the usual "execute" method. The onclick="form.onsubmit=null" script defeats client-side validation. On the server side, "cancel" is on a special list of methods that bypass validation, @@ -911,7 +911,7 @@ public class Welcome extends MailreaderSupport { the "validation" file.

      -

      Logon-validation.xml +

      Login-validation.xml

      @@ -921,11 +921,11 @@ public class Welcome extends MailreaderSupport {

      The validation framework is configured through another XML document, the - Logon-validation.xml. + Login-validation.xml.


      -
      Validation file for Logon Action
      +
      Validation file for Login Action
      <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
         "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
       <validators>
      @@ -976,19 +976,19 @@ public class Welcome extends MailreaderSupport {
       

      --> -

      Logon Action

      +

      Login Action

      - If validation passes, the framework invokes the "execute" method of the Logon Action. - The actual Logon Action is brief, since most of the functionality derives + If validation passes, the framework invokes the "execute" method of the Login Action. + The actual Login Action is brief, since most of the functionality derives from the base class, MailreaderSupport.


      -
      Logon.java
      +
      Login.java
      package mailreader2;
       import org.apache.struts.apps.mailreader.dao.User;
      -public final class Logon extends MailreaderSupport {
      +public final class Login extends MailreaderSupport {
       public String execute() throws ExpiredPasswordException {
         User user = findUser(getUsername(), getPassword());
         if (user != null) {
      @@ -1003,7 +1003,7 @@ public String execute() throws ExpiredPasswordException {
       

      - Logon lays out what we do to authenticate a user. + Login lays out what we do to authenticate a user. We try to find the user using the credentials provided. If the user is found, we cache a reference. If the user is not found, we return "input" so the client can try again. @@ -1099,7 +1099,7 @@ public void setPassword(String password) {

      When "findUser" returns, - the Logon Action looks to see if a valid (non-null) User object is returned. + the Login Action looks to see if a valid (non-null) User object is returned. A valid User is passed to the User property. Although it is still a JavaBean property, the User property is not implemented in quite the same way as Username and Password. @@ -1213,7 +1213,7 @@ public void setSession(Map value) { If a valid User is not found, or the password doesn't match, the "findUser" method invokes the addFieldError method to note the problem. - When "findUser" returns, the Logon Action checks for errors, + When "findUser" returns, the Login Action checks for errors, and then it returns either INPUT or SUCCESS.

      @@ -1241,29 +1241,29 @@ public void setSession(Map value) {

      - But, what happens if Logon returns INPUT instead of SUCCESS. + But, what happens if Login returns INPUT instead of SUCCESS. How does the framework know what to do next?

      To answer that question, we need to turn back to the Struts configuration - and look at how Logon is declared. + and look at how Login is declared.

      -

      Logon Configuration

      +

      Login Configuration

      - The Logon action element outlines how the Logon workflow operates, + The Login action element outlines how the Login workflow operates, including what to do when the Action returns "input", or the default result name "success".


      -
      mailreader-support.xml Logon
      -
      <action name="Logon!*" class="mailreader2.Logon" method="{1}">
      -  <result name="input">/pages/Logon.jsp</result>
      +
      mailreader-support.xml Login
      +
      <action name="Login!*" class="mailreader2.Login" method="{1}">
      +  <result name="input">/pages/Login.jsp</result>
         <result name="cancel" type="redirect-action">Welcome</result>
         <result type="redirect-action">MainMenu</result>
         <result name="expired" type="chain">ChangePassword</result>
      @@ -1275,14 +1275,14 @@ public void setSession(Map value) {
       

      - You might notice that the name of the Logon action element is not "Logon" - but "Logon!*". + You might notice that the name of the Login action element is not "Login" + but "Login!*". The asterisk is a special "wildcard" notation that tells the framework to match any series of character at this point. In the method attribute, the "{1}" notation indicates that framework should substitute whatever characters match the asterisk at runtime. - When we cite actions like "Logon!cancel" or "Logon!input", + When we cite actions like "Login!cancel" or "Login!input", the framework matches "cancel" or "input" with the wildcard and fills in the blanks.

      @@ -1304,19 +1304,19 @@ public void setSession(Map value) { Using wildcards with a exclamation point (or "bang") is not the only way we can use wilcards to invoke methods. If we wanted to use actions like "inputLogin", - we could move the asterisk and use an action name like "*Logon". + we could move the asterisk and use an action name like "*Login".

      - Within the Logon action element, the first result element is named "input". + Within the Login action element, the first result element is named "input". If validation or authentification fail, the Action class will return "input" and the framework will transfer control to the - "Logon.jsp" page. + "Login.jsp" page.

      The second result element is named cancel. - If someone presses the cancel button on the Logon page, + If someone presses the cancel button on the Login page, the Action class will return "cancel", this result will be selected, and the framework will issue a redirect to the Welcome action.

      @@ -1324,7 +1324,7 @@ public void setSession(Map value) {

      The third result has no name, so it will be called if the default success token is returned. - So, if the Logon succeeds, + So, if the Login succeeds, control will transfer to the MainMenu action.

      @@ -1397,7 +1397,7 @@ public void setSession(Map value) {

      - Finally, the Logon action specifies an InterceptorStack + Finally, the Login action specifies an InterceptorStack named defaultStack. If you've worked with Struts 2 or WebWork 2 before, that might seem strange, since "defaultStack" is the factory default. @@ -1406,7 +1406,7 @@ public void setSession(Map value) {

      In the MailReader application, most of the actions are only available to authenticated users. - The exceptions are the Welcome, Logon, and Register actions + The exceptions are the Welcome, Login, and Register actions which are available to everyone. To authenticate clients, the MailReader uses a custom Interceptor and a custom Interceptor stack. @@ -1444,7 +1444,7 @@ public class AuthenticationInterceptor implements Interceptor { If so, it returns normally, and the next Interceptor in the set would be invoked. If the User object is missing, the Interceptors returns "login". The framework would match "login" to the global result, - and transfer control to the Logon action. + and transfer control to the Login action.

      @@ -1519,7 +1519,7 @@ public class AuthenticationInterceptor implements Interceptor {

      Because the default interceptor stack will now authenticate the client, we need to specify the standard "defaultStack" for the three - "guest actions", Welcome, Logon, and Register. + "guest actions", Welcome, Login, and Register. Requiring authentification by default is the better practice, since it means that we won't forget to enable it when creating new actions. Meanwhile, those pesky users will ensure that we don't forget to disable @@ -1529,7 +1529,7 @@ public class AuthenticationInterceptor implements Interceptor {

      MainMenu

      - On a successful logon, the Main Menu page displays. + On a successful login, the Main Menu page displays. If you logged in using the demo account, the page title should be "Main Menu Options for John Q. User". Below this legend should be two links: @@ -1575,8 +1575,8 @@ public class AuthenticationInterceptor implements Interceptor { <s:text name="mainMenu.registration"/> </a> </li> - <li><a href="<s:url action="Logoff" />"> - <s:text name="mainMenu.logoff"/> + <li><a href="<s:url action="Logout" />"> + <s:text name="mainMenu.logout"/> </a> </ul> </body> @@ -1602,7 +1602,7 @@ public class AuthenticationInterceptor implements Interceptor {

      The customized MainMenu page offers two standard links. One is to "Edit your user registration profile". - The other is to "Logoff the MailReader Demonstration Application". + The other is to "Logout the MailReader Demonstration Application".

      Registration page @@ -2054,7 +2054,7 @@ public Subscription findSubscription(String host) { Likewise, the AuthentificationInterceptor will ensure that only clients with a valid User object can try to edit a Subscription. If the session expired, or someone bookmarked the page, - the client will be redirected to the Logon page automatically. + the client will be redirected to the Login page automatically.