I am in process of building up a small framework that does unit testing for JSPs. These JSPs have some custom tags, otherwise they are not any special.
Although there are numerous Java unit testing solutions available, I prefer not to use the method where a separate full-blown JSP container is launched, application deployed and results gathered via TCP connection. Typical examples of this case would be Apache Cactus, Selenium, etc. Ideally what I want is to have an embedded solution which is as lightweight as possible (network connection is not being required is a good sign). I have also looked at various mock frameworks but found not a single clean working example when a JSP is compiled/executed during the unit test.
The closest solution I was able to find was using Jetty in embedded mode, or in particular it's ServletTester class, as documented in http://docs.codehaus.org/display/JETTY/ServletTester
Unfortunately the above method only works for servlets but has no mention of JSP. I presume there's a way to programatically hook Jasper servlet into it but can't afford spending a week diving into Jetty/Jasper internals just to get the two integrated. I don't mind using any other JSP/Servlet container as long as it is free and flexibly configurable.
I would appreciate if anyone's got a similar setup and willing to share the experience.