Sharing Vaadin jar among several webapps in Tomcat

Hi,
I’m using vaadin to develop several webapps. My deployment environment is apache tomcat. In order to use vaadin I know that I have to put the vaadin jar in the /lib project folder, but I’d like to know if there is a way to share the vaadin jar among several webapps. I tried to copy the jar into the /lib tomcat folder, but it does not work.

Thanks a lot
Gianpiero

Hi,

It’s generally a better idea to just copy the jar into each web-app - this allows you to make the entire webapp self contained, and avoides any classloader issues (and allows different applcications to use differrent version of libraries)

If you really want to do this, though, they should be placed in TOMCAT_HOME/common/lib

See
this Stackoverflow question
for more discussion on pros and cons.

Cheers,

Charles

Ok, thanks for your answer.

After your answer I think it is better to copy the jar into each webapp, btw If the jar is placed in TOMCAT_HOME/common/lib (TOMCAT_HOME/lib, TOMCAT_HOME/shared/lib, etc) the webapps don’t start.

Thanks again
Gianpiero