Actually, I prefer to build ONE
unit for all environments and control the details by injecting configuration information. You can do this easily using JNDI and the Context xml configuration in
Tomcat for simple stuff, or keep more complex infomation in an external file or database and inject the location of that information.
The advantages of this are that I don't have to juggle 2 different types of builds and if something goes wrong in production, I don''t have to worry about build differences on the test system hiding the problems with the production code.