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

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter-integration-tests.git


The following commit(s) were added to refs/heads/master by this push:
     new fc685b9  SLING-13071 - HTL use objects that adapt from the javax 
SlingHttpServletRequest cannot be instantiated a Jakarta context (#41)
fc685b9 is described below

commit fc685b9106093b6f376a3615418708b35da0ce84
Author: Robert Munteanu <[email protected]>
AuthorDate: Tue Jan 27 14:06:14 2026 +0100

    SLING-13071 - HTL use objects that adapt from the javax 
SlingHttpServletRequest cannot be instantiated a Jakarta context (#41)
    
    Add a disabled integration test demonstrating the problem
---
 .../integrationtest/scripting/htl/HtlTest.java     | 22 ++++++++++++++++
 .../integration-test/htl/requesthashcode.html      | 29 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git 
a/src/main/java/org/apache/sling/starter/webapp/integrationtest/scripting/htl/HtlTest.java
 
b/src/main/java/org/apache/sling/starter/webapp/integrationtest/scripting/htl/HtlTest.java
index f57f43d..7fd75dd 100644
--- 
a/src/main/java/org/apache/sling/starter/webapp/integrationtest/scripting/htl/HtlTest.java
+++ 
b/src/main/java/org/apache/sling/starter/webapp/integrationtest/scripting/htl/HtlTest.java
@@ -89,4 +89,26 @@ public class HtlTest extends HttpTestBase {
 
         assertTrue("Expected content to contain 'from-sling-model'", 
content.contains("from-sling-model"));
     }
+
+    // enable once SLING-13071 is fixed
+    public void disabledTestScriptWithAdapterFactoryFromJavaxServlet() throws 
IOException {
+
+        testClient.mkdirs(HTTP_BASE_URL, 
"/apps/sling/test/htl/requesthashcode");
+        testClient.mkdirs(HTTP_BASE_URL, "/content/htl");
+
+        testClient.upload(
+                HTTP_BASE_URL + 
"/apps/sling/test/htl/requesthashcode/requesthashcode.html",
+                
getClass().getResourceAsStream("/integration-test/htl/requesthashcode.html"));
+
+        testClient.createNode(
+                HTTP_BASE_URL + "/content/htl/request-hashcode",
+                Collections.singletonMap("sling:resourceType", 
"sling/test/htl/requesthashcode"));
+
+        String content =
+                getContent(HTTP_BASE_URL + 
"/content/htl/request-hashcode.html", CONTENT_TYPE_DONTCARE, null, 200);
+
+        assertTrue(
+                "Expected content to contain 'Request hash code:' followed by 
a hash code",
+                content.matches("(?s).*Request hash code:\\s*\\d+.*"));
+    }
 }
diff --git a/src/main/resources/integration-test/htl/requesthashcode.html 
b/src/main/resources/integration-test/htl/requesthashcode.html
new file mode 100644
index 0000000..5928de4
--- /dev/null
+++ b/src/main/resources/integration-test/htl/requesthashcode.html
@@ -0,0 +1,29 @@
+<!--
+/*
+ * 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.
+ */
+-->
+<!DOCTYPE html!>
+<html>
+ <head>
+   <title>Page with RequestHashCodePojo</title>
+  </head>
+  <body>
+       <div 
data-sly-use.pojo="org.apache.sling.starter.testservices.exported.RequestHashCodePojo">
+               Request hash code: ${pojo.hashCode}
+       </div>
+  </body>
+</html>

Reply via email to