Spring和Portlet标记的Maven依赖关系

编程入门 行业动态 更新时间:2024-10-26 05:29:40
本文介绍了Spring和Portlet标记的Maven依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Netbeans IDE中遇到以下问题-当我创建一个JSP文件并将这两个taglib放入其中时

I have this following problem in Netbeans IDE - when I create a JSP file and put these two taglibs inside

<%@taglib prefix="portlet" uri="java.sun/portlet_2_0" %> <%@taglib prefix="form" uri="www.springframework/tags/form"%>

然后我得到错误The absolute uri ... cannot be resolved.因此,我想知道问题出在哪里?将应用程序部署到AS时,它可以正常工作,但是在开发过程中,我喜欢自动完成之类的事情.我的pom.xml看起来像这样- PasteBin .

then I get error The absolute uri ... cannot be resolved. So I am wondering where could be the problem?Application is working correctly when is deployed to AS but I would like to enjoy things like autocompletion during development. My pom.xml looks like this - PasteBin.

我想我在类路径上具有所有必需的JAR,那么如何使NetBeans识别这些标记?

I suppose I have all the necessary JARs on classpath so how can I make NetBeans to recognize those tags?

推荐答案

要解决portlet TLD问题,请将其添加到您的POM

To fix the portlet TLD problem add this to your POM

<dependency> <groupId>javax.portlet</groupId> <artifactId>portlet-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency>

提供的范围很重要-请记住,您只希望将此内容包括在内以在IDE中进行验证. portlet TLD将由您要部署到的任何JSR-286实现提供. Liferay,uPortal等.

The scope of provided is important - bear in mind you just want this to be included for validating in your IDE. The portlet TLD will be provided by whichever JSR-286 implementation you are deploying to e.g. Liferay, uPortal etc.

这在Eclipse中对我有用,我想它也会在NetBeans中发挥作用.

NB this worked for me in Eclipse, I presume it will also do the trick in NetBeans.

更多推荐

Spring和Portlet标记的Maven依赖关系

本文发布于:2023-10-07 17:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1470018.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   关系   Spring   Portlet   Maven

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!