Resolve casting error in Struts module