RE: intellij cannot resolve init.jsp

Nestor cruz, modified 7 Years ago. Junior Member Posts: 48 Join Date: 2/15/15 Recent Posts

Greetings community


I'm starting to use intellij together with the liferay plugin, according to this tutorial. When you open a project, the following error messages are displayed in the * .jsp files

cannot resolve init.jsp
apparently the instruction <% @ include file = "/ init.jsp"%> has failed, since you do not load the references of the init.jsp

 

Any suggestion or guide will be of great help

thumbnail
David H Nebinger, modified 7 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

It is an intellij thing.

I tend to ignore the init.jsp file while I'm building my JSP pages.  When I'm done, I'll move imports, declarations and tag libs over to init.jsp.

thumbnail
Dominik Marks, modified 7 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts

Hello Nestor,

 

there is a functionality inside the IntelliJ plugin to detect absolute paths to JSP includes (like "/init.jsp"). This requires that your project is a valid "Liferay workspace".

To be a valid "Liferay workspace" you have to either apply the "com.liferay.workspace" plugin in your gradle build file, or you have to apply the "com.liferay.portal.tools.bundle.support" plugin in your maven build file (depending on if you are using gradle or maven).

Is your project a valid "Liferay workspace"?

Nestor cruz, modified 7 Years ago. Junior Member Posts: 48 Join Date: 2/15/15 Recent Posts

Hi Dominik

Thanks for the response and the suggestion

I commented to you that I am using the plugin that provides liferay, but I have managed to solve the reference problem by adding the absolute path "./init.jsp"

I will put into practice what you mention and I will tell you the results