cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Atkin <>
Subject RE: cache problem (i think)
Date Mon, 23 Oct 2000 14:04:00 GMT

i'm doing something rather wierd, in fact it's a total hack but what can you

i'm trying to use cocoon on a whole load of xml files that sit on a win32
public share.  These files were not written for cocoon, and there are so
many that modification is not feasible.  Therefore i have written my own
producer which does the following:-
1. read xml file as raw text and store in buffer
2. insert appropriate PIs into buffer
3. wrap buffer in inputsource
4. carry on as normal

the xml file is specified in a request parameter in the form of

the xslt file is specified using a relative path from the context, ie
- so that arbitrary transforms can be done

the problem is that if the request URL does not change, i recieve the same
html result no matter whan request parameters i specify.
- if the request URL does change everything works fine

given that I have set cocoon's cache manager to the NoCache class i'm
assuming that the caching is being done on the client side, but I've found
no evidence or solution to this proposition.
- using the meta tags has no effect

here's the getDocument method:-

    public Document getDocument(HttpServletRequest request) throws Exception
        String xmlPath = request.getParameter("xmlPath");
        String xsltPath = request.getParameter("xsltPath");
        String fileURI = new String("file://localhost/" + xmlPath);
        char[] buffer = readFile(xmlPath, xsltPath);
        CharArrayReader reader = new CharArrayReader(buffer);
        InputSource source = new InputSource(reader);
        //what's all this about then?, new File(xmlPath));
        return parser.parse(source);

- the readFile() method returns the modified xml as a char array 
- don't understand the 'monitor' stuff
- i'm realising that XSP would be a better route to go down, Per Kreipke's
suggestion, but I don't like giving up, esp when i'm 90% the way there

does this make any sense?
any more info required?

Ian Atkin
Code Monkey & Text File Editor
Wide Learning

> -----Original Message-----
> From:	Robin Green []
> Sent:	23 October, 2000 2:13 PM
> To:
> Subject:	RE: cache problem (i think)
> Ian Atkin <> wrote:
> >i had checked the faq @ and there
> >isn't a single question on caching on it so I checked the list archives @
> > where there were a few questions that seemed
> >possibly relevant so a mailed the list.
> >
> >as a result of your mail I have re-scanned the faq and still cannot see a
> >cache-related question, have i posted to the wrong list? if so applogies 
> >and
> >which one should I post to?
> No no it's the right list - actually you're sort of right, the question in
> the FAQ that I was thinking of is this one
> which is sort of cache-related.
> >
> >anyway...
> >
> >i think i've found the source of the problem:-
> >
> >when the request URL changes my hack works, when it doesn't the previous
> >results are always displayed - thus caching is happening somewhere based
> on
> >the request URL
> >
> >i am currently unsure whether this is down to cocoon or my client, IE5.
> >
> >i have tried to turn off client-side caching via gui settings and meta
> tags
> >with no success
> >i have set the cocoon cache manager to the NoCache class with no success
> >
> >where am i going wrong?
> I don't know - please give more details of the page that doesn't work,
> e.g. 
> order of processing instructions, anything special that you are doing
> (e.g. 
> redirects), etc. Full copy of the xml would be useful. Sorry I don't 
> remember your original email.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
> Share information about yourself, create your own public profile at 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message