Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
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
Charles Anthony: 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)
Ok, thanks for your answer.
Charles Anthony:
If you really want to do this, though, they should be placed in TOMCAT_HOME/common/libSee this Stackoverflow question for more discussion on pros and cons.
Cheers,
Charles
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