How to make /lib/foundation/global.jsp known to the IDEA (IntelliJ IDEA) | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

How to make /lib/foundation/global.jsp known to the IDEA (IntelliJ IDEA)

  • October 16, 2015
  • 4 replies
  • 1748 views

Hi,

We have a content bundle in our project and quite a few of our project's JSP files are using /lib/foundation/global.jsp. However it is not resovled by the IDE, and hence "<%@include file="/libs/foundation/global.jsp"%>" is marked as error as well as all references to properties, currentStyle, etc.

Is there a way to make it known to the IDEA?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by zhang_alan

First, make sure you have the file global.jsp under /libs/foundations folder in your IntelliJ, then right-click jcr_root folder, find and click 'Make Directory As' -> 'Resources Root'.

4 replies

Level 8
October 16, 2015

I use Eclipse, so I'm not sure if this method will work with IntelliJ, but i added the global.jsp file to my project under jcr_root/libs/foundation/global.jsp and included the file in my components using <%@include file="../../../global.jsp"%> (obviously the number of ../ will depend on your component structure) and was able to get intellisense working correctly.

zhang_alanAccepted solution
October 16, 2015

First, make sure you have the file global.jsp under /libs/foundations folder in your IntelliJ, then right-click jcr_root folder, find and click 'Make Directory As' -> 'Resources Root'.

October 16, 2015

Just make sure you downloaded from JCR the global.jsp, rrefreshed your IDE, and linked to it through jsp include,  <%@include file=""%>

The file must be in your filesystem. So add it to vlt filter.xml file. As global.jsp adds a lot of dependencies to jar for taglibs, you need to have them on your classpath set on IDE project configuration. (or in Maven poms files)

Hope helps;

LinearGradient
Level 6
October 16, 2015

svenancio wrote...

Just make sure you downloaded from JCR the global.jsp, rrefreshed your IDE, and linked to it through jsp include,  <%@include file=""%>

 

Sorry, could you please clarify what you mean by "downloaded from JCR the global.jsp"?