2
votes

i have eclipse installed with tomcat 7. whenever i run my webapp, tomcat deletes the jar files (poi jar file) located in my web-inf/lib folder. has this happened to any of you and how do i stop this?


EDIT: this is the location of my lib folder. The project is named poiexample

enter image description here

1
Which WEB-INF/lib folder? The one in the WebContent directory of Eclipse? Please show us a screenshot or something helping to understand where these jara files are. - JB Nizet
edited my post, including the screenshot :) - user582485

1 Answers

3
votes

You put jar files in the target directory of Eclipse, i.e. in the directory that is generated and populated by Eclipse when building the webapp. So of course, each time Eclipse deploys the webapp, it cleans this directory, and deploys the new version.

You should put the jar file in your source project tree, under WebContent/WEB-INF/lib. The jars in this directory will be part of the webapp's build path automatically, and will be copied to the target WEB-INF/lib directory at deployment time by Eclipse.