Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat class file problem

 
Neo Wills
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the class file of the applet and the servlet that are to be run on tomcat4.1 .So i copied the file into the webapps directory. When i try to run the applet and the servlet using the URL it does not run the latest class file version that i copied. But when i compile the code inside the tomcat directory it works with the latest version.
Is there any way i can work with copying the class file???

Bharath
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you restart the web app?
 
Neo Wills
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..

I can work with compiling it. Just wanted to know if thats the way Tomcat works or its only with my server?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How could you possibly expect it to work without compiling it?
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Barath,
I think that you must compile the Java classes first before you deploy those into Tomcat. You can use Apache Ant to do that task.

Correct me if I am wrong...

Regards,
Daniel
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat's <Context ..> entry has a reloadable, which when set to true will cause Tomcat to monitor your class files and automatically reload your application if one is updated.
See:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

It will not, however, recompile your classes when the source files are uploaded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic