What is the best practice? How should I implement it so that the database isn't polluted?
For Hibernate unit testing you can use HSQL DB :
Unit-testing should have as few barriers as possible. For relational databases those barriers range from external dependencies (is the database running?) to speed to keeping the relational schema synchronized with your object model. For these reasons it is vital to keep database access code away from the core object model and to test as much as possible without touching a real database.
http://www.theserverside.com/tt/articles/article.tss?l=UnitTesting
This blogpost of mine describes a process of unit-testing using spring, hibernate and maven. The maven part can be substituted with your particular build facilities.
Тesting Struts (not Structs, I guess) depends on your struts/spring integration. Anyway take a look at StrutsTestCase and this article about StrutsUT