JSPs throwing incorrect compiler warnings [message #505263] |
Mon, 28 December 2009 20:50  |
Eclipse User |
|
|
|
I'm seeing problems with the compiler warnings on my Eclipse Galileo JEE
webapp.
Every single jsp is showing the following warnings in the "problems"
tab:
Null pointer access: The variable out can only be null at this
location.
Null pointer access: The variable session can only be null at this
location.
The import javax.servlet is never used.
These errors persist despite complete cleanings of the projects and
servers, and deleting and creating new servers. I'm configured with
Apache Tomcat 6.0 as the server library, and have 6.0.20 installed on
the machine.
Any suggestions, other than just suppressing the warnings?
D
|
|
|
|
|
|
Re: JSPs throwing incorrect compiler warnings [message #505421 is a reply to message #505407] |
Wed, 30 December 2009 08:24  |
Eclipse User |
|
|
|
In article <hhfh31$pdv$1@build.eclipse.org>, wknauf_NO_@_INSIDE_hg-
online.de says...
>
> Hi David,
>
> I think I see the reason: your JSP validation settings are not the default ones,
> and you switched some from "ignore" to "warning".
>
> The settings are (either project specific through "Properties" => "Validation"
> or global through "Preferences" => "Web" => "JSP files" => "Validation"): Group
> "Java", options "Null pointer access" and "Unused import".
> By default, the full group "Java" is set to "Ignore".
But I want it to check MY code in a .jsp, just not the generated, so I
don't want to turn off jsp checking.
Even with that, why does it think "Session" can only be null at some
point? It obviously cannot be null in a jsp, so why does it think it
is? Sounds like a true bug in null checker, wrt .jsp files.
> But it does not make sense that those errors appear. So, maybe someone
with
> conceptual knowledge of validation can comment on this.
Yes, that is the root of my question.
d
|
|
|
Powered by
FUDForum. Page generated in 0.03927 seconds