Reputation: 419
package com.achala.saraswathi.action;
import com.achala.saraswathi.data.AdminBE;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
public class AdminLoginAction extends ActionSupport{
private AdminBE adminBE;
public String execute(){
return Action.SUCCESS;
}
public String adminLogin(){
if(adminBE.getUserName().equals("admin")&&adminBE.getPassword().equals("admin")){
return Action.SUCCESS;
}
addActionError("Invalid username or password");
return Action.INPUT;
}
public AdminBE getAdminBE() {
return adminBE;
}
public void setAdminBE(AdminBE adminBE) {
this.adminBE = adminBE;
}
}
After clicking that submit button the
ParametersInterceptor - Unexpected Exception caught Error setting expression 'x' with value
error is coming, I don't know why?
Upvotes: 3
Views: 3947
Reputation: 3352
To solve this without destroying your object model, see the detailed answer here:
How to remove x and y on submit in HTML form with Image type button?
Upvotes: 0
Reputation: 216
I suspected that your form is using submit button with type="image". With this button it will post parameter x,y to the request parameter. So to avoid this error you can:
Upvotes: 2