taglib including

Hello everyone,

I have a problem which is a little bit unusual. I have a few uri's for taglib including, action mappings, message resources e.g. that are incorrect during devlopment time. An Ant build copys the files to the correct paths befor the deployment. I don't know which idiot started this, but for this project, it is common standard... :(

Thus, intellij can't include the taglibs or resolve frowards an such stuff. Jsp's are mostly red and code completion works only in small bits. Caused by the fact, that I'm not allowed to change most of the files I search for a possibility to tell intellij that for example:

<%@ taglib uri="/WEB-INF/lib/struts-tiles.tld" prefix="tiles" %>


<%@ taglib uri="/foo/bar/struts-tiles.tld" prefix="tiles" %>

Is something like this possible?

Thx heaps for help.

Comment actions Permalink

You can configure those as an external resource. There should be a quick fix (alt-enter) on the error highlighting in the editor.
Otherwise go to Settings -> IDE Settings -> Resources and configure resources for the incorrect URIs.
Two caveats:
Those settings aren't stored in the project, so they are not easily shareable between developers.
You have to have the corresponding files in your file system, though I think you can point at a path inside a jar, too, when browsing for the "Location".

Comment actions Permalink

You can also map your /foo/bar/ directory to "/WEB-INF/lib" in your web
facet settings.

Comment actions Permalink

Dmitry, I'm having a similar problem - our build process assembles external resources into the final WAR, so my TLDs are not in my project's WEB-INF directory during development. I tried to configure the TLDs as external resources, but that would not work. I was finally successful when I took your advice to modify the web facet, adding additional resources there.

However, this is extremely inconvenient, as I'll need to provide these four to six mappings for the six or seven web applications I work on, as opposed to one time for each TLD project-wide. Furthermore, since these modules were generated from an external model - Maven, in my case - I'm quite concerned that every time a pom changes I'll lose my extra mappings in the web facet.

I'm running Idea 8.1 build #9732 on a Windows XP box.

Is there a reason that my mapping of external resources shouldn't work? Here's an example:
URI: /WEB-INF/cmstags.tld
Path: C:/projects/content-management/config/cmstags.tld

My project is located in C:/projects/portal-distrib, with my WEB-INF directory at


Please sign in to leave a comment.