The jetty servlet container is quick and light enough to run in unit tests (indeed I do to serve up files).
It is possible to install actual servlets into it, programmatically (say in a test) and have it run them?
The jetty servlet container is quick and light enough to run in unit tests (indeed I do to serve up files).
It is possible to install actual servlets into it, programmatically (say in a test) and have it run them?
Yes. We do this on a regular basis with a number of tools. The simpest is probably HTTP-unit. When we deploy in jetty, we usually deploy larger parts of the application and run Selenium. HttpUnit is the simplest, but at some point your application complexity may warrant a more complete deployment. See the documentation section on embedding jetty
Why not use any HttpUnit, HTMLUnit etc.. Create an ANT script to do whatever is needed to run the test.