Nothing wrong with the code if it compiles; this is just a deployment problem. Either you're not putting all the class files into your jar(s), or some of your jar files aren't being put in the right place in your web server. I'm going to move this over to the
Struts forum, because perhaps Struts has some special requirements for how classes have to be installed. But again, there's nothing at all wrong with the code -- it has nothing to do with "returning a hashmap."