You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Pete Lund <pl...@euronetworldwide.com> on 2001/02/20 22:02:44 UTC

problem obtaining profile information

I'm not able to retrieve the profile information that I know I have
successfully generating.  I think my problem may be in the
Utils.getBasename() method.  I'm probably missing a piece of the picture
here, but I haven't been able to find it in the FAQ or on-line docs, or
figure it out myself.  Can someone help?

Using a debugger, I'm able to confirm that I have profiling enabled and
profile results are being stored.  I try to retrieve the profile information
by using the url 
	http://localhost/profiler.xml?producer=file
Cocoon is set up as my default servlet, my own customer producer is my
default cocoon producer, and file is the
org.apache.cocoon.producer.ProducerFromFile producer.  

When I debug the code, I see FileFromProducer.getDocument call
Utils.getBasename() to retrieve the filename, but the return value doesn't
include the filename, but rather only http://localhost.  When I step into
the getBasename() code, I step through the Servlet API 2.2 block, and
eventually return a cleaned up version of the results of
request.getServletPath().

This is where my confusion is.   According to the 2.2 javadocs,
HttpServletRequest.getServletPath() returns "part of this request's URL that
calls the servlet. This includes either the servlet name or a path to the
servlet, but does not include any extra path information or a query string".
This means that the profiler.xml is ignored, which is consistent with the
errors that I receive later.  Why aren't we using the URI somewhere as where
are building this string?

Or am I invoking the URL wrong to retrieve the profile info.  I know that
profiling works well for others, so I do suspect I'm not doing something
correctly.  Any help would be appreciated.

I'm running Cocoon 1.8.0, WebLogic 5.1 Service Pack 8, Sun JDK 1.3, and
Windows NT 4.0.

Pete Lund
Euronet Worldwide
plund@euronetworldwide.com