If you’d like to test your web application you might be interested in Jetty: you can deploy your servlets in it, generate HTTP requests and check if certain criteria are met – everything inside a JUnit test.
Jetty has got enough documentation to get you started; if you want more you can get support from the creators of Jetty. This post was inspired by this particular page from the docs. I setup a very small Eclipse project that can be downloaded as tar.gz or zip; alternatively, you can browse the code here.