Skip to content

Commit

Permalink
Merge pull request #620 from ahmed-kamal2004/master
Browse files Browse the repository at this point in the history
Migrate example to StaplerRequest2 & StaplerResponse2
  • Loading branch information
jglick authored Jan 2, 2025
2 parents c0c03e9 + 60cc57b commit 515e042
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions core/maven-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@

<packaging>war</packaging>

<repositories>
<repository>
<id>jenkins-public</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler-jsp</artifactId>
<version>1.253</version>
<artifactId>stapler</artifactId>
<version>1928.v9115fe47607f</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
Expand All @@ -24,7 +31,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -63,7 +70,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.7.v20170914</version>
<version>11.0.24</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>

Expand Down
6 changes: 3 additions & 3 deletions core/maven-example/src/main/java/example/BookStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -60,7 +60,7 @@ public Map getItems() {
* <p>
* 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()));

Expand Down

0 comments on commit 515e042

Please sign in to comment.