使用Eclipse / Tomcat自动添加第三方jar到WEB-INF / lib [英] Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat

查看:208
本文介绍了使用Eclipse / Tomcat自动添加第三方jar到WEB-INF / lib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Eclipse上设置的动态Web项目,我使用Tomcat 7作为我的Web服务器。它似乎不会自动将第三方JAR添加到我的库的建立路径到WEB-INF / lib文件夹。有没有办法自动做这个?每次我找到一个答案,我会发现像这个



那么我该怎么做呢?有没有办法配置我的构建路径来做到这一点?

解决方案

以下是Helios的说明。对于早期版本,请参阅SeanA的答案。


  1. 项目属性 - >部署程序集

  2. 添加 - > Java构建路径条目

  3. 您现在应该可以看到构建路径上的库列表,您可以指定它们列入完成的WAR。

  4. 选择所需的并点击完成。


I have a dynamic-web project set up on Eclipse and I'm using Tomcat 7 as my web server. It doesn't seem to be automatically putting 3rd party JARs I add to my library on my build path into the WEB-INF/lib folder. Is there a way I can do this automatically? Every time I search for an answer to this, I find something like this.

So how do I do that automatically? Is there a way to configure my build path to do this?

解决方案

Here are the instructions for Helios. For earlier releases, see SeanA's answer.

  1. Project Properties -> Deployment Assembly
  2. Add -> Java Build Path Entries
  3. You should now see the list of libraries on your build path that you can specify for inclusion into your finished WAR.
  4. Select the ones you want and hit Finish.

这篇关于使用Eclipse / Tomcat自动添加第三方jar到WEB-INF / lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆