Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

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

Avatar

Level 7

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.

1 Accepted Solution

Avatar

Correct answer by
Level 1

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'.

View solution in original post

4 Replies

Avatar

Level 8

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.

Avatar

Correct answer by
Level 1

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'.

Avatar

Level 1

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;

Avatar

Level 7

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"?