This is an automated email from the ASF dual-hosted git repository.
dsoumis pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 3245794895 Test Java scriplets in JSP
3245794895 is described below
commit 3245794895d2da89fb29a6fb1ba2530a9643642c
Author: Dimitris Soumis <[email protected]>
AuthorDate: Wed Sep 17 14:49:51 2025 +0300
Test Java scriplets in JSP
---
test/org/apache/jasper/compiler/TestGenerator.java | 4 ++++
test/webapp/jsp/generator/lambda.jsp | 23 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/test/org/apache/jasper/compiler/TestGenerator.java
b/test/org/apache/jasper/compiler/TestGenerator.java
index 4f4df37a67..01d70ae8b6 100644
--- a/test/org/apache/jasper/compiler/TestGenerator.java
+++ b/test/org/apache/jasper/compiler/TestGenerator.java
@@ -671,6 +671,10 @@ public class TestGenerator extends TomcatBaseTest {
}
}
+ @Test
+ public void testLambdaScriptlets() throws Exception {
+ doTestJsp("lambda.jsp");
+ }
@Test
public void testInfoConflictNone() throws Exception {
diff --git a/test/webapp/jsp/generator/lambda.jsp
b/test/webapp/jsp/generator/lambda.jsp
new file mode 100644
index 0000000000..0daab4271c
--- /dev/null
+++ b/test/webapp/jsp/generator/lambda.jsp
@@ -0,0 +1,23 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ --%>
+<%@ page contentType="text/plain; charset=UTF-8" %>
+<%
+ Runnable r = () -> System.out.println("Lambda OK");
+ r.run();
+ java.util.function.Consumer<String> c = System.out::print;
+ c.accept("Method Reference OK");
+%>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]