包含与Maven的JSTL依赖关系 [英] Include JSTL dependency with Maven

查看:425
本文介绍了包含与Maven的JSTL依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用maven2,如何向JSTL添加依赖项(JSP标准标记库)?

I am using maven2, how do I add a dependency to JSTL (The JSP Standard Tag Library) ?

推荐答案

你需要将它添加到您的pom.xml文件中。

You need to add it to your pom.xml file.

在依赖项节点中,您需要添加对JSTL的引用。您可能需要将其范围设置为编译。所以它看起来像这样

In the dependencies node you need to add a reference to JSTL. You will probably need to set its scope to compile. So it would look something like this

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>jstl</artifactId>
  <version>"whatever version you need"</version>
  <scope>runtime</scope>
</dependency>

这是假设您在pom.xml或设置中对maven分发存储库有正确的引用。 xml

This is assuming you have the proper references to the maven distribution repository in your pom.xml or settings.xml

这篇关于包含与Maven的JSTL依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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