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

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

commit 18cb921ffd4767d357979d1c522cfe06b13ae1d2
Author: Robert Munteanu <[email protected]>
AuthorDate: Mon Feb 9 23:35:53 2026 +0100

    SLING-13071 - HTL use objects that adapt from the javax 
SlingHttpServletRequest cannot be instantiated in a Jakarta context
    
    Add an integration test verifying adapting from a javax servlet request via 
@Self
---
 .../models/ModelAdaptingFromJavaxRequestTest.java  | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git 
a/src/main/java/org/apache/sling/starter/webapp/integrationtest/models/ModelAdaptingFromJavaxRequestTest.java
 
b/src/main/java/org/apache/sling/starter/webapp/integrationtest/models/ModelAdaptingFromJavaxRequestTest.java
new file mode 100644
index 0000000..01cfe8e
--- /dev/null
+++ 
b/src/main/java/org/apache/sling/starter/webapp/integrationtest/models/ModelAdaptingFromJavaxRequestTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package org.apache.sling.starter.webapp.integrationtest.models;
+
+import java.io.IOException;
+
+import org.apache.sling.commons.testing.integration.HttpTestBase;
+
+public class ModelAdaptingFromJavaxRequestTest extends HttpTestBase {
+
+    public void testGetServletContent() throws IOException {
+
+        String content = getContent(HTTP_BASE_URL + 
"/bin/model-from-javax-servlet.txt", CONTENT_TYPE_PLAIN);
+
+        assertEquals("true", content);
+    }
+}

Reply via email to