Changeset 80:4724fc7b4733 in AnnotationManagerN4J for src


Ignore:
Timestamp:
Jul 21, 2014, 3:28:15 PM (10 years ago)
Author:
casties
Branch:
default
Message:

add slashes to paths for getRealPath to work with Tomcat 8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java

    r75 r80  
    351351            if (!webPath.startsWith("/")) {
    352352                // relative path in webapp starts in WEB-INF
    353                 webPath = "WEB-INF/" + webPath;
     353                webPath = "/WEB-INF/" + webPath;
    354354            }
    355355            ps = sc.getResourceAsStream(webPath);
     
    388388        if (!f.isAbsolute() && sc != null) {
    389389            // relative path -> use getRealPath to resolve in webapp
    390             filename = sc.getRealPath("WEB-INF/" + filename);
     390            filename = sc.getRealPath("/WEB-INF/" + filename);
    391391        }
    392392        return filename;
Note: See TracChangeset for help on using the changeset viewer.