如何将jstl添加到Liferay portlet?

sto*_*ark 8 jstl liferay

我一直在这里寻找SO和其他地方,我还没有找到这个问题的确切答案.所以这里:

在Liferay portlet中添加支持以使用JSTL标记的最佳方法是什么?

当然,我已经找到了关于如何将taglib添加到Web应用程序的通用答案,但不是专门针对Liferay的.

sto*_*ark 11

您只需要添加jstl-api.jarjstl-impl.jar您的portlet依赖项.

这些jar文件已经在Liferay中webapps/ROOT/WEB-INF/lib.

所以只需将其添加到文件liferay-plugin-package.properties:

portal-dependency-jars=jstl-api.jar,jstl-impl.jar
Run Code Online (Sandbox Code Playgroud)