java打印post參數(shù) java發(fā)送post請(qǐng)求帶參數(shù)
~</form></body>java代碼:@WebServlet(“/requestDemo”)公共類requestDemo擴(kuò)展HttpServlet{protected void
~</form>
</body>
java代碼:
@WebServlet(“/requestDemo”)
公共類requestDemo擴(kuò)展HttpServlet{
protected void doPost(HttpServletRequest request,HttpServletResponse response)拋出ServletException,IOException{
//post獲取請(qǐng)參數(shù)
//根揈參數(shù)名稱獲取參數(shù)值
字符串用戶名=請(qǐng)求.getParameter(“用戶名)”)系統(tǒng)輸出打印(“post”)系統(tǒng)輸出打印(用戶名)
}