File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Avoiding context reload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Avoiding context reload" Watch "Avoiding context reload" New topic
Author

Avoiding context reload

Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
I'm using Eclipse and Tomcat to develop my app. Every time I update (and build) a single class the tomcat reload's it's application context. This is so boring because I have to wait almost 90 seconds for the reload, is there a way to avoid such thing?

PS: I dunno if I'm in the correct forum.

Thanks!


SCJP, SCWCD
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

90 seconds sounds like a long time.
How long does it take if you reload the application from the tomcat manager?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
The same time... Our application uses Struts (with Tiles), Spring (for IoC) and Hibernate... We have *only* 73 hibernate entities. Once I saw somebody changing a class in the GUI editor (it was Eclipse) and after build it the changes were reflected automatically in the servlet container (the tomcat) without any context reload.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you sure it was a class running in Tomcat?
I don't know of anyway to reload individual classes without reloading the app.
Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
Hey, I just found it!

I've acidentally changed the property "reloadable" to false in my tomcat context file and voil´┐Ż, every time I build the changes the tomcat JVM is automatically updated!

I'm using MyEclipse and I really don't know how it does that, but its awesome! Maybe this is working only because I have started tomcat inside the IDE, and the might be sharing the same ClassLoader... Whooo, that a great feature!

I'll try at home the same feature using my free environment: Eclipse + Sysdeo.

I let you know if that works too.

Cheers!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Avoiding context reload
 
Similar Threads
tomcat 5 auto reload : Missing web.xml
programmably reload servlet context data
How to reload context in eclipse
In which cases does the container CHECK the web.xml
Tomcat class reloading