1. 程式人生 > >提交表單到servlet時出現空白頁面,但又不報錯

提交表單到servlet時出現空白頁面,但又不報錯

碰到問題時的部分問題程式碼如下:


<form action="<%=request.getContextPath() %>/LoginServlet" onsubmit="return login();" method="post">

我在裡面加了一段:?function=login後就可以正常運行了。

<form action="<%=request.getContextPath() %>/LoginServlet?function=login" onsubmit="return login();" method="post">