• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Iam working with tomcat(in Unix environment),my web server is not loading the .class file once i compile,so every time i compile, i have to restart my webserver. i have my class file and java file in webapps/ROOT/WEB_INF/classes.i don't know whether it takes time or i have to do something to get the .class file automatically loaded.
Thank for your time.
Raj
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a typical problem.
Being able to dynamically reload classes is the exception rather than the normal behaviour, so Yes, you do have to restart every time you change a class file.
You'd find the same thing if you were designing a Swing application. If you start the application, access a class and then alter and recompile the class, you won't see the changes without restarting the application.
This expectation has been created (I believe) by the dynamic reloading of JSPs. This is a longer topic than I have time to write right now
Dave
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about writing your own dynamic class loader.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Um, yeah, right.
The other option that is available if your server supports it and you have written your code properly, is the ability to restart invividual web applications.
This is only one step better, but if you have a heavy server (eg WebSphere) running multiple web applications, this is definitely preferable.
Dave
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat supports reloading individual applications. Since 4.1.12, there is a manager application that you can use to reload a web app, and since I forget when, you can specify the application as 'reloadable' in the server.xml config file.

This is not hard stuff, though some people have had flakey behaviour with reloadable, I think this has mostly been addressed in later releases.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic