I was shocked to see that I got a ClassCastException Bean classes are well defined and are accessible without any problems. What I noticed is that pageContext.findAttribute() is being used in jsp:setProperty and thats why my string attribute named "abc" got a ClassCastException.
You declare 'abc' as a page-scoped variable of type String. Then you use a useBean action that specifies a different class. This is wrong. The useBean action will create a new variable only if a scoped variable with the specifid id does not already exist. When a scoped variable already exists, the useBean action binds to the existing variable.
And since the existing variable is of a different type than the action declares, you get a ClassCastException. Plain and simple.