當(dāng)使用get請(qǐng)求提交form表單時(shí)澡屡,請(qǐng)求的參數(shù)是不使用"?"拼接的在url地址欄的载荔,否則在使用getparameter(),獲取參數(shù)為null;
捕獲.JPG
解決方案:參數(shù)可以使用隱藏域在請(qǐng)求體中攜帶缨称;
<form action="CodeServlet?" >
<input type="text" name="phone_no" >
<input type="hidden" name="method" value="codeSend">
</form>