当前位置: 代码迷 >> Java Web开发 >> Struts从页面传值与接收有关问题
  详细解决方案

Struts从页面传值与接收有关问题

热度:1558   发布时间:2013-02-25 21:22:44.0
Struts从页面传值与接收问题
问题描述:
在页面有个form,是用来注册的,有这么几个参数 email,gender,password,password2,realName.
提交的时候,日志的内容是这样的:
Java code
  [framework] 2011-12-17 19:34:21,983 - org.apache.struts2.interceptor.FileUploadInterceptor -20104 [http-bio-8080-exec-4] DEBUG org.apache.struts2.interceptor.FileUploadInterceptor  - Bypassing //register [framework] 2011-12-17 19:34:21,983 - com.opensymphony.xwork2.interceptor.StaticParametersInterceptor -20104 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.interceptor.StaticParametersInterceptor  - Setting static parameters {} [framework] 2011-12-17 19:34:21,984 - com.opensymphony.xwork2.interceptor.ParametersInterceptor -20105 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.interceptor.ParametersInterceptor  - Setting params NONE[color=#FF0000] [framework] 2011-12-17 19:34:21,984 - com.opensymphony.xwork2.interceptor.ParametersInterceptor -20105 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.interceptor.ParametersInterceptor  - Setting params birthday => [ 2011-12-26 ] email => [ d ] gender => [ 0 ] password => [ l ] password2 => [ l ] realName => [ d ][/color]  [framework] 2011-12-17 19:34:21,985 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20106 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Property: birthday [framework] 2011-12-17 19:34:21,985 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20106 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Class: com.zb.action.RegisterAction[color=#FF0000] [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - converter is null for property birthday. Mapping size: 0[/color] [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - field-level type converter for property [birthday] = none found [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - global-level type converter for property [birthday] = none found [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@670f8704] [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Property: email [framework] 2011-12-17 19:34:21,995 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20116 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Class: com.zb.action.RegisterAction [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - field-level type converter for property [email] = none found [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - global-level type converter for property [email] = none found [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@670f8704] [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Property: gender [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Class: com.zb.action.RegisterAction [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - field-level type converter for property [gender] = none found [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - global-level type converter for property [gender] = none found [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@670f8704] [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Property: password [framework] 2011-12-17 19:34:21,996 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20117 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - Class: com.zb.action.RegisterAction [framework] 2011-12-17 19:34:21,997 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20118 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - field-level type converter for property [password] = none found [framework] 2011-12-17 19:34:21,997 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20118 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - global-level type converter for property [password] = none found [framework] 2011-12-17 19:34:21,997 - com.opensymphony.xwork2.conversion.impl.XWorkConverter -20118 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.conversion.impl.XWorkConverter  - falling back to default type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@670f8704] [framework] 2011-12-17 19:34:21,999 - org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor -20120 [http-bio-8080-exec-4] DEBUG org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor  - Validating //register with method register. [framework] 2011-12-17 19:34:22,020 - com.opensymphony.xwork2.validator.ValidationInterceptor -20141 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.validator.ValidationInterceptor  - Invoking validate() on action com.zb.action.RegisterAction@2ab3f1c9 [framework] 2011-12-17 19:34:22,020 - com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil -20141 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil  - cannot find method [validateRegister] in action [com.zb.action.RegisterAction@2ab3f1c9] [framework] 2011-12-17 19:34:22,020 - com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil -20141 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil  - cannot find method [validateDoRegister] in action [com.zb.action.RegisterAction@2ab3f1c9] [framework] 2011-12-17 19:34:22,021 - com.opensymphony.xwork2.DefaultActionInvocation -20142 [http-bio-8080-exec-4] DEBUG com.opensymphony.xwork2.DefaultActionInvocation  - Executing action method = register
  相关解决方案