JSP Problems with 4.0.3 and Pallada 2013

Hi,

I've setup a web-module and I have servlet-api and jsp-api as global libraries. I've even tried having the j2ee as a global library. The problem consists in the following thing: all the jsp tags and java code in a JSP page get marked in red as errors. I can't seem to figure out why. I've tried it a million ways. My code works fine - I've tested things on orion and orion doesn't complain - the code gets compiled down to servlets and everything is okay. Idea can't parse the jsp-s correctly or I'm doing something awfully wrong.

Please advise,

Carlspring

7 comments
Comment actions Permalink

Carlspring,

In the configuration dialog box for your web module, click on the tab that says "Web Module Settings". Down at the bottom you'll find the Web Resource Directories section. You need to set the directory in your source root which contains the WEB-INF folder as the Web Resource Directory and "/" as the Relative Path in Deployment Directory. This tells IDEA where to find the .tld files for your custom tags.

I don't have scriptlets <% ... %> in my JSP's so I can't say for sure if that will fix those, but it should at least fix the custom tags.

Justin

0
Comment actions Permalink

Mr. Ashworth.

I have correctly setup my web module. My project is fine.
The tips you gave me, I had already done. It sounded ridiculous that it wouldn't work, so I looked around a lot and asked if people were experiencing the same weird problem. I was told that it was a linux-specific problem, so I researched that. I am using linux-2.6.5. As far I as got concerned, the binaries of the linux jsdk were compiled on 2.4.2x. Now, I don't see how that is relevant, but it appears that the way files get copied is different and when idea tries to cache the jars, it all gets mucked up because of the new way sendfile() works. I found and applied the attached patch against 2.6.x kernels, on this forum (and I think that along with the following options it all got fixed). Once I patched it, I added:

-Didea.jars.nocopy=true -Didea.no.jdk.check=true

to the ./bin/idea.sh file everything started working just fine. (After all, I've been using Idea for a long while and the JSP parsing used to work fine in versions < 4.0 / Pallada. Apparently, the problem must've appeared since I moved on to 2.6.5 a few weeks ago. I just didn't need to develop JSPs for a while. I believe, though, that this is not only a jsp related problem.)
The way idea checks for the version of the jsdk is not all that correct. I use the latest sdk from Sun and Idea doesn't recognize it, so that's why I use -Didea.no.jdk.check=true

Thanks for trying to help. I guess this is a kernel/jdk specific problem and not quite an idea one, even though it does seem to affect this wonderful IDE!

All the best,

Carlspring

PS: Credits to the great guys on the forum who found/wrote the patch for the sendfile() problem in 2.6.x and made it available to the public.



Attachment(s):
sf.patch
0
Comment actions Permalink

Ah, now that you mention you're running with the Linux 2.6 kernel it all makes sense. I actually just switched to 2.6.5 (Gentoo) two days ago and a coworker who was the guinea pig before me told me about the -Didea.jars.nocopy=true before I had any problems. I haven't needed the other flag you mentioned, but if you are using CVS and aren't already using the -Dcvs.dont.read.in.thread=true, then you should certainly add that because it speeds up CVS access considerably.

Justin

0
Comment actions Permalink

BTW, I didn't need to patch my kernel but I'm running with the Gentoo sources, which may already be patched.

0
Comment actions Permalink

Well, I use the original sources from kernel.org. Otherwise I'm only using slackware on my laptop and the kernel I've got is 2.6.5. Well, are you using the no cache option or what?

0
Comment actions Permalink

2.6 kernel thing is fixed in latest (2026) build avaliable.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Cheers!

Keep up the good work, guys!

All the best,

Carlspring

0

Please sign in to leave a comment.