http://httpunit.sourceforge.net/
A JUnit extension for testing web applications. Your test cases can emulate a browser and verify behavior of the application. While it used to be that the emulation was low-level (at the HTTP protocol level, hence the name), higher level constructs are now available.
Also can be used with ServletUnit (included with HttpUnit) to test servlet-based apps without deploying to the container.
Alternatives: