為什么出現(xiàn)404
這是提交前的
<body>
? <h1>用戶(hù)注冊(cè)</h1>
? <form action="request.jsp" name="regForm" method="post">
? ? <table>
? ? ?<tr>
? ? ? <td>用戶(hù)登錄</td>
? ? ? <td><input type="text" name="username"></td>
? ? ?</tr>
? ? ?<tr>
? ? ?<td>愛(ài)好</td>
? ? ?<td><input type="checkbox" name="favorite" value="read">讀書(shū)
? ? ? ? ?<input type="checkbox" name="favorite" value="music">音樂(lè)
? ? ? ? ?<input type="checkbox" name="favorite" value="Internet">上網(wǎng)
? ? ? ? </td>
? ? ?</tr>
? ? ?<tr>
? ? ?<td colspan="2"><input type="submit" value="提交"></td>
? ? ?
? ? ?</tr>
? ? </table>
? ? </form>
? </body>
這是提交后的
<body>
? ? 用戶(hù)名<%=request.getParameter("username")%><br>
?愛(ài)好 <%
? ? ? String[] b=request.getParameterValues("favorite");
? ? ? for(int i=0;i<b.length;i++)
? ? ? {
? ? ??
? ? ? out.println(b[i]+" ");
? ? ??
? ? ? }
? ? %>
? </body>
2015-09-10
404是訪(fǎng)問(wèn)的頁(yè)面不存在,查看一下你的路徑對(duì)嗎