关于直接访问servlet地址
来源:1-4 请求的结构(下)
无限精彩
2019-11-07 20:31:53
比如:http://localhost:8080/request-struc/request,页面显示的结果是This is get method;
请问老师,
问题一:如何让结果是(method=“post”):This is post method()
问题二:请问默认是get吗
1回答
同学你好。
1、发送post请求的常见做法是使用表单。在form标签上追加method="post",详情可以回顾下Servlet入门中的2-14节,Get请求与Post请求课程:
2、直接在地址栏中输入地址发送的请求默认是get请求。
如果解答了同学的疑问,望采纳~
祝学习愉快~
相似问题