[Geoserver-devel] getInstance replacement in cvs

In short:
- AbstractService now calls Request.setServletRequest
- Response can use Request.getGeoServer() instead of getInstance()

In long:
- Request.getGeoServer()passes getHttpServletRequest() to ...
- Requests.getGeoServer( HttpServletRequest )
- which calls HttpServletRequest.getSession() and then ...
- which Session.getContext() which is used to find
- GeoServer

The utilitiy class Requests is also used on the STRUTS side of things -
GeoServerAction makes use of the same functions to allows access to GeoServer.
It also makes use of additional functions in Requests to check if the user is
logged in.

ConfigAction extends GeoServer action and has additional look ups for the
current Config model.

As example I have updated CapabilitiesResponse and derived classes as an example.

Here is what I did:
- cache the request provided by execute()
- proivide an abort method clean up the cached request
- made getMimeType() and other use request.getGeoServer() rather than getInstance()

The GetCapabilities implementaions scared me in that they call writeTo once with
a NOP outputstream during execute (as a trial run?) and then write to is called
again by the AbstractService framework.

This is all bad - because writeTo currently clean's up after itself. I think we
may need to rename "abort" as "cleanup" and make it allways called by the
AbstractService framework. That is if we want multiple calls to writeTo.

Cheers,
Jody