今天新建了個web項目,試了下buildPath來添加jar包,結果運行時提示找不到相關jar包;後來將jar包複製到WEB-INF/lib下,運行成功。而後在網上查了下,原來如此:web
Build path jars are not a part of your web app.
On the other hand, the WEB-INF/lib
jars are a part of your project.app
The advantage of having WEB-INF/lib
jars over build path jars is that they get bundled into your app when generating a WAR
file.
This comes in handy when you want to deploy your app on some server where you don't have access to modify the jars in the build path.ui