From 87d26ced957dc4f62c88d2dc5b8e418bc85e7d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Sexenian?= <99925035+tomas-sexenian@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:13:36 +0000 Subject: [PATCH] Cherry pick branch 'genexuslabs:ScriptNameFix' into beta --- .../java/com/genexus/internet/HttpRequestWeb.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/src/main/java/com/genexus/internet/HttpRequestWeb.java b/java/src/main/java/com/genexus/internet/HttpRequestWeb.java index ac2ddc532..938c2480e 100644 --- a/java/src/main/java/com/genexus/internet/HttpRequestWeb.java +++ b/java/src/main/java/com/genexus/internet/HttpRequestWeb.java @@ -18,13 +18,13 @@ public HttpRequestWeb(HttpContextWeb httpContext) { super(httpContext); } - - public String getScriptName() - { + + public String getScriptName() { if (httpContext.getRequest() != null) { - String servletPath = httpContext.getRequest().getServletPath(); - if (servletPath != null) - return servletPath.substring(servletPath.lastIndexOf("/") +1 , servletPath.length()); + String requestURI = httpContext.getRequest().getRequestURI(); + if (requestURI != null) { + return requestURI.substring(requestURI.lastIndexOf("/") + 1); + } } return ""; }