這是jsp報的異常
jsp代碼:
<% String LoginUsername = ""; String LoginPassword = ""; try { //獲取當前站點的所有Cookie Cookie[] cookies = request.getCookies(); for (int i = 0; i < cookies.length; i++) {//對cookies中的數據進行遍歷,找到用戶名、密碼的數據 if ("LoginUsername".equals(cookies[i].getName())) { LoginUsername = cookies[i].getValue(); } else if ("LoginPassword".equals(cookies[i].getName())) { LoginPassword = cookies[i].getValue(); } } } catch (Exception e) { // e.printStackTrace(); // ser 調出錯誤輸出 idea快捷鍵 System.err.println("java.lang.NullPointerException:: "+"from index.jsp:69"); } %>