cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: RequestDispatcher &
Date Sat, 05 Feb 2000 13:57:10 GMT
Mike Engelhart wrote:
> Stefano Mazzocchi wrote:
> > Mike Engelhart wrote:
> >>
> >> OK - I've been digging through Cocoon source code and I think what is needed
> >> is the ability to determine if a RequestDispatcher has been created with the
> >> HttpServletRequest.getRequestDispatcher() or
> >> ServletContext.getRequestDispatcher() method calls.  If so then I want to
> >> skip over the code in the Engine.handle() that gets a PrintWriter and writes
> >> out to it.   What I'm struggling with is how to determine if a
> >> RequestDispatcher has been created.  I've been looking at the jsdk 2.2 api
> >> for the last hour and can't find anything way to determine this.  Anyone
> >> have any idea how to find this out?
> >
> > What about doing a try-catch around getWriter()? if an illegalstate is
> > caught, we skip it over.
> >
> > What do you think?
> I'll try it out right now.  Is this "safe" to do?  I'm wondering what the
> repercussions of ignoring this particular Exception are?  Anyone that's
> intimately familiar with the Servlet API know if this is OK to do?

The illegal state exception is there to indicate you cannot mess with
the output since somebody else will. So, in that case, we don't miss the
output :) simply enough. It should work with no problems.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

View raw message