cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: o.a.c.environment.http.* compatibility ?
Date Wed, 21 Aug 2002 12:41:20 GMT
Giacomo Pati wrote:
> Marcus Crafter wrote:
> >
> > 	ie:
> >
> > 	public class HttpRequest implements Request {
> >
> > 	becomes
> >
> > 	public class HttpRequest implements Request, HttpServletRequest {
> >
> > 	and the same with o.a.c.e.http.HttpContext, etc, etc.
> >
> > 	That would allow the Cocoon http request, context, etc,
> > 	implementations to be used implicitly as their javax.servlet.http.*
> > 	counterparts in 3rd party libraries that rely on them.
> >
> > 	Would this change cause any problems ?
> 
> The CLI version of Cocoon would be dependant on the servlet API, right?
> 
And it is not possible, for example the Request has a getSession() method
returning a o.a.c.e.Session object. But the HttpServletRequest has also
a getSession() method returning an object of a different class.

> IIRC the original servlet objects are in the objectModel reference.
Yes, they are.

>From the HttpEnvironment class:
    public static final String HTTP_REQUEST_OBJECT = "httprequest";
    public static final String HTTP_RESPONSE_OBJECT= "httpresponse";
    public static final String HTTP_SERVLET_CONTEXT= "httpservletcontext";

So, if you are in a servlet environment, you can get these via the
objectModel.

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message