From 60cc57b13776168ffb8460efb257948eade61426 Mon Sep 17 00:00:00 2001 From: ahmed -k Date: Thu, 2 Jan 2025 03:24:25 +0200 Subject: [PATCH] Migrate to StaplerRequest2 & StaplerResponse2 --- core/maven-example/pom.xml | 15 +++++++++++---- .../src/main/java/example/BookStore.java | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/core/maven-example/pom.xml b/core/maven-example/pom.xml index 3741f48006..44cdefbdf6 100644 --- a/core/maven-example/pom.xml +++ b/core/maven-example/pom.xml @@ -9,11 +9,18 @@ war + + + jenkins-public + https://repo.jenkins-ci.org/public/ + + + org.kohsuke.stapler - stapler-jsp - 1.253 + stapler + 1928.v9115fe47607f jakarta.servlet.jsp.jstl @@ -24,7 +31,7 @@ jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.1.0 provided @@ -63,7 +70,7 @@ org.eclipse.jetty jetty-maven-plugin - 9.4.7.v20170914 + 11.0.24 2 diff --git a/core/maven-example/src/main/java/example/BookStore.java b/core/maven-example/src/main/java/example/BookStore.java index a9a3b690a3..d821ce14aa 100644 --- a/core/maven-example/src/main/java/example/BookStore.java +++ b/core/maven-example/src/main/java/example/BookStore.java @@ -4,8 +4,8 @@ import java.io.IOException; import java.util.Hashtable; import java.util.Map; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.StaplerRequest2; +import org.kohsuke.stapler.StaplerResponse2; /** * Root object of this web application. @@ -60,7 +60,7 @@ public Map getItems() { *

* Action methods are useful to perform some operations in Java. */ - public void doHello( StaplerRequest request, StaplerResponse response ) throws IOException, ServletException { + public void doHello( StaplerRequest2 request, StaplerResponse2 response ) throws IOException, ServletException { System.out.println("Hello operation"); request.setAttribute("systemTime",new Long(System.currentTimeMillis()));