Error in Struts2 ParametersInterceptor

1.9k Views Asked by At

com.opensymphony.xwork2.interceptor.ParametersInterceptor error SEVERE: Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'Screen_name' on 'class org.ScreenCreation: Error setting expression 'Screen_name' with value ['kjn', ]

I'm new with struts2 and I have this error, can any one help me to solve it ?

1

There are 1 best solutions below

0
On

Unexpected Exception caught setting 'Screen_name' on 'class org.ScreenCreation: Error setting expression 'Screen_name' with value ['kjn', ]

That error means you are missing the Setter for your attribute in the Action.

if the attribute is Screen_name, the setter should be

public void setScreen_name(){}

but that's a really wrong syntax for a variable, try avoiding underscores and especially capitalized first letter by usign camelCase, eg screenName:

private String screeName;

public void setScreenName(){...}