cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernhard Huber" <>
Subject Re: Cocoon 2 Jsp Generator and Weblogic 6.1
Date Tue, 16 Oct 2001 17:24:45 GMT
As I'm a bit remote my answere here a bit theortically.
As you wrote issue 3 promises to be most hopeful solution.
This would be some how the most correct way to invoke any
servlet from Cocoon2.

I think there should be some other solution than subclassing
ServletResponseImpl. I was implementing that way as it's the
easiest way. Anyway it's somehow not the best
that the complete jsp response is stored into a buffer, and
than piped to Cocoon2, perhaps the best way - regarding
performance - is to have some pipe piping jsp response more
seamlessly to Cocoon2.
I think you may have to set the output stream before calling
the RequestDispatcher. I'm not 100% sure how to do do it by heart.

Another point it's quite okay to use the RequestDispatcher
as the servlet-container can handle resources quite alright.

After JSP processing you should pipe
the output to Cocoon.
I'm sorry for the quick incomplete answer, but I'm a bit busy

Just one remark I don't mind being emailed directly, but
posting to will help others too.... :-)
So if it's okay for you forward this message to cocoon2-dev
mailing list.


> Hi Bernhard,
> I apologise for writing directly to you, but we're hoping that 
> maybe you can
> give us some pointers in getting Cocoon 2 to use the JSP engine in 
> WLS6.1.We got the JSP generator adaptor (JSPEngineImplWLS) from the 
> candidaterelease, and have spent some time getting that to work on 
> 6.1.  Basically:
> 1. Our first attempt was to use weblogic.servlet.JSPServlet as-is 
> (i.e.Plain vanilla JSPEngineImpl to invoke the service() method on 
> JSPServlet).Some twiddling in JSPEngineImpl was required to keep 
> weblogic happy, but
> weblogic's JSPServlet code doesn't seem to do very much - at least 
> it didn't
> seem to do anything to the response object.  So perhaps it's the 
> wrong class
> we're invoking, or it's the wrong entry point.
> 2. Next we tried JSPEngineImplWLS - unfortunately Weblogic's 
> implementationseems to have changed quite a bit in 6.1 - for 
> example ServletRequestImpl no
> longer has a public constructor, and ServletResponseImpl is now 
> marked final
> so cannot be subclassed at all.
> 3. Finally we went for the generic named dispatcher approach - 
> which seems
> to hold some promises.  We managed to get weblogic to compile and 
> executethe JSP without errors, by passing weblogic¹s 
> RequestDispatcherImpl the
> request/response objects as they are (they already are
> ServletRequestImpl/ServletResponseImpl instances).  But now we are 
> not sure
> how to convert the output of the response object into a byte array as
> required by Cocoon.  The fact that both  and
> ServletOutputStreamImpl are marked final now means that the old 
> weblogichack can't be done.
> Any pointers will be much appreciated.
> Thanks a lot,
> Damian 

View raw message