code: final public int getPageIndexInParent(WebSiteRequest req) throws IOException, SQLException {
  		WebPage[] myPages=getParent().getCachedPages(req);
  		int len=myPages.length;
  		for(int c=0;c<len;c++) if(myPages[c].equals(this)) return c;
  		throw new RuntimeException("Unable to find page index in parent.");
  	}
docs: Gets the index of this page in the parents list of children pages.