运行时类路径可能被重复和/或不同版本的 EL API 污染
在其中一个回复中,BalusC 提到了
初学者中的一个常见错误,即他们将 servletcontainer/appserver 的库复制到 /WEB-INF/lib 中,因为他们在 IDE 中遇到编译错误(找不到 javax.servlet 等)在)。复制库是错误的解决方案。您应该将服务器集成到同一个 IDE 中,并将 IDE 项目配置为引用/关联有问题的服务器,以便 IDE 能够自动将其库放入项目的构建路径中。
我是一个初学者,需要了解我应该为以下陈述做什么。 “您应该将服务器集成到同一个 IDE 中,并配置 IDE 项目来引用/关联有问题的服务器”
谢谢, 阿林达姆。
In one of the responses, it has been mentioned by BalusC
A common mistake among starters is namely that they copy the servletcontainer/appserver's libraries into /WEB-INF/lib because they got compilation errors in the IDE (javax.servlet not found and so on). Copying the libraries is the wrong solution. You should rather have integrated the server in the same IDE and configured the IDE project to reference/associate the server in question so that the IDE will automagically take its libraries in the project's buildpath.
I am a starter and need to understand what am I supposed to do for the following statement.
"You should rather have integrated the server in the same IDE and configured the IDE project to reference/associate the server in question "
Thanks,
Arindam.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于我自己的项目,我使用 Maven 3。它让我可以说:
神奇的词是
provided
这意味着:将其添加到类路径中进行编译,但不要将其放入 WAR 中!For my own projects, I use Maven 3. It allows me to say:
The magic word is
<scope>provided</scope>
which means: Add this to the classpath for compilation but don't put it in the WAR!我通过在 ant 脚本 build.xml 的 classpathref 中添加这些 jar 文件路径解决了问题。
设置路径如下:
I got the problem solved by adding those jar file path in the classpathref in the ant script build.xml.
Set the path as follows: