You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Willie Wheeler <ww...@andrew.cmu.edu> on 2000/06/24 15:27:04 UTC

RE: [C2] Bug in CocoonServlet?

Hi all,

	Regarding the probable bug mentioned in my last message, could the problem
be a missing req.getContextPath()?  Once you put it in there, the reload
link works.  I'm missing something though: if Cocoon gets its own servlet
context, then how can a Cocoon-based web app have its own servlet context
too?  How can Cocoon know to intercept XML files that are part of a web-app
other than Cocoon?

	Willie




-----Original Message-----
From: Willie Wheeler [mailto:wwheeler@andrew.cmu.edu]
Sent: Saturday, June 24, 2000 8:54 AM
To: cocoon-dev@xml.apache.org
Subject: Bug in CocoonServlet?


Hi all,

	In playing with the CocoonServlet code a bit, I found what I believe to be
a minor bug.  When Cocoon isn't initialized, it seems that the intent is
that hitting the 'Reload' link is supposed to try to reload CocoonServlet.
But the link doesn't point to CocoonServlet at all.  For whatever reason,
the req.getServletPath() part of the URL doesn't seem to have any effect.
Bug?

	Willie



Re: [C2] Bug in CocoonServlet?

Posted by Giacomo Pati <Gi...@pwr.ch>.
On Sat, Jun 24, 2000 at 09:27:04AM -0400, Willie Wheeler wrote:
> Hi all,
> 
> 	Regarding the probable bug mentioned in my last message, could the problem
> be a missing req.getContextPath()?  Once you put it in there, the reload
> link works.  I'm missing something though: if Cocoon gets its own servlet
> context, then how can a Cocoon-based web app have its own servlet context
> too?

You missed the point that you don't write true web-apps. Yes Cocoon 2 in its current incarnation is a Servlet but could also be a running from the command line as well as in a SMTP environment. 

> How can Cocoon know to intercept XML files that are part of a web-app
> other than Cocoon?

I have no idea!

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch


Re: [C2] Bug in CocoonServlet?

Posted by Giacomo Pati <Gi...@pwr.ch>.
On Sat, Jun 24, 2000 at 09:27:04AM -0400, Willie Wheeler wrote:
> Hi all,
> 
> 	Regarding the probable bug mentioned in my last message, could the problem
> be a missing req.getContextPath()?  Once you put it in there, the reload
> link works.  I'm missing something though: if Cocoon gets its own servlet
> context, then how can a Cocoon-based web app have its own servlet context
> too?  How can Cocoon know to intercept XML files that are part of a web-app
> other than Cocoon?

CocoonServlet will fake you a request and response object. They aren't HttpRequest objects (look at the code). So Cocoon can even fake a context for you. And the ContextPath will be relative to your sitemap.

Giacomo

> 
> 	Willie
> 
> 
> 
> 
> -----Original Message-----
> From: Willie Wheeler [mailto:wwheeler@andrew.cmu.edu]
> Sent: Saturday, June 24, 2000 8:54 AM
> To: cocoon-dev@xml.apache.org
> Subject: Bug in CocoonServlet?
> 
> 
> Hi all,
> 
> 	In playing with the CocoonServlet code a bit, I found what I believe to be
> a minor bug.  When Cocoon isn't initialized, it seems that the intent is
> that hitting the 'Reload' link is supposed to try to reload CocoonServlet.
> But the link doesn't point to CocoonServlet at all.  For whatever reason,
> the req.getServletPath() part of the URL doesn't seem to have any effect.
> Bug?
> 
> 	Willie
> 
> 

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch