Fixing PWC6188 JSTL Error on JSP

Fixing PWC6188 JSTL Error on JSP

Prerequisites

Portlet module with JSTL core included on JSP:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

Error


Such exception may be thrown after portlet deployment:

2020-03-18 17:42:26.302 ERROR [http-nio-8080-exec-8][PortletRequestDispatcherImpl:295] Unable to dispatch request: /view.jsp(1,1) /init.jsp(3,66) PWC6188: The absolute uri: http://java.sun.com/portlet_2_0 cannot be resolved in either web.xml or the jar files deployed with this application
2020-03-18 17:42:26.303 ERROR [http-nio-8080-exec-8][PortletServlet:112] javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(1,1) /init.jsp(3,66) PWC6188: The absolute uri: http://java.sun.com/portlet_2_0 cannot be resolved in either web.xml or the jar files deployed with this application
javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(1,1) /init.jsp(3,66) PWC6188: The absolute uri: http://java.sun.com/portlet_2_0 cannot be resolved in either web.xml or the jar files deployed with this application
    at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:297)
    at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:124)

Fix


Add the following lines to portlet's module bnd.bnd file:


-jsp: *.jsp,*.jspf
-plugin.jsp: com.liferay.ant.bnd.jsp.JspAnalyzerPlugin
-plugin.resourcebundle: com.liferay.ant.bnd.resource.bundle.ResourceBundleLoaderAnalyzerPlugin
-plugin.sass: com.liferay.ant.bnd.sass.SassAnalyzerPlugin
-sass: *
-sources: true

Comments

Popular posts from this blog

Liferay Search Container Example

Liferay DXP - max upload file size

Liferay Keycloak integration