PortalKit: modify index.jsp and index.js to remove the redandancy parts