Eclipse: including libraries with war file project

梦想的初衷 提交于 2019-12-11 01:55:40

问题


I use the jstl library in my project, but as an external jar. After exporting my project to a .war file, these libraries are not included and I'm getting errors. How do I make sure the library is included in my war file?

Also, an unrelated question, if an ear file would have only one war module, is there a point to making it an .ear instead of .war


回答1:


If you have put the jstl jars inside WebContent directory they will be packed in your WAR file. But if you are loading them from somewhere else make sure that you have them in your export list (Project Properties -> Java Build Path -> Order and Export).

If you have an EAR file you can make some extra settings in your application.xml file, or even some container specific ones.



来源:https://stackoverflow.com/questions/6992060/eclipse-including-libraries-with-war-file-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!