code: public static Page getPage(TagSupport tag, PageContext context,
  			String strPage, int iLevel) {
  		Page page = null;
  
  		SiteContext sc = (SiteContext) context.getRequest().getAttribute(
  				SiteContext.SITE_CONTEXT_KEY);
  		AuthorizationEngine ap = ContextUtils
  				.getAuthorizationEngine((HttpServletRequest) context
  						.getRequest());
  
  		if (strPage != null) {
  			if (strPage.equals("AE_ROOT"))
  				page = sc.getBranch().getHome(ap);
  			else if (strPage.equals("AE_CURRENT"))
  				page = sc.getPage();
  			else
  				page = (Page) context.getAttribute(strPage);
  		} else if (iLevel >= 0) {
  			Page currentInTree = sc.getPage();
  			if (iLevel <= currentInTree.getLevel()) {
  				page = currentInTree;
  				while (iLevel < page.getLevel())
  					page = page.getParent();
  			}
  		} else {
  			TreeTag tt = (TreeTag) TagSupport.findAncestorWithClass(tag,
  					TreeTag.class);
  			if (tt != null)
  				page = tt.getPage();
  			else {
  				PathTag pt = (PathTag) TagSupport.findAncestorWithClass(tag,
  						PathTag.class);
  				if (pt != null)
  					page = pt.getPage();
  			}
  		}
  
  		if (page == null)
  			page = sc.getPage();
  
  		return page;
  	}
docs: 找到与当前标记相关的页面
  
  @param tag
  @param context
  @param strPage
  @param iLevel
  @return