This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class Reloading Problem in tomcat 3.1

 
Balki Dhar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
The servlet classes are not reloaded after changed, if they are in frames, in tomcat 3.1.
Does anybody face this problem? If anybody has solutions to tackle this?
Balki Dhar
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Balki,
I vaguly remember the servlet reload is not there in Tomcat3.1. But I am not sure. I always used to stop the server and start again during development locally. I am also using frames for my web appln. Today I will check this out and let you know if I come out with anything useful. I saw you other post reg. this also
regds
maha anna
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Balki,
I verified the 'Auto Reload of Servlets' feature of Tomcat 3.1 with my application which has frames. It does not reaload. But it reloads when the same servlet is called WITHOUT frames. I digged through their docmentation ,faq and readme etc. They said we have to setup our context in .../conf/servler.xml file to add our context like this.
<Context path="/MISApp" docBase="webapps/MISApp" debug="0" reloadable="true" >
</Context>
I changed this file and tried. Even then within frames it doesn't reload. May be autoreload is by default is true. So the change to server.xml file didn't make any difference. Then I went through the 'KNOWN ERRORS and BUGS' in readme file. The reaload prob is reported there though it doen't say specifically from frames. They say it is an experimental feature now, not to depend on any production applications.
regds
maha anna

 
Balki Dhar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maha
Thank you very much for the reply. I really appreciate for the information you have provided. Thanks a lot.
Balki
 
Nita Kaur
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello MahaAnna,

This is reference to above post. I am also facing same pb. But now i am using tomcat3.2 nd its documentation says "that this feature is avilable. And its really useful for development time." Presently i am loading my class files on server (real life application ... here my server is continously and I can not stop or restsrt my server).
My class file gave me some error and i deleated the file and made changes offline and uploaded the new class file. But insted of picking up the new class file it is taking the same old class file (which i had deleted) ... so here i want to use the servlet auto load feature. Can you give me a better picture how to use it or what changes do i have to make in server.xml file. I am using tomcat by virtual hosting.
Is their is another way to make tomcat pick up new class file.

Thanks
nita
 
Nita Kaur
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted a query in this link. But suprisingly i am not been able to see it.....what is going here
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yet to install Tomcat 3.2. Currently use 3.1 ver only. Did you get a chance to read those docs come with installation?
In 3.1 version we have to add this line to .../conf/server.xml file. I try to do some search over net and post under this thread if any solution found.
<Context path="/MISApp" docBase="webapps/MISApp" debug="0" reloadable="true" >
</Context>
regds
maha anna
 
omry_y
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I had similar problems (a running servlet was re-compiled, but tomcat wouldnt reload).
I have found that you need to add the tag specified in previsous messages to server.xml, but in addition, in order of the servlet to reload, it must NOT be in the tomcat classpath when its running.
make sure its not in the classpath, and make sure you dont have an old copy somewhere in the classpath what you can do, is to search the entire disk for the specified class(s) and make sure there is only one instance of it, and thats the instance in webapps/yourapp/classes
hope it helps (works for me).

Omry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic