public Path convertPath(String path, String prePath, ServletContext servletContext){
    boolean canLoad=
       prePath.startsWith("/")
       || (
         prePath.equals("") && path.startsWith("/")
       );
    path=prePath+path;
    path=path.replaceAll("%20", " ").replaceAll(" ", "%20");
    URL myURL;
    try {
      myURL=servletContext.getResource(path);
    } catch (MalformedURLException e) {
      throw new InvalidURLException(path, e);
    }
    if (myURL==null)
      throw new NoURLForPathException(path);
    return new Path(myURL);
  }