WW-1340 In blank, rename "tutorial" module to "example", to better indicate why it is there.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@440415 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ted Nathan Husted
2006-09-05 17:29:41 +00:00
parent 70da30113d
commit 8c36b9a3be
16 changed files with 39 additions and 41 deletions
@@ -1,9 +1,9 @@
package tutorial;
package example;
import com.opensymphony.xwork2.ActionSupport;
/**
* Base Action class for the Tutorial package.
*/
public class TutorialSupport extends ActionSupport {
public class ExampleSupport extends ActionSupport {
}
@@ -1,9 +1,9 @@
package tutorial;
package example;
/**
* <code>Set welcome message.</code>
*/
public class HelloWorld extends TutorialSupport {
public class HelloWorld extends ExampleSupport {
public static final String MESSAGE = "HelloWorld.message";
@@ -5,12 +5,12 @@
<validators>
<field name="username">
<field-validator type="requiredstring">
<message key="username.required"/>
<message key="requiredstring"/>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<message key="password.required"/>
<message key="requiredstring"/>
</field-validator>
</field>
</validators>
@@ -1,6 +1,6 @@
package tutorial;
package example;
public class Login extends TutorialSupport {
public class Login extends ExampleSupport {
public String execute() throws Exception {
@@ -1,7 +1,5 @@
requiredstring = ${getText(fieldName)} is required.
password = Password
password.required = Password is required.
username = User Name
username.required = User Name is required.
HelloWorld.message= Struts is up and running ...
Missing.message = This feature is under construction. Please try again in the next interation.
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="example" namespace="/example" extends="struts-default">
<action name="HelloWorld" class="example.HelloWorld">
<result>/example/HelloWorld.jsp</result>
</action>
<action name="Login!*" method="{1}" class="example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirect-action">Menu</result>
</action>
<action name="*" class="example.ExampleSupport">
<result>/example/{1}.jsp</result>
</action>
<!-- Add actions here -->
</package>
</struts>
+1 -1
View File
@@ -6,7 +6,7 @@
<include file="struts-default.xml"/>
<include file="tutorial.xml"/>
<include file="example.xml"/>
<!-- Add packages here -->
@@ -1,24 +0,0 @@
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="tutorial" namespace="/tutorial" extends="struts-default">
<action name="HelloWorld" class="tutorial.HelloWorld">
<result>/tutorial/HelloWorld.jsp</result>
</action>
<action name="Login!*" method="{1}" class="tutorial.Login">
<result name="input">/tutorial/Login.jsp</result>
<result type="redirect-action">Menu</result>
</action>
<action name="*" class="tutorial.TutorialSupport">
<result>/tutorial/{1}.jsp</result>
</action>
<!-- Add actions here -->
</package>
</struts>
@@ -8,7 +8,7 @@
<body>
<s:form action="Login">
<s:textfield label="%{getText('username')}" name="username"/>
<s:textfield label="%{getText('password')}" name="password"/>
<s:password label="%{getText('password')}" name="password" />
<s:submit/>
</s:form>
</body>
@@ -3,7 +3,7 @@
<html>
<head>
<title>Welcome</title>
<link href="<s:url value="/css/tutorial.css"/>" rel="stylesheet"
<link href="<s:url value="/css/examplecss"/>" rel="stylesheet"
type="text/css"/>
</head>
@@ -1,4 +1,4 @@
package tutorial;
package example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.XWorkTestCase;
@@ -1,4 +1,4 @@
package tutorial;
package example;
import com.opensymphony.xwork2.ActionSupport;
import junit.framework.TestCase;
@@ -1,4 +1,4 @@
package tutorial;
package example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.config.entities.ActionConfig;