Пример #1
0
  public String getPathInfo() {
    if (pathInfo == null) {
      if (req != null) {
        // first try the traditional way
        pathInfo = req.getPathInfo();

        // otherwise build it from the requestURI
        if (pathInfo == null) {
          // remove the contextPath
          pathInfo = req.getRequestURI().substring(req.getContextPath().length());

          try {
            pathInfo = URLDecoder.decode(pathInfo, "UTF-8");
          } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            logger.error(e.getMessage());
          }
        }
      }
      // if there is not request, take the pri path as pathInfo
      else if (currentPart != null) {
        pathInfo = PriUtil.getPathFromPri(currentPart.getPri());
      }
    }
    return pathInfo;
  }
Пример #2
0
 public String getCurrentPri() {
   return (currentPart != null) ? currentPart.getPri() : null;
 }