Index out of bound error

Method getPathInfo() does not contains context path, but method getUrl() of instance of Ancestor contains context path. If there is some context path the method substring() throws java.lang.StringIndexOutOfBoundsException. so I add context path into attribut m_path.