3386 JSP and Javascript Parsing

Now that 3386 has fixed the 100% cpu system thrashing bug
when loading JSP files, I have been checking out how IDEA
parses my project's JSP and javascript files.

Following are biggest issues I found:

(1) IDEA doesn't resolve variables defined in included JSP files.

Most of the incorrect errors IDEA is flagging in my JSP
files are because all our JSPs include another
"GlobalCode.jsp" which defines some variables like

User user;
String login;
URLState uState;

These variables are referenced in the main JSP pages. IDEA
doesn't resolve them from the included "Global.jsp" and
flags them as "unresolved symbols". (See attached pic).

Related Trackers:

http://www.jetbrains.net/jira/browse/IDEABKL-381
Non-trivial JSP include file="" lead to red code in including JSP

http://www.jetbrains.net/jira/browse/IDEA-2440?vote=vote
JSP parser gets confused by includes

(2) IDEA is flagging unhandled exceptions as errors even though
errorPage is defined.


http://www.jetbrains.net/jira/browse/IDEADEV-1230
Exception is reported unhandled in JSP

http://www.jetbrains.net/jira/browse/IDEA-2693
Exceptions reported as unhandled in JSP


(3) Javascript issues

JSP's are incorrectly parsed inside javascript blocks http://www.intellij.net/forums/thread.jsp?forum=22&thread=147887&tstart=0&trange=30 JavaScript: Incorrect error highlighting / Inner functions http://www.jetbrains.net/jira/browse/IDEADEV-1506 (4) One formatting item I did try was the option to a separate page import directive for each import. When I reformatted a JSP which had a single page import directive for 20 classes, it had no effect. (Also, the reformat took a very long time like 45 seconds; Seems slower than reformatting an equivalent java file.) http://www.jetbrains.net/jira/browse/IDEA-2940 JSP imports layout ->]]></span> Prefer one import statement per page directive selected has no effect.<br/><br/><br/>A couple exceptions I hit while loading JSP files. The number of exceptions<br/>is way down with build 3386. Looking more stable.<br/><br/>http://www.intellij.net/tracker/idea/viewSCR?publicId=49964<br/>http://www.intellij.net/tracker/idea/viewSCR?publicId=49959</p><br/><br/>Attachment(s):<br/><a href="http://adm-10980.intellij.net/zendesk-forum-storage/jc/4880371/unresolved_symbol_login_from_included_jsp.gif">unresolved_symbol_login_from_included_jsp.gif</a><br/>

2 comments
Comment actions Permalink

I also work with JSP and try to separate common code in differents files.

I quite agree with the first point you've described.

In fact, I'm wondering if this issue could be solved.

0
Comment actions Permalink

Three JSP files in my project failed to parse. IDEA throws Exception when loading these files into the editor.

I attached the JSP files to the Jira Bug.

http://www.jetbrains.net/jira/browse/IDEA-3204

0

Please sign in to leave a comment.