空指針異常??
java.lang.NullPointerException
type?Exception report
message?An exception occurred processing JSP page /request.jsp at line 30
description?The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /request.jsp at line 30
27: ? ? ?”¨??·??????<%=request.getParameter("username") %><br>
28: ? ? ??±?¥????<%
29: ? ? String[] favorites = request.getParameterValues("favorite");
30: ? ? for(int i=0;i<favorites.length;i++)
31: ? ? {
32: ? ? out.println(favorites[i]+" ");
33: ? ? }
代碼如下
? <body>
? ? <h1>request內(nèi)置對(duì)象</h1>
? ? 用戶(hù)名:<%=request.getParameter("username") %><br>
? ? 愛(ài)好:<%
? ? String[] favorites = request.getParameterValues("favorite");
? ? for(int i=0;i<favorites.length;i++)
? ? {
? ? out.println(favorites[i]+" ");
? ? }
? ? %>
2017-04-25
你是不是頁(yè)面跳轉(zhuǎn)前在愛(ài)好選項(xiàng)上沒(méi)有勾選