On Sat, Feb 21, 2004 at 05:09:57PM +0200, remigijus wrote:
> I know, I can restart Tomcat, but this is not solution. I will come to same
> problem after few days or weeks againt. It can be treated as work around.
> I'm not sure that switching to velocity will fix the problem. I looked for
> information on google and found that problem can by caused by tomcat
> deployer or manager. As someone noted there is a memory leak when tomcat
> undeploys webapplication. So after few redeplayments I will come to the same
> problem.
> 
> I looking forward to switch to Tomcat 5.0, Jetty or Somthing else, not sure
> yet.
> 
> Any more solutions? Does anyone had same problems? What they did?
> 

*If* the reason for the OutOfMemory is the continous re-compilation of
JSP's upon redeploy you could define another directory for the compiled 
than the default (which gets wiped on re-deploy).

In your web.xml define the jasper-servlet (which compiles the JSP's) and
point the 'scratchdir' to a place on disk where JBoss won't remove the
files:

<servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
        <param-name>scratchdir</param-name>
        <!-- This directory should exist -->
        <param-value>/path/to/your/jsp_working_dir</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
</servlet-mapping>

HTH //Anders


-- 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. Anders Engström         [EMAIL PROTECTED]
. http://www.gnejs.net    PGP-Key: ED010E7F
. [Your mind is like an umbrella. It doesn't work unless you open it.]  

Attachment: signature.asc
Description: Digital signature

Reply via email to