Author: husted
Date: Sun Aug 13 10:37:22 2006
New Revision: 431198
URL: http://svn.apache.org/viewvc?rev=431198&view=rev
Log:
Update "profile" lab for Struts 2.
Added:
struts/sandbox/trunk/mailreader-course/struts2/profile/profile.iml
- copied, changed from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/lab-3-2.iml
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate-validation.xml
(contents, props changed)
- copied, changed from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave-validation.xml
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java
(contents, props changed)
- copied, changed from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave.java
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.properties
(contents, props changed)
- copied, changed from r431180,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/webwork.properties
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml
(contents, props changed)
- copied, changed from r431180,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/xwork.xml
Removed:
struts/sandbox/trunk/mailreader-course/struts2/profile/lab-3-2.iml
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave-validation.xml
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave.java
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/webwork.properties
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/xwork.xml
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/Login.java
struts/sandbox/trunk/mailreader-course/struts2/profile/src/test/RegisterTest.java
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Login.jsp
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Menu.jsp
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Register.jsp
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Welcome.jsp
Copied: struts/sandbox/trunk/mailreader-course/struts2/profile/profile.iml
(from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/lab-3-2.iml)
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/profile.iml?p2=struts/sandbox/trunk/mailreader-course/struts2/profile/profile.iml&p1=struts/sandbox/trunk/mailreader-course/struts2/profile/lab-3-2.iml&r1=431122&r2=431198&rev=431198&view=diff
==============================================================================
--- struts/sandbox/trunk/mailreader-course/struts2/profile/lab-3-2.iml
(original)
+++ struts/sandbox/trunk/mailreader-course/struts2/profile/profile.iml Sun Aug
13 10:37:22 2006
@@ -2,11 +2,12 @@
<module version="4" relativePaths="true" type="J2EE_WEB_MODULE"
j2ee-integration="Tomcat Server">
<component name="ModuleRootManager" />
<component name="NewModuleRootManager">
- <output
url="file://C:/opt/Apache/Tomcat-5.0/webapps/lab-3-2/WEB-INF/classes" />
+ <output
url="file://C:/opt/Apache/Tomcat-5.5/webapps/profile/WEB-INF/classes" />
<exclude-output />
- <exploded url="file://C:/opt/Apache/Tomcat-5.0/webapps/lab-3-2" />
+ <exploded url="file://C:/opt/Apache/Tomcat-5.5/webapps/profile" />
<exclude-exploded />
<content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
</content>
@@ -24,7 +25,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/webwork-2.2.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/spring-core-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -33,7 +34,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/spring-core.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/freemarker-2.3.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -42,7 +43,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/ognl.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/spring-web-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -51,7 +52,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/spring-web.jar!/" />
+ <root
url="jar://$MODULE_DIR$/../lib/struts2-api-2.0.0-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -60,7 +61,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../lib/commons-collections-3.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/ognl-2.6.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -69,7 +70,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/rife-continuations.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/spring-aop-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -78,7 +79,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/xwork-1.1.2.jar!/" />
+ <root
url="jar://$MODULE_DIR$/../lib/struts-mailreader-dao-1.3.5-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -87,7 +88,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../lib/struts-mailreader-dao-1.3.0-dev.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/commons-collections-2.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -96,7 +97,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/spring-beans.jar!/" />
+ <root
url="jar://$MODULE_DIR$/../lib/struts2-core-2.0.0-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -105,7 +106,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/commons-logging-1.0.4.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../lib/struts2-extras-2.0.0-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -114,7 +115,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/commons-digester-1.6.jar!/"
/>
+ <root url="jar://$MODULE_DIR$/../lib/commons-logging-1.0.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -123,7 +124,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/spring-context.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/commons-digester-1.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -132,7 +133,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/oscore.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/spring-context-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -141,7 +142,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/struts-taglib-1.3.0.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/xwork-2.0-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -150,7 +151,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../lib/freemarker.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/spring-beans-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -159,16 +160,26 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://C:/opt/Apache/Tomcat-5.0/common/lib/servlet-api.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/oscore-2.2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://C:/opt/Apache/Tomcat-5.5/common/lib/servlet-api.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="library" name="Tomcat 5.5"
level="application_server_libraries" />
<orderEntryProperties />
</component>
<component name="WebModuleBuildComponent">
- <setting name="EXPLODED_URL"
value="file://C:/opt/Apache/Tomcat-5.0/webapps/lab-3-2" />
+ <setting name="EXPLODED_URL"
value="file://C:/opt/Apache/Tomcat-5.5/webapps/profile" />
<setting name="EXPLODED_ENABLED" value="true" />
<setting name="JAR_URL" value="file://" />
<setting name="JAR_ENABLED" value="false" />
@@ -179,83 +190,78 @@
<component name="WebModuleProperties">
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/junit.jar" />
- <url>jar://$APPLICATION_HOME_DIR$/lib/junit.jar!/</url>
- </containerElement>
- <containerElement type="library" level="module">
- <attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/commons-collections-3.1.jar" />
- <url>jar://$MODULE_DIR$/../../lib/commons-collections-3.1.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/commons-digester-1.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/commons-digester-1.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/commons-digester-1.6.jar" />
- <url>jar://$MODULE_DIR$/../../lib/commons-digester-1.6.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/commons-logging-1.0.4.jar" />
+ <url>jar://$MODULE_DIR$/../lib/commons-logging-1.0.4.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/commons-logging-1.0.4.jar" />
- <url>jar://$MODULE_DIR$/../../lib/commons-logging-1.0.4.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/freemarker-2.3.4.jar" />
+ <url>jar://$MODULE_DIR$/../lib/freemarker-2.3.4.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/freemarker.jar" />
- <url>jar://$MODULE_DIR$/../../lib/freemarker.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/ognl-2.6.7.jar" />
+ <url>jar://$MODULE_DIR$/../lib/ognl-2.6.7.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/ognl.jar" />
- <url>jar://$MODULE_DIR$/../../lib/ognl.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/oscore-2.2.4.jar" />
+ <url>jar://$MODULE_DIR$/../lib/oscore-2.2.4.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/oscore.jar" />
- <url>jar://$MODULE_DIR$/../../lib/oscore.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/spring-aop-1.2.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/spring-aop-1.2.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/rife-continuations.jar" />
- <url>jar://$MODULE_DIR$/../../lib/rife-continuations.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/spring-beans-1.2.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/spring-beans-1.2.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/spring-beans.jar" />
- <url>jar://$MODULE_DIR$/../../lib/spring-beans.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/spring-context-1.2.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/spring-context-1.2.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/spring-context.jar" />
- <url>jar://$MODULE_DIR$/../../lib/spring-context.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/spring-core-1.2.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/spring-core-1.2.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/spring-core.jar" />
- <url>jar://$MODULE_DIR$/../../lib/spring-core.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/spring-web-1.2.6.jar" />
+ <url>jar://$MODULE_DIR$/../lib/spring-web-1.2.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/spring-web.jar" />
- <url>jar://$MODULE_DIR$/../../lib/spring-web.jar!/</url>
+ <attribute name="URI"
value="/WEB-INF/lib/struts-mailreader-dao-1.3.5-SNAPSHOT.jar" />
+
<url>jar://$MODULE_DIR$/../lib/struts-mailreader-dao-1.3.5-SNAPSHOT.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI"
value="/WEB-INF/lib/struts-mailreader-dao-1.3.0-dev.jar" />
-
<url>jar://$MODULE_DIR$/../../lib/struts-mailreader-dao-1.3.0-dev.jar!/</url>
+ <attribute name="URI"
value="/WEB-INF/lib/struts2-api-2.0.0-SNAPSHOT.jar" />
+ <url>jar://$MODULE_DIR$/../lib/struts2-api-2.0.0-SNAPSHOT.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/struts-taglib-1.3.0.jar" />
- <url>jar://$MODULE_DIR$/../../lib/struts-taglib-1.3.0.jar!/</url>
+ <attribute name="URI"
value="/WEB-INF/lib/struts2-core-2.0.0-SNAPSHOT.jar" />
+ <url>jar://$MODULE_DIR$/../lib/struts2-core-2.0.0-SNAPSHOT.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/webwork-2.2.2.jar" />
- <url>jar://$MODULE_DIR$/../../lib/webwork-2.2.2.jar!/</url>
+ <attribute name="URI"
value="/WEB-INF/lib/struts2-extras-2.0.0-SNAPSHOT.jar" />
+ <url>jar://$MODULE_DIR$/../lib/struts2-extras-2.0.0-SNAPSHOT.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/xwork-1.1.2.jar" />
- <url>jar://$MODULE_DIR$/../../lib/xwork-1.1.2.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/xwork-2.0-SNAPSHOT.jar" />
+ <url>jar://$MODULE_DIR$/../lib/xwork-2.0-SNAPSHOT.jar!/</url>
</containerElement>
<deploymentDescriptor name="web.xml"
url="file://$MODULE_DIR$/src/webapp/WEB-INF/web.xml" optional="false"
version="2.3" />
<deploymentDescriptor name=""
url="file://$MODULE_DIR$/META-INF/context.xml" optional="false">
@@ -263,6 +269,7 @@
<option name="NAME" value="" />
<option name="DESCRIPTION" value="" />
</deploymentDescriptor>
+ <deploymentDescriptor name="context.xml"
url="file://$MODULE_DIR$/META-INF/context.xml" optional="false" version="5.x" />
<webroots>
<root url="file://$MODULE_DIR$/src/webapp" relative="/" />
<root url="file://$MODULE_DIR$/src/java" relative="/WEB-INF/src/java" />
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/Login.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/Login.java?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
--- struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/Login.java
(original)
+++ struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/Login.java
Sun Aug 13 10:37:22 2006
@@ -3,7 +3,7 @@
public class Login extends MailReaderSupport {
- public String execute() throws ExpiredPasswordException {
+ public String save() throws ExpiredPasswordException {
User user = findUser(getUsername(), getPassword());
Copied:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate-validation.xml
(from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave-validation.xml)
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate-validation.xml?p2=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate-validation.xml&p1=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave-validation.xml&r1=431122&r2=431198&rev=431198&view=diff
==============================================================================
(empty)
Propchange:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate-validation.xml
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java
(from r431122,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave.java)
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java?p2=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java&p1=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave.java&r1=431122&r2=431198&rev=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterSave.java
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java
Sun Aug 13 10:37:22 2006
@@ -1,5 +1,5 @@
/**
* <p>Stub class to allow extra validation on initial Save.</p>
*/
-public class RegisterSave extends Register {
+public class RegisterCreate extends Register {
}
Propchange:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/RegisterCreate.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.properties
(from r431180,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/webwork.properties)
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.properties?p2=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.properties&p1=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/webwork.properties&r1=431180&r2=431198&rev=431198&view=diff
==============================================================================
(empty)
Propchange:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.properties
------------------------------------------------------------------------------
svn:eol-style = native
Copied:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml
(from r431180,
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/xwork.xml)
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml?p2=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml&p1=struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/xwork.xml&r1=431180&r2=431198&rev=431198&view=diff
==============================================================================
--- struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/xwork.xml
(original)
+++ struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml
Sun Aug 13 10:37:22 2006
@@ -22,13 +22,20 @@
<result>/pages/Welcome.jsp</result>
</action>
- <action name="Register" class="Register">
+ <action name="Register" class="Register" method="input">
<result name="input">/pages/Register.jsp</result>
+ </action>
+
+ <action name="Register_cancel" class="Register" method="cancel">
<result name="cancel" type="redirect-action">Welcome</result>
+ </action>
+
+ <action name="Register_create" class="RegisterCreate" method="save">
+ <result name="input">/pages/Register.jsp</result>
<result type="redirect-action">Menu</result>
</action>
- <action name="RegisterCreate" class="RegisterCreate">
+ <action name="Register_save" class="Register" method="save">
<result name="input">/pages/Register.jsp</result>
<result type="redirect-action">Menu</result>
</action>
@@ -41,9 +48,16 @@
<result type="redirect-action">Welcome</result>
</action>
- <action name="Login" class="Login">
+ <action name="Login" class="Login" method="input">
<result name="input">/pages/Login.jsp</result>
+ </action>
+
+ <action name="Login_cancel" class="Login" method="cancel">
<result name="cancel" type="redirect-action">Welcome</result>
+ </action>
+
+ <action name="Login_save" class="Login" method="save">
+ <result name="input">/pages/Login.jsp</result>
<result type="redirect-action">Menu</result>
</action>
Propchange:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/java/struts.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/test/RegisterTest.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/test/RegisterTest.java?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/test/RegisterTest.java
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/test/RegisterTest.java
Sun Aug 13 10:37:22 2006
@@ -11,6 +11,7 @@
super.setUp();
action = new Register();
action.setApplication(new HashMap());
+ action.setSession(new HashMap());
action.setDatabase(database);
}
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Login.jsp
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Login.jsp?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Login.jsp
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Login.jsp
Sun Aug 13 10:37:22 2006
@@ -7,18 +7,18 @@
<title><s:text name="login.title"/></title>
</head>
-<body onLoad="self.focus();document.Login.username.focus()">
+<body onLoad="self.focus();document.Login_save.username.focus()">
<s:actionerror/>
-<s:form method="POST" validate="true">
+<s:form action="Login_save" validate="true">
<s:textfield label="%{getText('username')}" name="username"/>
<s:password label="%{getText('password')}" name="password"
showPassword="true"/>
<s:submit value="%{getText('button.save')}" name="Save"/>
- <s:submit action="Login!cancel" value="%{getText('button.cancel')}"
name="Cancel"
- onclick="form.onsubmit=null"/>
+ <s:submit action="Login_cancel" value="%{getText('button.cancel')}"
name="Cancel"
+ onclick="form.onsubmit=null"/>
</s:form>
</body>
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Menu.jsp
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Menu.jsp?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Menu.jsp
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Menu.jsp
Sun Aug 13 10:37:22 2006
@@ -10,7 +10,7 @@
<body>
<h3><s:text name="menu.heading"/> <s:property value="user.fullName"/></h3>
<ul>
- <li><a href="<s:url action="Register!input" />">
+ <li><a href="<s:url action="Register" />">
<s:text name="menu.registration"/>
</a>
</li>
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Register.jsp
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Register.jsp?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Register.jsp
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Register.jsp
Sun Aug 13 10:37:22 2006
@@ -12,10 +12,10 @@
</s:if>
</head>
-<body onLoad="self.focus();document.Register.username.focus()">
+<body onLoad="self.focus();document.Register_save.username.focus()">
<s:actionerror/>
-<s:form method="POST" validate="true">
+<s:form action="Register_save" validate="true">
<s:hidden name="task"/>
<s:if test="task == 'Create'">
<s:textfield label="%{getText('username')}" name="username"/>
@@ -30,29 +30,29 @@
<s:password label="%{getText('password2')}" name="password2"/>
<s:textfield label="%{getText('fullName')}"
- name="fullName"/>
+ name="fullName"/>
<s:textfield label="%{getText('fromAddress')}"
- name="fromAddress"/>
+ name="fromAddress"/>
<s:textfield label="%{getText('replyToAddress')}"
- name="replyToAddress"/>
+ name="replyToAddress"/>
<s:if test="task == 'Create'">
- <s:submit value="%{getText('button.save')}" action="RegisterCreate"/>
+ <s:submit value="%{getText('button.save')}" action="Register_create"/>
<s:reset value="%{getText('button.reset')}"/>
<s:submit action="Welcome" value="%{getText('button.cancel')}"
- onclick="form.onsubmit=null"/>
+ onclick="form.onsubmit=null"/>
</s:if>
<s:else>
- <s:submit value="%{getText('button.save')}" action="Register"/>
+ <s:submit value="%{getText('button.save')}"/>
<s:reset value="%{getText('button.reset')}"/>
<s:submit action="Menu" value="%{getText('button.cancel')}"
- onclick="form.onsubmit=null"/>
+ onclick="form.onsubmit=null"/>
</s:else>
</s:form>
Modified:
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Welcome.jsp
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Welcome.jsp?rev=431198&r1=431197&r2=431198&view=diff
==============================================================================
---
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Welcome.jsp
(original)
+++
struts/sandbox/trunk/mailreader-course/struts2/profile/src/webapp/pages/Welcome.jsp
Sun Aug 13 10:37:22 2006
@@ -12,17 +12,32 @@
<h3>MailReader Options</h3>
<ul>
- <li><a href="<s:url action="Register!input"/>"><s:text
+ <li><a href="<s:url action="Register"/>"><s:text
name="index.registration"/></a></li>
- <li><a href="<s:url action="Login!input"/>"><s:text
+ <li><a href="<s:url action="Login"/>"><s:text
name="index.login"/></a></li>
</ul>
<h3>Language Options</h3>
<ul>
- <li><a href="<s:url action="Welcome?request_locale=en"/>">English</a></li>
- <li><a href="<s:url action="Welcome?request_locale=ja"/>">Japanese</a></li>
- <li><a href="<s:url action="Welcome?request_locale=ru"/>">Russian</a></li>
+ <li>
+ <s:url id="en" action="Welcome">
+ <s:param name="request_locale">en</s:param>
+ </s:url>
+ <s:a href="%{en}">English</s:a>
+ </li>
+ <li>
+ <s:url id="ja" action="Welcome">
+ <s:param name="request_locale">ja</s:param>
+ </s:url>
+ <s:a href="%{ja}">Japanese</s:a>
+ </li>
+ <li>
+ <s:url id="ru" action="Welcome">
+ <s:param name="request_locale">ru</s:param>
+ </s:url>
+ <s:a href="%{ru}">Russian</s:a>
+ </li>
</ul>
</body>