IntelliJ IDEA 12 - JSP Code completion/resolution not working

I am running IntelliJ 12 (Utlimate) and am still having problems w code completion in JSP files.

I am getting JSP highlight errors

  1. <%@page import=""%> saying "Element page not allowed here".
  2. <%@include file = "includes/header.jsp" %> saying "Element include doesn't have required attribute 'page'"

The following does not work:

  1. Code complete on ANY class (event a String foo = "hi"; foo.<auto-complete> yields nothing)
  2. Custom taglibs are not resolved

All of the code works perfectly when deployed to the app server and also if pre-compiled w maven JSPC plugin.

I tried playing around w Project Structure settings to no avail. Help!

My Project structure is split

  1. parent: contains dependency mgt for the following sub projects
  2. bundle maven project: contains my osgi bundle w my compiled java code
  3. ui maven project: contains all my JPSs, and has dependency "bundle"

Also, im on OS X 1.8 running JDK 1.6


Also, I tried uninstalling, deleting all IDEA12 preferences, saved/state and re-installing with JSP Plugin enabled. and the problem persists.

1 comment
Comment actions Permalink

I figued it out .. When installing IDEA12 you have the option to include/exclude certain things. When i installed i disabled the "Java EE Integration" plugin but selected "JSP" to be enabled. This is NOT sufficient.

To get JSP Code Completion, you must ENABLE in Plugins: Java EE Integration.

As a side note; All imports/dependencies used in JSPs (import statements, etc.) must also be included in your Project Structure for whatever Modules contains your JSPs.

In my case, I had to add Module deps to my UI project which contained all my JSPs even though they are provided by the container.


Please sign in to leave a comment.