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

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 3315a9027a Fix backprot
3315a9027a is described below

commit 3315a9027a7eaab18f42625b97b569940ff1365d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Dec 2 18:13:07 2024 +0000

    Fix backprot
---
 webapps/examples/WEB-INF/classes/SessionExample.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/webapps/examples/WEB-INF/classes/SessionExample.java 
b/webapps/examples/WEB-INF/classes/SessionExample.java
index 60eaa2e03e..14e7c9701c 100644
--- a/webapps/examples/WEB-INF/classes/SessionExample.java
+++ b/webapps/examples/WEB-INF/classes/SessionExample.java
@@ -18,7 +18,6 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.ResourceBundle;
@@ -113,7 +112,7 @@ public class SessionExample extends HttpServlet {
             out.println(HTMLFilter.filter(name) + " = " + 
HTMLFilter.filter(value));
             out.print("<a href=\"");
             out.print(HTMLFilter.filter(
-                    response.encodeURL("SessionExample?dataname=" + 
URLEncoder.encode(name, StandardCharsets.UTF_8))));
+                    response.encodeURL("SessionExample?dataname=" + 
URLEncoder.encode(name, "UTF-8"))));
             out.println("\" >delete</a>");
             out.println("<br>");
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to