Skip to content

Commit

Permalink
Cherry pick branch 'genexuslabs:ScriptNameFix' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sexenian authored and Beta Bot committed Jan 21, 2025
1 parent b53f319 commit 87d26ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions java/src/main/java/com/genexus/internet/HttpRequestWeb.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
Expand Down

0 comments on commit 87d26ce

Please sign in to comment.