The Artima Developer Community
Sponsored Link

Java Answers Forum
memory leak in Jsp and servlets

1 reply on 1 page. Most recent reply: Jan 5, 2006 7:58 AM by David Vickers

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
dev team

Posts: 3
Nickname: devtream
Registered: Nov, 2005

memory leak in Jsp and servlets Posted: Nov 15, 2005 10:50 PM
Reply to this message Reply
Advertisement
Hi all,

i am using tomcat 4.12 and jdk 1.4.2.

when multiple users accessing our application, each page takes time to load. so i have found memory leak is exist in jsp and servlet file.
how to solve the memory leak problem in jsp and servlet.

give me some tips on using variable and creating object for a class in jsp and also in servlet.

which section i have to declare variable and create object for a class..

where should i assign null for that variable and objects?


David Vickers

Posts: 1
Nickname: squaresilv
Registered: Jan, 2006

Re: memory leak in Jsp and servlets Posted: Jan 5, 2006 7:58 AM
Reply to this message Reply
This might answer the reasons for your problem.


http://tomcat.apache.org/tomcat-4.1-doc/jasper-howto.html

When using Jasper 2 in a production Tomcat server you should consider making the following changes from the default configuration.
development - To enable background compilation of JSP pages set this to false.
fork - The internal JVM javac compiler used by Ant has a known memory leak. And Ant requires that java compiles be synchronized, i.e. only one JSP page can be compiled at a time. Set fork to true so that Ant compiles JSP pages in a seperate JVM. This removes the synchronization of JSP page compiles and prevents all the javac classes from being instantiated and subsequently garbage collected by the JVM Tomcat is running in.

Flat View: This topic has 1 reply on 1 page
Topic: How can I access state information from different Classes in a list? Previous Topic   Next Topic Topic: Struts with Ajax problem

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use