為什么出現(xiàn)404
這是提交前的
<body>
? <h1>用戶注冊</h1>
? <form action="request.jsp" name="regForm" method="post">
? ? <table>
? ? ?<tr>
? ? ? <td>用戶登錄</td>
? ? ? <td><input type="text" name="username"></td>
? ? ?</tr>
? ? ?<tr>
? ? ?<td>愛好</td>
? ? ?<td><input type="checkbox" name="favorite" value="read">讀書
? ? ? ? ?<input type="checkbox" name="favorite" value="music">音樂
? ? ? ? ?<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>
? ? 用戶名<%=request.getParameter("username")%><br>
?愛好 <%
? ? ? String[] b=request.getParameterValues("favorite");
? ? ? for(int i=0;i<b.length;i++)
? ? ? {
? ? ??
? ? ? out.println(b[i]+" ");
? ? ??
? ? ? }
? ? %>
? </body>
2015-09-10
404是訪問的頁面不存在,查看一下你的路徑對嗎