简体   繁体   中英

Unable to export non-jar files when web project is exported as a war file from Eclipse

I have developed a dynamic web application in Eclipse. I am using Tomcat as a server. In my lib folder I have placed one non-jar files( addressing.mar ). This file is necessary other wise I get an error in my application.

Now I export my project as war file and then deploy the project on Tomcat server. When I run the project I get an exception because addressing.mar cannot be found in the lib folder of the project. I don't know why addressing.mar isn't exported. If I manually place file in it, it is working, but I need a better solution.

Right click the project, open properties. Under the Deployment Assembly page, you can configure what resources to include during export and their path in the WAR file. Just include your jar there and it will show up next time you export.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM