I discussed the problem with the freemarker team and I used a suggestion that PARTIALLY resolved.

They said :

=====

You can use the code below to enable the model cache, assuming
"myConfiguration" is the reference to your Configuration object:

((BeansWrapper)myConfiguration.getObjectWrapper()).setUseCache(true)

and see if it helps you with your GC load levels.

=====

This actually seems to happen.
In struts how can this be done ? I used :


freemarker.template.Configuration fmc = (freemarker.template.Configuration) ServletActionContext.getServletContext().getAttribute (FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY);
        if (fmc != null) {
((freemarker.ext.beans.BeansWrapper)fmc.getObjectWrapper ()).setUseCache(true);
        }


but I think there must be a configuration somewhere (struts.properties?).


To completely solve my problem I really need to understand the following :

How struts uses freemarker ? If i have a jsp page that contains html, jsp tags, struts tags and jsp EL expression, where freemarker is used ?
I suppose that it's used ONLY on struts tags...

So if my page is composed primarly of jsp EL and jsp tags and a few struts tags can I focus on struts tags only to try to understand why the app is producing garbage ?


Thank you



Il giorno 19/giu/07, alle ore 12:58, Ing. Andrea Vettori ha scritto:


Il giorno 19/giu/07, alle ore 12:07, Antonio Petrelli ha scritto:

2007/6/19, Ing. Andrea Vettori <[EMAIL PROTECTED]>:

Moreover I'm not using freemaker in my project! It's struts that's
using it.
My page are all jsps !!



This is pretty strange... Is FreeMarker servlet declared in your web.xml?

No it's not.

I think that freemarker classes are used by struts internally for the themes... I use the simple theme.

I really can't understand what's producing near 2GB of garbage every 10 seconds!


--
Ing. Andrea Vettori
Consulente per l'Information Technology



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Ing. Andrea Vettori
Consulente per l'Information Technology



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to