@include -> cannot resolve

Hello,

I have a problem with the @include file="..." in a jsp. The include path and file cannot be resolved by IDEA. All paths are set, all sources, classes and libs can be found by IDEA. My include file is in a folder IDEA knows as a source folder. Code is

<%@ include file="/templates/resource_includes.jinc"%>

The folder "templates" is in a Content Root I have mounted. Any trials to lead idea to this folder did not work.

Is there a special hint how to teach the IDE to find includes?
Thanx
Toby

6 comments
Comment actions Permalink

Do you have .jinc set as a "Recognized File Type" in Settings/File Types?

"Tobias Beckhoff" <no_mail@jetbrains.com> wrote in message
news:13875.1127999106644.JavaMail.itn@is.intellij.net...

Hello,

>

I have a problem with the @include file="..." in a jsp. The include path
and file cannot be resolved by IDEA. All paths are set, all sources,
classes and libs can be found by IDEA. My include file is in a folder IDEA
knows as a source folder. Code is

>

<%@ include file="/templates/resource_includes.jinc"%>

>

The folder "templates" is in a Content Root I have mounted. Any trials to
lead idea to this folder did not work.

>

Is there a special hint how to teach the IDE to find includes?
Thanx
Toby



0
Comment actions Permalink

Is it sufficient that it is in a source folder or does it have to be in
a web resource folder?

0
Comment actions Permalink

checked, jinc is a known filetype

0
Comment actions Permalink

Interesting idea, i tried, but no effect

0
Comment actions Permalink

we have the same problems; using 4.5.4

<%@ include file="../head.inc.jsp" %>

inc.jsp registered as jsp file type

Directory x configured as Web-Application, directory (x\y\) of head.inc.jsp as source folder

Help!

0
Comment actions Permalink

Jsps are expected to be in web resource directories , or
otherwise references to them (from other jsps) will not be resolved by IDEA

Martin Lang wrote:

we have the same problems; using 4.5.4

<%@ include file="../head.inc.jsp" %>

inc.jsp registered as jsp file type

Directory x configured as Web-Application, directory (x\y\) of head.inc.jsp as source folder

Help!



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.