Fabian,
On 12/12/25 9:08 AM, Fabian Hahn wrote:
<snip>
An error occurred at line: [217] in the jsp file: [/index.jsp]
The method setAttribute(String, Object) in the type HttpSession is not
applicable for the arguments (String, boolean)
214:
215: if (session.getAttribute("isParent") == null) // 1st time, not set.
otherwise, set by re-loading or changed by actual login
216: {
217: session.setAttribute("isParent", ((rs.getString("cnt") != null) &&
(rs.getInt("cnt") > 0)) ? true : false);
One of the problems seems to be that you are trying to compile the
JSP-files with a very old Java version compatibility. You could
improve this by defining the jsp servlet in your web.xml (or tomcat-
web.xml). Here you define the Java version for compiling the JSPs.
This should get rid of the "source level" messages.
This is an unhelpful reply.
The OP already knows their compiler version seems to be set to an old
(1.5) version of the compiler. They do not WANT this to be the case, and
they are asking for help configuring it properly.
They have presented a claim that they explicitly set their
compilerSourceVM to 11 though we haven't seen solid evidence of it, yet.
Replying that they should "use the right version" misses the point of
the conversation. The OP is *trying* to do just that but the efforts
don't seem to be working, yet.
Good luck,
Fabian
PS: I do not understand why the default is not set to the min. required Java
version. Possibly the current version, sans possible dependency restrictions.
(i.e. Java 24 for Tomcat 11)
Default for Tomcat 9: 1.8
Default for Tomcat 10.1: 11
Default for Tomcat 11: 17
Default for main (Tomcat 12): 21
These exactly match the "minimum required Java version" for each release.
So what is it that you are requeting? Tomcat 11 must support Java 17, so
its compiler minimum version is 17. We cannot set it to Java 24 as you
suggest.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]