This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feat/struts-730-modernization in repository https://gitbox.apache.org/repos/asf/struts-examples.git
commit 359c45123d5b0e8efbcb8cd5c18a6170f9bb1f6a Author: Lukasz Lenart <[email protected]> AuthorDate: Fri Aug 14 13:06:40 2026 +0200 Right-size @StrutsParameter depth in the annotations teaching example RegisterAction.getPersonBean() declared depth = 10, but register-input.jsp only ever submits personBean.firstName, .lastName, .email, and .age — depth 1. This module exists to teach the annotation, so an inflated depth taught the wrong idiom and needlessly widened what the framework would bind from a request. Verified no JSP or validation descriptor in the module submits anything deeper. Co-Authored-By: Claude Opus 5 <[email protected]> --- annotations/src/main/java/example/actions/RegisterAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/annotations/src/main/java/example/actions/RegisterAction.java b/annotations/src/main/java/example/actions/RegisterAction.java index bde57f8..33036a4 100644 --- a/annotations/src/main/java/example/actions/RegisterAction.java +++ b/annotations/src/main/java/example/actions/RegisterAction.java @@ -38,7 +38,7 @@ public class RegisterAction extends ActionSupport { return SUCCESS; } - @StrutsParameter(depth = 10) + @StrutsParameter(depth = 1) public Person getPersonBean() { return personBean; }
