将JAR添加到IntelliJ中的WEB-INF/lib目录中的正确过程是什么? [英] What's the correct procedure to add JARs into WEB-INF/lib directory in IntelliJ

查看:79
本文介绍了将JAR添加到IntelliJ中的WEB-INF/lib目录中的正确过程是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有一个Java Web项目,我需要将几个JAR放入WEB-INF/lib目录.在Eclipse中,如果仅将那些JAR放置在Eclipse中,则Eclipse会像在类路径上一样将它们拾取.但是,IntelliJ似乎没有.

Say I have a Java web project and I need to place a couple of JARs into the WEB-INF/lib directory. In Eclipse, if you simply place those JARs there, Eclipse picks them up as on the classpath. However, IntelliJ doesn't seem to.

将这些JAR添加到项目中以使它们位于标准WEB-INF/lib目录中的正确方法是什么?

What is the correct way of adding those JARs into the project such that they are in the standard WEB-INF/lib directory?

推荐答案

在项目结构"窗口中,在库"部分中添加JAR之后,您可以转到工件"部分,然后会在注册输出布局" WEB-INF文件夹的外观.在右侧,您会看到可用元素",您可以将其拖放到左侧站点的lib文件夹中.

In the Project Structure window, after adding the JAR in the section "Libraries", you can go to the section "Artifacts" and you'll see in the register "Output Layout" how the WEB-INF folder will look like. On the right side you see "Available Elements", which you can drag&drop to the left site into the lib folder.

这篇关于将JAR添加到IntelliJ中的WEB-INF/lib目录中的正确过程是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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