Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updates to classes not "taking"

Status
Not open for further replies.

LFI

Programmer
Apr 27, 1999
1,996
US
Hey, everyone.

As I've begun using JSPs, I've moved away from creating objects and the object-oriented work. This is mostly because whenever I update a *.java file and recompile, I need to bounce our JSP server (JRun) for the JSPs to recognize the updated class files.

I am interested in "fooling around" with *.class files again and was wondering if anyone knew any tricks to breaking the connection between the JSP and the *.class files so that the JSP can go out and find the new class file without having to bounce our server?

Thanks!

--Dave
 
Short answer is no - you cannot update classes without restarting the ClassLoader for that webapp - which I expect (never actually used JRun), means a server restart.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I suspected as much. Thanks for the response!

--Dave
 
Dian,

Thanks for the response.

The only thing I could think to do is delete the files that are auto-generated in the WEB-INF/java/ subdirectory. Is that the server cache? If not, where can I find it?

Thanks again.

--Dave
 
It doesn't matter if you deleted every single .class file on your machine - the ClassLoader will hold the objects in memory - so unless the ClassLoader implementation supports monitoring a directory (and I seriously doubt it does), deleting class files will not work.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks sedj. I have gathered this from failed attempts. :) I was wondering if that is what Dian (Diancecht) meant when referring to "clearing the server cache".

Any ideas?

Thanks again.

--Dave
 
Forget what I said.

I've reread it and I misunderstood the question. I was thinking on jsp cache, not java cache.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top