You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by GitBox <gi...@apache.org> on 2021/10/18 07:31:56 UTC

[GitHub] [openmeetings] solomax commented on a change in pull request #165: OPENMEETINGS-2692 Update manifest to get webapp name from base URL config.

solomax commented on a change in pull request #165:
URL: https://github.com/apache/openmeetings/pull/165#discussion_r730640402



##########
File path: openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java
##########
@@ -248,6 +248,14 @@ public static String getBaseUrl() {
 		return baseUrl;
 	}
 
+	public static String getWebappPath() {
+		String webappPath = baseUrl;
+		if (webappPath.endsWith("/")) {
+			webappPath = webappPath.substring(0, webappPath.length() - 1);
+		}
+		return webappPath.substring(webappPath.lastIndexOf("/") + 1);

Review comment:
       this method can be as simple as `new URL(baseUrl).getPath()` :)
   or `new URI(baseUrl).getPath()` :))




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openmeetings.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org