Reputation: 3704
I have tried to add external jar to eclipse project and it works in "Run as -> GWT application" mode only. But when I deploy it to Tomcat the external jar is missing in the exported WAR file :( Please tell me how can I add an external lib to gwt project to have it be added automatically to exported war file (servlets use it)?
Any useful comments are appreciated
Upvotes: 2
Views: 3997
Reputation: 703
1/ Click Project -> Properties -> Project Facets :: Convert to faceted form;
2/ Check Dynamic Web Module;
3/ Add *.jar to /war/WEB-INF/lib, it automatically will be referenced by eclipse into "Web App Libraries" and be exported with *.war
Upvotes: 2
Reputation: 54810
Add the file to the war/WEB-INF/lib folder. You can simply drag the file to that folder. Then add the file your build path by right clicking on the project -> properties -> build path -> libraries tab.
Upvotes: 4