if (contextPath!=null && contextPath.length()>0 && contextPath.endsWith("/"))
if (contextPath!=null && contextPath.length()>1 && contextPath.endsWith("/"))
    public void setContextPath(String contextPath)    {        if (contextPath!=null && contextPath.length()>0 && contextPath.endsWith("/"))            throw new IllegalArgumentException("ends with /");        _contextPath = contextPath;    }