When I am submitting a form in Struts 2, I am getting the below ERROR
in server console when devMode
set to true
. Though this is not impacting my functionality, not sure why this is occurring.
//Error msg
14:34:54,748 ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] (http-localhost/127.0.0.1:8080-1) ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'x' on 'class com.abc.LoginAction: Error setting expression 'x' with value '[Ljava.lang.String;@154cfc5'
14:34:54,749 ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] (http-localhost/127.0.0.1:8080-1) ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'y' on 'class com.abc.LoginAction: Error setting expression 'y' with value '[Ljava.lang.String;@114b526'
Below is the code snippet
// Login JSP
<s:form action="login">
<table>
<tr><td>UserName : </td><td><s:textfield name="userid"/></td>
<tr><td>Password : </td><td><s:password name="password"/></td>
<tr><td></td><td><s:submit value="Submit" /></td>
</table>
</s:form>
Action
class to handle the form submission
public class LoginAction implements ModelDriven<LoginForm> {
private LoginForm theForm = new LoginForm();
public LoginForm getModel() {
return theForm;
}
public String execute() throws Exception {
-----
-----
}
}
// POJO used for data binding.
public class LoginForm {
private String userid;
private String password;
// Setters and Getters
}