Resin 上的错误 Java 版本

Wrong Java version on Resin

在我们的项目中,我们使用 Resin 作为生产服务器。在我的本地机器上,我使用的是 Jetty,但我遇到了不同服务器上应用程序行为的一些差异。这就是为什么我尝试向 Intellij IDEA 添加配置,它将使用 Resin 作为应用程序服务器。
当我尝试 运行 它时,出现以下错误:

[20-09-03 16:35:39.134] {resin-port-80-49} warning: [options] bootstrap class path not set in conjunction with -source 1.5
                       warning: [options] source value 1.5 is obsolete and will be removed in a future release
                       warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
                       /include/header.jsp:70: error: diamond operator is not supported in -source 1.5
                                 List<String> jsEncodedItems = new ArrayList<>(list.size());
                                                                             ^
                         (use -source 7 or higher to enable diamond operator)
                       1 error
                       3 warnings

我已经在“项目结构”和 maven 的 pom.xml 中检查了 Java 版本,但我在任何地方都找到了 1.8。同时,使用 Jetty 我没有收到这样的错误,一切都按预期工作。
也许您知道如何解决这个问题?
您可以在此屏幕截图上找到我的配置:

这是因为 resin 使用 javac 自动编译您的 JSP 文件,并且没有“-source”参数,它将默认使用 1.5 作为源版本。

要在 resin 中修复此问题,请编辑 resin.xml,在 <resin> 中添加以下内容之一:

<javac compiler="internal" args="-source 1.8"/>

<javac compiler="javac" args="-source 1.8"/>

根据需要更改源版本。