You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by zze-e-photo FRAS E ext FTRD/DMI/REN <ef...@rd.francetelecom.com> on 2004/05/03 09:35:49 UTC

JSP Generator question, once again

Hi,

>> Is it possible to avoid a JSP page to be reloaded and recompiled
using the JSPGenerator in Cocoon when the file has been changed on
filesystem ?
>Don't you mean "until the file has been changed on filesystem"?
>> No, I'd like to completely avoid having the JSPGenerator checking if
the jsp file has changed.
>> So, even if the file has been changed on filesystem, I would like to
have the jsp not recompiled.
> Hmm, ok, but what exactly is the use case?

After more investigation, the use case is the following :

To improve performance in Tomcat, it is possible to disable the checking
system for JSP file modification. 
I would like to do exactly the same with the JSPGenerator (and also the
JSPReader) in Cocoon.
So, I don't know if I really need to cache the result of the generator
or if there is better way to just avoid Cocoon checking if  the JSP file
has been changed.

Thanks,

Eddy


>> So I could write my own JSPGenerator, just adding the 
>> CacheableProcessingComponent interface implementation and that 
>> would be enough ?
>>
>> Yes, just extend the existing one. But unlike the FileGenerator in
>> getValidity() you must not return the validity of the inputsource 
>> (which is normally the lastmodified value), but the "always valid 
>> validity":
>>
>
http://cvs.apache.org/viewcvs.cgi/avalon-excalibur/sourceresolve/src/jav
a/org/apache/excalibur/source/impl/validity/NOPValidity.java



Re: JSP Generator question, once again

Posted by Joerg Heinicke <jo...@gmx.de>.
On 03.05.2004 09:35, zze-e-photo FRAS E ext FTRD/DMI/REN wrote:

> After more investigation, the use case is the following :
> 
> To improve performance in Tomcat, it is possible to disable the checking
> system for JSP file modification. 
> I would like to do exactly the same with the JSPGenerator (and also the
> JSPReader) in Cocoon.
> So, I don't know if I really need to cache the result of the generator
> or if there is better way to just avoid Cocoon checking if  the JSP file
> has been changed.

Cocoon's caching caches the *result* of the generator, so Jasper is not 
asked at all for new content if the cache is still valid. What I 
suggested (using NOPValidity) is so probably the wrong way, as the 
result of the first access would be always valid and used.

Something like a "check for file modification" is not applicable for the 
JSPGenerator as it only resolves the path to the JSP file and gives this 
path to Jasper. I guess then Tomcat's "check for file modification" 
comes into play - or not if deactivated. So it should just work as it is.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org