As agreed with Piotr Filipowicz, the easiest way to include JSP in your Liferay theme is to create a “jsp” folder in your ${plugins_sdk}/themes/${customized theme folder}/docroot/_diff directory and deposit all of your customized jsp in the jsp folder.
To include the jsp in the vm template (for example portal_normal.vm), simply call the following code:
$theme.include($themeServletContext, “/jsp/test.jsp”)
Note:
You might need to include “portal-impl.jar” under your theme directory (${theme folder}/WEB-INF/lib) if you need to call classes from the following packages:
- com.liferay.portal.model (Theme)
- com.liferay.portal.theme (ThemeDisplay)
- com.liferay.portal.util (WebKeys)
portal-impl.jar can be found at ${liferay folder}${tomcat folder}webappsROOTWEB-INFlib
References:
Tips & Tricks: include jsp into vm template by Piotr Filipowicz