handle contextPath of NA when creating url