This is an automated email from the ASF dual-hosted git repository.

dsoumis pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new fc1f96d9a2 Test Java scriplets in JSP
fc1f96d9a2 is described below

commit fc1f96d9a2977b5587b5e564fdabc63d76114b22
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 47e90e8adc..0f9b6600de 100644
--- a/test/org/apache/jasper/compiler/TestGenerator.java
+++ b/test/org/apache/jasper/compiler/TestGenerator.java
@@ -734,6 +734,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]

Reply via email to