Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Automatic Class reloading in Tomcat 3.2.3

 
DC Dalton
Ranch Hand
Posts: 287
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im working on a site that does NOT have it's own instance of tomcat (Im really used to having my own instance) My problem is class file reloading when a change has been made. At this point I am stuck emailing the systems admin. to have them restart the engine but that is getting old real quick! Is there a way to add something to the web.xml file to have 3.2.3 automatically reload classes when a newer version is uploaded. I must admit my XML isnt what it should be so a detailed explanation and maybe some sample code would REALLY help out here. Thanks to all in advance.
 
sonny kher
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know (and maybe u knew this already) that by having the reloadable option in the context declaration in the server.xml file u can get what u want
<Context path="/yourapp" docBase="yourAppDir" reloadable="true">
but u probably cannot edit the server.xml file, i am not sure u can override this in the web.xml file
 
DC Dalton
Ranch Hand
Posts: 287
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes thanks I knew that and yes again I have no access to the server.xml ONLY the web.xml which is why I was asking that question.........thanks anyways
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I suppose asking the admin of the site to please change reloadable to true has produced unsatisfactory results?

I'd go guerilla and download the entire site to my local instance, do all my development work on my own Tomcat, and then upload once when it was all done. This of course, means you need FTP access to pull stuff out of WEB-INF, but perhaps that is possible?

Who can say how admins think.
 
DC Dalton
Ranch Hand
Posts: 287
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah that's what I've been doing but there are always changes that have to be made. I have come up with a stupid way of getting around this for any of those of you that are stuck like me........works 90% of the time. What I do is delete the class file and then try to load the page........of course it crashes and throws an exception. Then I upload the new class file and it does reload.......not a great idea but it usually works and it's better than waiting 8-10 hours for tech support to restart the instance.
 
madhu gun
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am using Tomcat4.0 as StandAlone but it is Not reloading my servlets or beans (but does for jsp/html) .I have my web-app context in server.xml like this.
<Context path="/test" docBase="examples" debug="0"
reloadable="true">
Why it is NOT working without RESTARTING the Tomcat.

Can anybody help .
Thanks in advance
madhu
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic