diff --git a/exclude-parameters/src/main/java/org/apache/struts/edit/action/EditAction.java b/exclude-parameters/src/main/java/org/apache/struts/edit/action/EditAction.java index 94a43213..b9702219 100644 --- a/exclude-parameters/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/exclude-parameters/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -10,6 +10,7 @@ import org.apache.struts.edit.service.EditServiceInMemory; import org.apache.struts2.ActionSupport; import org.apache.struts2.Preparable; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; import java.util.Arrays; @@ -61,6 +62,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; } diff --git a/exclude-parameters/src/main/resources/struts.xml b/exclude-parameters/src/main/resources/struts.xml index d6b699f7..a706bb56 100644 --- a/exclude-parameters/src/main/resources/struts.xml +++ b/exclude-parameters/src/main/resources/struts.xml @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@ - + diff --git a/exclude-parameters/src/main/webapp/WEB-INF/web.xml b/exclude-parameters/src/main/webapp/WEB-INF/web.xml index 07832e24..82301291 100644 --- a/exclude-parameters/src/main/webapp/WEB-INF/web.xml +++ b/exclude-parameters/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Exclude Parameters index.jsp diff --git a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 2b31f2f2..c83be331 100644 --- a/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/form-processing/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -2,6 +2,7 @@ import org.apache.struts.helloworld.model.MessageStore; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a Struts 2 controller that responds @@ -37,6 +38,7 @@ public String getUserName() { return userName; } + @StrutsParameter public void setUserName(String userName) { this.userName = userName; } diff --git a/form-processing/src/main/java/org/apache/struts/register/action/Register.java b/form-processing/src/main/java/org/apache/struts/register/action/Register.java index 57c34dd8..6aa1ab06 100644 --- a/form-processing/src/main/java/org/apache/struts/register/action/Register.java +++ b/form-processing/src/main/java/org/apache/struts/register/action/Register.java @@ -2,8 +2,8 @@ import org.apache.struts.register.model.Person; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; -import java.util.ArrayList; import java.util.List; public class Register extends ActionSupport { @@ -17,15 +17,10 @@ public String execute2() throws Exception { } public String input() throws Exception { - this.options = new ArrayList<>(); - this.options.add(3); return INPUT; } - public String cancel2() throws Exception { - return SUCCESS; - } - + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; } @@ -34,6 +29,7 @@ public void setPersonBean(Person person) { personBean = person; } + @StrutsParameter(depth = 1) public List getOptions() { return options; } diff --git a/form-processing/src/main/resources/struts.xml b/form-processing/src/main/resources/struts.xml index 33451808..9be7f7ce 100644 --- a/form-processing/src/main/resources/struts.xml +++ b/form-processing/src/main/resources/struts.xml @@ -6,6 +6,7 @@ + @@ -33,7 +34,7 @@ /WEB-INF/register.jsp - + index diff --git a/form-processing/src/main/webapp/WEB-INF/index.jsp b/form-processing/src/main/webapp/WEB-INF/index.jsp index 135e6647..80e1003c 100644 --- a/form-processing/src/main/webapp/WEB-INF/index.jsp +++ b/form-processing/src/main/webapp/WEB-INF/index.jsp @@ -20,6 +20,6 @@ -

Please register for our prize drawing.

+

Please register for our prize drawing.

diff --git a/form-processing/src/main/webapp/WEB-INF/register.jsp b/form-processing/src/main/webapp/WEB-INF/register.jsp index 25c056b1..a4bec2c4 100644 --- a/form-processing/src/main/webapp/WEB-INF/register.jsp +++ b/form-processing/src/main/webapp/WEB-INF/register.jsp @@ -9,7 +9,7 @@

Register for a prize by completing this form.

- + diff --git a/form-processing/src/main/webapp/WEB-INF/web.xml b/form-processing/src/main/webapp/WEB-INF/web.xml index 3ea49e9a..66c6b4b8 100644 --- a/form-processing/src/main/webapp/WEB-INF/web.xml +++ b/form-processing/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,8 @@ - + Form_Processing_Struts2_Mvn diff --git a/form-tags/src/main/java/org/apache/struts/edit/action/EditAction.java b/form-tags/src/main/java/org/apache/struts/edit/action/EditAction.java index aa4967a4..e7895b4b 100644 --- a/form-tags/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/form-tags/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -5,6 +5,7 @@ import org.apache.struts.edit.service.EditService; import org.apache.struts.edit.service.EditServiceInMemory; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; import java.util.Arrays; @@ -36,6 +37,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; } diff --git a/form-tags/src/main/webapp/WEB-INF/web.xml b/form-tags/src/main/webapp/WEB-INF/web.xml index e4733ecb..f27f9d9e 100644 --- a/form-tags/src/main/webapp/WEB-INF/web.xml +++ b/form-tags/src/main/webapp/WEB-INF/web.xml @@ -1,9 +1,8 @@ - + Form Tags diff --git a/form-validation/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/form-validation/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 1547a2ee..eee13a98 100644 --- a/form-validation/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/form-validation/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -2,6 +2,7 @@ import org.apache.struts.helloworld.model.MessageStore; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a Struts 2 controller that responds @@ -37,6 +38,7 @@ public String getUserName() { return userName; } + @StrutsParameter public void setUserName(String userName) { this.userName = userName; } diff --git a/form-validation/src/main/java/org/apache/struts/register/action/Register.java b/form-validation/src/main/java/org/apache/struts/register/action/Register.java index f3ce977f..22435a67 100644 --- a/form-validation/src/main/java/org/apache/struts/register/action/Register.java +++ b/form-validation/src/main/java/org/apache/struts/register/action/Register.java @@ -2,6 +2,7 @@ import org.apache.struts.register.model.Person; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a controller to handle actions @@ -48,7 +49,7 @@ public void validate(){ } - + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; diff --git a/form-validation/src/main/resources/struts.xml b/form-validation/src/main/resources/struts.xml index 8afdb326..8aa837e3 100644 --- a/form-validation/src/main/resources/struts.xml +++ b/form-validation/src/main/resources/struts.xml @@ -8,7 +8,7 @@ - + @@ -22,9 +22,13 @@ /HelloWorld.jsp
+ + /register.jsp + + - /thankyou.jsp - /register.jsp + /thankyou.jsp + /register.jsp
diff --git a/form-validation/src/main/webapp/WEB-INF/web.xml b/form-validation/src/main/webapp/WEB-INF/web.xml index 63b17215..f552df71 100644 --- a/form-validation/src/main/webapp/WEB-INF/web.xml +++ b/form-validation/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Form Validation index.jsp diff --git a/form-validation/src/main/webapp/index.jsp b/form-validation/src/main/webapp/index.jsp index 091f5053..b072c4a4 100644 --- a/form-validation/src/main/webapp/index.jsp +++ b/form-validation/src/main/webapp/index.jsp @@ -25,6 +25,6 @@ -

Please register for our prize drawing.

+

Please register for our prize drawing.

\ No newline at end of file diff --git a/form-xml-validation/src/main/java/org/apache/struts/edit/action/EditAction.java b/form-xml-validation/src/main/java/org/apache/struts/edit/action/EditAction.java index cdd50efb..ce1c4086 100644 --- a/form-xml-validation/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/form-xml-validation/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -5,6 +5,7 @@ import org.apache.struts.edit.service.EditService; import org.apache.struts.edit.service.EditServiceInMemory; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; import java.util.Arrays; @@ -38,6 +39,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; } diff --git a/form-xml-validation/src/main/webapp/WEB-INF/web.xml b/form-xml-validation/src/main/webapp/WEB-INF/web.xml index 27847193..aeca531e 100644 --- a/form-xml-validation/src/main/webapp/WEB-INF/web.xml +++ b/form-xml-validation/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,8 @@ - + Form XML Validation index.jsp diff --git a/helloworld/src/main/resources/struts.xml b/helloworld/src/main/resources/struts.xml index 2e555a6c..c7d9171c 100755 --- a/helloworld/src/main/resources/struts.xml +++ b/helloworld/src/main/resources/struts.xml @@ -7,6 +7,7 @@ + diff --git a/helloworld/src/main/webapp/WEB-INF/web.xml b/helloworld/src/main/webapp/WEB-INF/web.xml index 4fc7bc15..73cc3c87 100755 --- a/helloworld/src/main/webapp/WEB-INF/web.xml +++ b/helloworld/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,8 @@ - + Hello World Struts 2 /index diff --git a/http-session/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/http-session/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 5514a359..c7fe7e82 100644 --- a/http-session/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/http-session/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -4,6 +4,7 @@ import org.apache.struts2.ActionSupport; import org.apache.struts2.action.ParameterNameAware; import org.apache.struts2.action.SessionAware; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.Map; @@ -29,6 +30,7 @@ public String getUserName() { return userName; } + @StrutsParameter public void setUserName(String userName) { this.userName = userName; } diff --git a/http-session/src/main/resources/struts.xml b/http-session/src/main/resources/struts.xml index 75cbb95b..01b8c943 100644 --- a/http-session/src/main/resources/struts.xml +++ b/http-session/src/main/resources/struts.xml @@ -6,6 +6,7 @@ + @@ -27,6 +28,7 @@ + diff --git a/http-session/src/main/webapp/WEB-INF/web.xml b/http-session/src/main/webapp/WEB-INF/web.xml index f8f58df7..6d00ef45 100644 --- a/http-session/src/main/webapp/WEB-INF/web.xml +++ b/http-session/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + HTTP Session Struts 2 index.jsp diff --git a/interceptors/src/main/java/org/apache/struts/register/action/Register.java b/interceptors/src/main/java/org/apache/struts/register/action/Register.java index f3ce977f..22435a67 100644 --- a/interceptors/src/main/java/org/apache/struts/register/action/Register.java +++ b/interceptors/src/main/java/org/apache/struts/register/action/Register.java @@ -2,6 +2,7 @@ import org.apache.struts.register.model.Person; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a controller to handle actions @@ -48,7 +49,7 @@ public void validate(){ } - + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; diff --git a/interceptors/src/main/resources/struts.xml b/interceptors/src/main/resources/struts.xml index ff56b2eb..27ffdfbe 100644 --- a/interceptors/src/main/resources/struts.xml +++ b/interceptors/src/main/resources/struts.xml @@ -9,6 +9,7 @@ + diff --git a/interceptors/src/main/webapp/WEB-INF/web.xml b/interceptors/src/main/webapp/WEB-INF/web.xml index fe900c9c..c04dcd64 100644 --- a/interceptors/src/main/webapp/WEB-INF/web.xml +++ b/interceptors/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Interceptors Struts 2 index.jsp diff --git a/message-resource/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/message-resource/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index 1547a2ee..93e46646 100644 --- a/message-resource/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/message-resource/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -2,6 +2,7 @@ import org.apache.struts.helloworld.model.MessageStore; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a Struts 2 controller that responds @@ -37,6 +38,7 @@ public String getUserName() { return userName; } + @StrutsParameter public void setUserName(String userName) { this.userName = userName; } diff --git a/message-resource/src/main/java/org/apache/struts/register/action/Register.java b/message-resource/src/main/java/org/apache/struts/register/action/Register.java index f3ce977f..22435a67 100644 --- a/message-resource/src/main/java/org/apache/struts/register/action/Register.java +++ b/message-resource/src/main/java/org/apache/struts/register/action/Register.java @@ -2,6 +2,7 @@ import org.apache.struts.register.model.Person; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a controller to handle actions @@ -48,7 +49,7 @@ public void validate(){ } - + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; diff --git a/message-resource/src/main/resources/global_es.properties b/message-resource/src/main/resources/global_es.properties index fa015139..846ffdf4 100644 --- a/message-resource/src/main/resources/global_es.properties +++ b/message-resource/src/main/resources/global_es.properties @@ -1 +1 @@ -contact=Para asistencia, comuníquese comuníquese@email.com \ No newline at end of file +contact=Para asistencia, comuníquese comuníquese@email.com \ No newline at end of file diff --git a/message-resource/src/main/resources/struts.xml b/message-resource/src/main/resources/struts.xml index ae1161a4..ac152b79 100644 --- a/message-resource/src/main/resources/struts.xml +++ b/message-resource/src/main/resources/struts.xml @@ -6,10 +6,12 @@ - + + + diff --git a/message-resource/src/main/webapp/HelloWorld.jsp b/message-resource/src/main/webapp/HelloWorld.jsp index 75e150db..275513f4 100644 --- a/message-resource/src/main/webapp/HelloWorld.jsp +++ b/message-resource/src/main/webapp/HelloWorld.jsp @@ -1,10 +1,10 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Hello World! diff --git a/message-resource/src/main/webapp/WEB-INF/web.xml b/message-resource/src/main/webapp/WEB-INF/web.xml index 70f92742..ea64c3dd 100644 --- a/message-resource/src/main/webapp/WEB-INF/web.xml +++ b/message-resource/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Message Resource index.jsp diff --git a/message-resource/src/main/webapp/index.jsp b/message-resource/src/main/webapp/index.jsp index ba96d1ea..6792a09e 100644 --- a/message-resource/src/main/webapp/index.jsp +++ b/message-resource/src/main/webapp/index.jsp @@ -1,10 +1,10 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Basic Struts 2 Application - Welcome @@ -31,11 +31,11 @@

Please register for our prize drawing.

-

Registro español

+

Registro español

es -

Por favor, regístrese para nuestro sorteo

+

Por favor, regístrese para nuestro sorteo


diff --git a/message-resource/src/main/webapp/register.jsp b/message-resource/src/main/webapp/register.jsp index f56ca4e7..d6b822dc 100644 --- a/message-resource/src/main/webapp/register.jsp +++ b/message-resource/src/main/webapp/register.jsp @@ -1,11 +1,11 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> - + Register diff --git a/message-resource/src/main/webapp/thankyou.jsp b/message-resource/src/main/webapp/thankyou.jsp index 2b8fb9cb..71e7d514 100644 --- a/message-resource/src/main/webapp/thankyou.jsp +++ b/message-resource/src/main/webapp/thankyou.jsp @@ -1,11 +1,11 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> - + Registration Successful diff --git a/preparable-interface/src/main/java/org/apache/struts/edit/action/EditAction.java b/preparable-interface/src/main/java/org/apache/struts/edit/action/EditAction.java index d657f632..e6a90173 100644 --- a/preparable-interface/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/preparable-interface/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -10,6 +10,7 @@ import org.apache.struts.edit.service.EditServiceInMemory; import org.apache.struts2.ActionSupport; import org.apache.struts2.Preparable; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; import java.util.Arrays; @@ -62,6 +63,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; } diff --git a/preparable-interface/src/main/resources/struts.xml b/preparable-interface/src/main/resources/struts.xml index 5d9d8103..1c9f59b5 100644 --- a/preparable-interface/src/main/resources/struts.xml +++ b/preparable-interface/src/main/resources/struts.xml @@ -6,9 +6,10 @@ + - + diff --git a/preparable-interface/src/main/webapp/WEB-INF/web.xml b/preparable-interface/src/main/webapp/WEB-INF/web.xml index f513ed55..4e3c7f33 100644 --- a/preparable-interface/src/main/webapp/WEB-INF/web.xml +++ b/preparable-interface/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Preparable Interface index.jsp diff --git a/spring-struts/src/main/java/org/apache/struts/edit/action/EditAction.java b/spring-struts/src/main/java/org/apache/struts/edit/action/EditAction.java index ca37390f..e5ead266 100644 --- a/spring-struts/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/spring-struts/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -4,6 +4,7 @@ import org.apache.struts.edit.model.State; import org.apache.struts.edit.service.EditService; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.ArrayList; import java.util.Arrays; @@ -47,6 +48,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { diff --git a/spring-struts/src/main/resources/struts.xml b/spring-struts/src/main/resources/struts.xml index 84e2c27b..e568af55 100644 --- a/spring-struts/src/main/resources/struts.xml +++ b/spring-struts/src/main/resources/struts.xml @@ -6,9 +6,10 @@ + - + diff --git a/spring-struts/src/main/webapp/WEB-INF/web.xml b/spring-struts/src/main/webapp/WEB-INF/web.xml index cc11b7de..65caa3c5 100644 --- a/spring-struts/src/main/webapp/WEB-INF/web.xml +++ b/spring-struts/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,8 @@ - + Spring Struts 2 diff --git a/spring-struts/src/main/webapp/edit.jsp b/spring-struts/src/main/webapp/edit.jsp index 0cd05e4d..498aca76 100644 --- a/spring-struts/src/main/webapp/edit.jsp +++ b/spring-struts/src/main/webapp/edit.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Struts 2 Form Tags - Edit Person diff --git a/spring-struts/src/main/webapp/index.jsp b/spring-struts/src/main/webapp/index.jsp index 88209d8b..b58e8105 100644 --- a/spring-struts/src/main/webapp/index.jsp +++ b/spring-struts/src/main/webapp/index.jsp @@ -1,10 +1,10 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Struts 2 Form Tags - Welcome diff --git a/spring-struts/src/main/webapp/thankyou.jsp b/spring-struts/src/main/webapp/thankyou.jsp index 5fa306f2..08a304a8 100644 --- a/spring-struts/src/main/webapp/thankyou.jsp +++ b/spring-struts/src/main/webapp/thankyou.jsp @@ -1,11 +1,11 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> - + Update Successful diff --git a/themes/src/main/java/org/apache/struts/edit/action/EditAction.java b/themes/src/main/java/org/apache/struts/edit/action/EditAction.java index 45b1206f..ab4e9728 100644 --- a/themes/src/main/java/org/apache/struts/edit/action/EditAction.java +++ b/themes/src/main/java/org/apache/struts/edit/action/EditAction.java @@ -9,6 +9,7 @@ import org.apache.struts.edit.service.EditService; import org.apache.struts.edit.service.EditServiceInMemory; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; /** * Acts as a controller to handle actions @@ -48,6 +49,7 @@ public String input() throws Exception { return INPUT; } + @StrutsParameter(depth = 1) public Person getPersonBean() { diff --git a/themes/src/main/resources/struts.xml b/themes/src/main/resources/struts.xml index 3596bc49..78273e7d 100644 --- a/themes/src/main/resources/struts.xml +++ b/themes/src/main/resources/struts.xml @@ -6,10 +6,11 @@ - + + - + diff --git a/themes/src/main/resources/template/KUTheme/checkboxlist.ftl b/themes/src/main/resources/template/KUTheme/checkboxlist.ftl index 818bc4ba..b8f4f909 100644 --- a/themes/src/main/resources/template/KUTheme/checkboxlist.ftl +++ b/themes/src/main/resources/template/KUTheme/checkboxlist.ftl @@ -1,3 +1,3 @@ -<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> -<#include "/${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl" /> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /><#nt/> \ No newline at end of file +<#include "/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" /> +<#include "/${attributes.templateDir}/KUTheme_simple/checkboxlist.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" /><#nt/> \ No newline at end of file diff --git a/themes/src/main/resources/template/KUTheme_simple/checkboxlist.ftl b/themes/src/main/resources/template/KUTheme_simple/checkboxlist.ftl index 28c70f8d..b0f52668 100644 --- a/themes/src/main/resources/template/KUTheme_simple/checkboxlist.ftl +++ b/themes/src/main/resources/template/KUTheme_simple/checkboxlist.ftl @@ -1,38 +1,38 @@ <#assign itemCount = 0/> -<#if parameters.list??> - <@s.iterator value="parameters.list"> +<#if attributes.list??> + <@s.iterator value="attributes.list"> <#assign itemCount = itemCount + 1/> - <#if parameters.listKey??> - <#assign itemKey = stack.findValue(parameters.listKey)/> + <#if attributes.listKey??> + <#assign itemKey = stack.findValue(attributes.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> - <#if parameters.listValue??> - <#assign itemValue = stack.findString(parameters.listValue)?default("")/> + <#if attributes.listValue??> + <#assign itemValue = stack.findString(attributes.listValue)?default("")/> <#else> <#assign itemValue = stack.findString('top')/> <#assign itemKeyStr=itemKey.toString() /> - - <#if tag.contains(parameters.nameValue, itemKey)> + + <#if tag.contains(attributes.nameValue, itemKey)> checked="checked"<#rt/> - <#if parameters.disabled?default(false)> + <#if attributes.disabled?default(false)> disabled="disabled"<#rt/> - <#if parameters.title??> - title="${parameters.title?esc}"<#rt/> + <#if attributes.title??> + title="${attributes.title?esc}"<#rt/> - <#include "/${parameters.templateDir}/simple/scripting-events.ftl" /> - <#include "/${parameters.templateDir}/simple/common-attributes.ftl" /> + <#include "/${attributes.templateDir}/simple/scripting-events.ftl" /> + <#include "/${attributes.templateDir}/simple/common-attributes.ftl" /> /> -
+
<#else>   - -<#if parameters.disabled?default(false)> + +<#if attributes.disabled?default(false)> disabled="disabled"<#rt/> /> \ No newline at end of file diff --git a/themes/src/main/webapp/WEB-INF/web.xml b/themes/src/main/webapp/WEB-INF/web.xml index 68d7de05..7367e707 100644 --- a/themes/src/main/webapp/WEB-INF/web.xml +++ b/themes/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Themes Struts 2 index.jsp diff --git a/themes/src/main/webapp/edit.jsp b/themes/src/main/webapp/edit.jsp index bb1ef765..a3538e4b 100644 --- a/themes/src/main/webapp/edit.jsp +++ b/themes/src/main/webapp/edit.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Struts 2 Form Tags - Edit Person diff --git a/themes/src/main/webapp/index.jsp b/themes/src/main/webapp/index.jsp index 88209d8b..b58e8105 100644 --- a/themes/src/main/webapp/index.jsp +++ b/themes/src/main/webapp/index.jsp @@ -1,10 +1,10 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Struts 2 Form Tags - Welcome diff --git a/themes/src/main/webapp/thankyou.jsp b/themes/src/main/webapp/thankyou.jsp index 7c268efa..263c9433 100644 --- a/themes/src/main/webapp/thankyou.jsp +++ b/themes/src/main/webapp/thankyou.jsp @@ -1,11 +1,11 @@ - -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Update Successful diff --git a/unit-testing/src/main/resources/struts.xml b/unit-testing/src/main/resources/struts.xml index 8dbff4f1..109f06bc 100644 --- a/unit-testing/src/main/resources/struts.xml +++ b/unit-testing/src/main/resources/struts.xml @@ -8,7 +8,7 @@ - + @@ -16,6 +16,9 @@ /index.jsp + + /register.jsp + /thankyou.jsp diff --git a/unit-testing/src/main/webapp/WEB-INF/web.xml b/unit-testing/src/main/webapp/WEB-INF/web.xml index 937eedad..c29ca62f 100644 --- a/unit-testing/src/main/webapp/WEB-INF/web.xml +++ b/unit-testing/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,8 @@ - + Struts 2 Unit Testing index.jsp diff --git a/unit-testing/src/main/webapp/index.jsp b/unit-testing/src/main/webapp/index.jsp index 48d3fc57..25c068c3 100644 --- a/unit-testing/src/main/webapp/index.jsp +++ b/unit-testing/src/main/webapp/index.jsp @@ -1,10 +1,10 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + Basic Struts 2 Application - Welcome @@ -12,6 +12,6 @@ -

Please register for our prize drawing.

+

Please register for our prize drawing.

\ No newline at end of file diff --git a/unit-testing/src/main/webapp/register.jsp b/unit-testing/src/main/webapp/register.jsp index a4acb155..32b6134b 100644 --- a/unit-testing/src/main/webapp/register.jsp +++ b/unit-testing/src/main/webapp/register.jsp @@ -1,11 +1,11 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> - + Register diff --git a/unit-testing/src/main/webapp/thankyou.jsp b/unit-testing/src/main/webapp/thankyou.jsp index 3c845bcb..2be250ec 100644 --- a/unit-testing/src/main/webapp/thankyou.jsp +++ b/unit-testing/src/main/webapp/thankyou.jsp @@ -1,11 +1,11 @@ - + <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> - + Registration Successful diff --git a/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java b/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java index ee0688da..5d9cc306 100644 --- a/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java +++ b/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java @@ -5,6 +5,7 @@ import org.apache.struts.tutorials.wildcardmethod.model.Person; import org.apache.struts.tutorials.wildcardmethod.service.PersonService; import org.apache.struts2.ActionSupport; +import org.apache.struts2.interceptor.parameter.StrutsParameter; import java.util.List; @@ -68,7 +69,7 @@ public String delete() { return SUCCESS; } - + @StrutsParameter(depth = 1) public Person getPerson() { return person; } @@ -93,7 +94,7 @@ public int getId() { return id; } - + @StrutsParameter public void setId(int id) { this.id = id; } diff --git a/wildcard-method-selection/src/main/resources/struts.xml b/wildcard-method-selection/src/main/resources/struts.xml index 2579f2ec..cea89ac5 100644 --- a/wildcard-method-selection/src/main/resources/struts.xml +++ b/wildcard-method-selection/src/main/resources/struts.xml @@ -7,9 +7,14 @@ + + + + index.jsp +