Пример #1
0
 static String getAbsolutePath(String path) {
   String rootPath = XmlHelper.class.getResource("/").getPath();
   if (rootPath.contains(":")) rootPath = StringHelper.trimStart(rootPath, "/");
   return StringHelper.trimEnd(rootPath, "/") + "/../../" + path;
   //        String temp = StringHelper.trimEnd(rootPath, "/");
   //        temp = temp.substring(0, temp.lastIndexOf("/"));
   //        return temp.substring(0, temp.lastIndexOf("/"))+"/" + path;
 }
Пример #2
0
 public static String buildWWWSiteUrl(PageAlias pageAlias) {
   switch (pageAlias) {
     default:
       return StringHelper.trimEnd(WebInfoHelper.WEB_MOBILE_WWW, "/") + "/index";
   }
 }