Esempio n. 1
0
 @Override
 protected void getCurrentFolderParam(final HttpServletRequest request) {
   String currFolder = getParameter(request, "currentFolder");
   if (!(currFolder == null || currFolder.equals(""))) {
     this.currentFolder = PathUtils.addSlashToBeginning(PathUtils.addSlashToEnd(currFolder));
   }
 }
  /**
   * Gets configuration value of baseUrl. When config value is not set, then return default value.
   *
   * @param request request
   * @return default baseDir value
   */
  @Override
  public String getBaseUrl(final HttpServletRequest request) {
    String baseURL = null;
    try {
      IConfiguration conf = ConfigurationFactory.getInstace().getConfiguration();
      baseURL = conf.getBaseURL();
    } catch (Exception e) {
      baseURL = null;
    }
    if (baseURL == null || baseURL.equals("")) {
      baseURL = super.getBaseUrl(request);
    }

    return PathUtils.addSlashToBeginning(PathUtils.addSlashToEnd(baseURL));
  }