All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sippnex.fileblade.util.PathUtils Maven / Gradle / Ivy

package com.sippnex.fileblade.util;

import javax.servlet.http.HttpServletRequest;

public class PathUtils {

    public static String getPathFromRequest(HttpServletRequest request) {
        String[] pathElements = request.getRequestURI().split(request.getContextPath() + "/");
        StringBuilder pathString = new StringBuilder("/");
        for (int i = 3; i < pathElements.length; i++) {
            pathString.append(pathElements[i]);
            if(i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy