Take the 2-minute tour ×

I use JSP include and from my IDE (IBM RAD 8) I get an error that it can't find variables and that imports can't get resolved but those variables and imports are actually handled in the file that includes the JSP my IDE is complaining about. So is there some setting or likewise that I can use to get rid of this false positive since it is not a compile error that a JSP that is included uses a variable from the page that includes it? enter image description here For includes we should be able to set what references the include if the IDE can't find it so that this false error won't appear. How is this setting possible?

Thanks for any help

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I had the same problem. You can turn off validation in RAD. If possible, only the .jspf files should be unable to compile, and you can exclude those only. However, if you have uncompilable fragments in .jsp files, you will have to turn off validation for all .jsp files and lose the benefit of .jsp validation!

The process is here. (Although it says RAD 7, it also works for RAD 8.)

  1. First disable validation of .jspf files: http://www-01.ibm.com/support/docview.wss?uid=swg21284702

  2. If you need to disable validation of .jsp files, then go to Window -> Preferences (or right click on the project and select Preferences, to make this change for a project instead of the entire workspace) and go to the Validation option. Uncheck the two checkboxes for JSP Syntax Validator. I don't recommend doing this, because RAD will no longer help you find legitimate JSP syntax errors, but your project should validate and compile if there are no other errors.

share|improve this answer
Thank you for the answer. I'm wondering how to enable validation, not how to disable it. –  Niklas Rtz May 18 '12 at 6:18
I'm confused, you wanted a "setting or likewise that I can use to get rid of this false positive"-- that is exactly what turning off validation will do. If the code is valid, it will still compile. As you said in your previous answer "Validation of JSPF is broken", which I agree is true when compiling across include files that don't compile on their own, so why would you want it enabled? –  k-den May 18 '12 at 14:43
OK I suppose the only way to deal with my problem is to turn off validation. It is not professional by IBM to sell a product which has broken features. –  Niklas Rtz May 21 '12 at 7:23

If you use the default jspf extension for fragments, the IDE should be able to distinguish between pages and their dependencies. See RAD Infocenter.

When this is done, a validation error shows up in the include declaration if the container does not provide a dependency.

As an aside: consider dropping scriptlets in favour of the Expression Language; consider using JSP comments instead of HTML comments. See the JSP style guide for more.

share|improve this answer
Thank you for the answer. It's still not working. Validation of JSPF is broken in IBM RAD 8. –  Niklas Rtz May 18 '12 at 6:14

Your Answer


