Skip to content

Commit

Permalink
servlet tck code from git hash 365d073
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Lamy <olamy@apache.org>
  • Loading branch information
olamy authored and markt-asf committed Oct 19, 2023
1 parent 8363ed3 commit d375a7b
Show file tree
Hide file tree
Showing 1,345 changed files with 131,198 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pom.xml
Expand Up @@ -50,9 +50,13 @@
</license>
</licenses>

<properties>
<maven.compiler.release>11</maven.compiler.release>
</properties>
<modules>
<module>api</module>
<module>spec</module>
<module>tck</module>
</modules>

<scm>
Expand Down Expand Up @@ -104,6 +108,9 @@
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
<requireJavaVersion>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
Expand Down
77 changes: 77 additions & 0 deletions tck/pom.xml
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>jakarta.servlet</groupId>
<artifactId>servlet-parent</artifactId>
<version>6.1.0-SNAPSHOT</version>
</parent>

<artifactId>tck</artifactId>
<packaging>pom</packaging>

<name>Jakarta Servlet TCK</name>
<url>https://projects.eclipse.org/projects/ee4j.servlet</url>
<licenses>
<license>
<name>EPL 2.0</name>
<url>http://www.eclipse.org/legal/epl-2.0</url>
<distribution>repo</distribution>
</license>
<license>
<name>GPL2 w/ CPE</name>
<url>https://www.gnu.org/software/classpath/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<modules>
<module>tck-util</module>
<module>tck-runtime</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.7.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
</dependencies>
</dependencyManagement>

</project>
104 changes: 104 additions & 0 deletions tck/tck-runtime/pom.xml
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>jakarta.servlet</groupId>
<artifactId>tck</artifactId>
<version>6.1.0-SNAPSHOT</version>
</parent>

<artifactId>tck-runtime</artifactId>
<packaging>jar</packaging>

<name>Jakarta Servlet TCK Runtime</name>

<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>tck-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/**.xml</include>
<include>**/jakarta.servlet.ServletContainerInitializer</include>
<include>**/web-fragment*.xml</include>
<include>**/*.txt</include>
<include>**/*.tld</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>

</project>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->

<project basedir="." default="usage" name="servlet_api">
<import file="../../../../../../../bin/xml/ts.nonleafimport.xml" />
</project>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->

<project basedir="." default="usage" name="servlet_api_common">
<import file="../../../../../../../../bin/xml/ts.nonleafimport.xml" />
</project>
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

/*
* $Id$
*/
package com.sun.ts.tests.servlet.api.common.sharedfiles;

import com.sun.ts.tests.servlet.common.util.StaticLog;

import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionBindingEvent;

public final class HSessionAttributeListener
implements HttpSessionAttributeListener {

public void attributeAdded(HttpSessionBindingEvent arg0) {
StaticLog.add("HSessionAttribute Added.");
}

public void attributeRemoved(HttpSessionBindingEvent arg0) {
StaticLog.add("HSessionAttribute Removed.");
}

public void attributeReplaced(HttpSessionBindingEvent arg0) {
StaticLog.add("HSessionAttribute Replaced.");
}
}
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

/*
* $Id$
*/
package com.sun.ts.tests.servlet.api.common.sharedfiles;

import com.sun.ts.tests.servlet.common.util.StaticLog;

import jakarta.servlet.http.HttpSessionEvent;
import jakarta.servlet.http.HttpSessionListener;

public final class HSessionListener implements HttpSessionListener {

public void sessionCreated(HttpSessionEvent arg0) {
StaticLog.add("HSessionListener created.");
}

public void sessionDestroyed(HttpSessionEvent arg0) {
StaticLog.add("HSessionListener destroyed.");
}
}
@@ -0,0 +1,44 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

/*
* $Id$
*/
package com.sun.ts.tests.servlet.api.common.sharedfiles;

import com.sun.ts.tests.servlet.common.util.StaticLog;

import jakarta.servlet.ServletContextAttributeEvent;
import jakarta.servlet.ServletContextAttributeListener;

public final class SCAttributeListener
implements ServletContextAttributeListener {

public void attributeAdded(ServletContextAttributeEvent event) {
StaticLog.add(
"SCAttributeListenerAdded:" + event.getName() + "," + event.getValue());
}

public void attributeRemoved(ServletContextAttributeEvent event) {
StaticLog.add("SCAttributeListenerRemoved:" + event.getName() + ","
+ event.getValue());
}

public void attributeReplaced(ServletContextAttributeEvent event) {
StaticLog.add("SCAttributeListenerReplaced:" + event.getName() + ","
+ event.getValue());
}
}

0 comments on commit d375a7b

Please sign in to comment.