Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Tomcat class file problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat class file problem" Watch "Tomcat class file problem" New topic
Author

Tomcat class file problem

Neo Wills
Ranch Hand

Joined: Nov 29, 2006
Posts: 40
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

Joined: Jan 10, 2002
Posts: 61316
    
  66

Did you restart the web app?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Neo Wills
Ranch Hand

Joined: Nov 29, 2006
Posts: 40
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

Joined: Jan 10, 2002
Posts: 61316
    
  66

How could you possibly expect it to work without compiling it?
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: Tomcat class file problem