You might consider using OWASP CSRFGuard. It's a Filter for servlet applications designed to prevent CSRF attacks.
Their web site design isn't brilliant. You can find the Installation Guide, User Manual and other links by scrolling down to the bottom of the page.