Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes IDEs, Version Control and other tools and the fly likes Question on JAR file in Tomcat\lib directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Question on JAR file in Tomcat\lib directory" Watch "Question on JAR file in Tomcat\lib directory" New topic
Author

Question on JAR file in Tomcat\lib directory

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

In Eclipse I have a project where in the build path under the Libraries tab there is listed Apache Tomcat v6.0 [Apache Tomcat v6.0] because in the Tomcat\lib directory there are a number of jars that pertain to this project. I have updated one of the jars in this library. However, when I'm using the debugger in Eclipse and I reference the compiled class in this jar it does not show the updated class where I added 4 lines of code and that I exported out to this jar. I have verified that the jar that I exported to this directory contains the updated class in the jar but again, the debugger appears to show a non-updated class from somewhere else.

Does Tomcat cache in some way files in the lib directory?

Any suggestions or direction would be greatly appreciated.

Thank you.

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

My apologies, but my problem was resolved..

Thanks.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(It's good to follow up with the solution so other people can benefit from your knowledge--thanks!)
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

My apologies - but I'm not sure how my problem was resolved. All I did was try to export the JAR again to the Tomcat\lib directory and then I was able to see it in Eclipse. Unfortunately, I cannot tell you what resolved the issue. I just did it again.

Regards.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ah. Also, FWIW, be cautious about putting application-specific libraries in the Tomcat lib directory--this can cause problems with just a single application, but with multiple applications, the situation becomes much worse when different versions of the same library are required. In general, deploy application libraries with the application.
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Thanks, David. Appreciate the info.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question on JAR file in Tomcat\lib directory