Forum Discussion
anil334
5 years agoNew Contributor
Please try the below line:
def requestPath = mockRequest.getPath();
def reqPathLastVar = requestPath.substring(requestPath.lastIndexOf("/") + 1);
the above lines worked fine even if if you deploy the war file on server.