当我将<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet' %>
添加到JSP文件时,我得到一个例外
依赖关系:
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
例外:
2019-04-10 11:28:17.573 ERROR [http-nio-8080-exec-6][PortletRequestDispatcherImpl:331] Unable to dispatch request: /jsp/departments.jsp(9,62) PWC6188: The absolute uri: http://java.sun.com/portlet cannot be resolved in either web.xml or the jar files deployed with this application
2019-04-10 11:28:17.574 ERROR [http-nio-8080-exec-6][PortletServlet:112] javax.portlet.PortletException: org.apache.jasper.JasperException: /jsp/departments.jsp(9,62) PWC6188: The absolute uri: http://java.sun.com/portlet cannot be resolved in either web.xml or the jar files deployed with this application
javax.portlet.PortletException: org.apache.jasper.JasperException: /jsp/departments.jsp(9,62) PWC6188: The absolute uri: http://java.sun.com/portlet cannot be resolved in either web.xml or the jar files deployed with this application
at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:333)
at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:145)
将<%@ taglib uri ='http://java.sun.com/portlet'prefix ='portlet'%>更改为http://java.sun.com/portlet_2_0'prefix ='portlet'%>