cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <>
Subject Re: Cocoon 1.7.4, XSP and hasChanged
Date Wed, 12 Jul 2000 18:21:17 GMT
on 11/7/00 1:06 pm, Robin Green at wrote:

> The hasChanged code is definitely in 1.7.3, and in the latest CVS (see
> ssor/xsp/
> ). I recognise it, because I wrote it. It used to work - I don't see why it
> shouldn't work now.
> Maybe this is a stupid question, but what servlet engine are you using,
> Alex? Printing to System.out isn't a good idea - for instance, with tomcat
> on Unices, spawns a child process and System.out is blackholed, so
> you have to use System.err - or better yet, servletContext.log (), which
> goes to a tomcat-specific log file. Do you get the "in treeview.xml"
> displayed on the terminal at all?
> Alex Muc <> wrote:
>> No one has gotten back to me about this.  I'd be really interested in


Ok, I've found why hasChanged doesn't get called correctly. At least with
tomcat 3.1

in the method within XSPProcessor:

  public boolean hasChanged(Object context) {
    if (!(context instanceof HttpServletRequest)) {
        System.err.println("XSPProcessor hasChanged called, context
      return true;               // Can't interpret context
    HttpServletRequest request = (HttpServletRequest) context;
    String filename = Utils.getBasename(request, servletContext);

    // Get page from Cocoon cache
    PageEntry pageEntry = (PageEntry);
    // New page?
    if (pageEntry == null) {
        System.err.println("XSPProcessor failed to get PageEntry: " +
        return true;
    // NOT pageEntry.hasChanged ()! We are calling the hasChanged method
    // of the XSP page itself.
    System.err.println("XSPProcessor hasChanged called");
    return pageEntry.getPage().hasChanged(context);

I added the sys err lines and discovered that:

XSPProcessor failed to get PageEntry:

I'm curious why, since that's the correct resource, THOUGH, in the cocoon
object store, it has a query string . . . could that be related????

I also noted that PageEntry had it's hasChanged called consistently. That
is, the PageEntry object WAS having it's hasChanged called . . .

I need to poke around a bit more, since I'm not that familiar with the
internals . . .

Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell


View raw message