初学者的问题 不同之处就是它处理的传递方法不同!当参数是通过Get方法传递时,要使用doGet()处理当参数是通过Post方法传递时,要使用doPost()处理 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 doGet 只响应画面form的method=get的请求doPost只响应画面form的method=post的请求并且get请求是明文传送的,地址栏有你提交的信息post请求使用数据包方式传送的在地址栏没有你提交的信息get提交的数据昌都有限制post理论上是没有限制的 这有种简单的方法: public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ............. } public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { doPost(response,request); }这样的话,两种传递方法都能处理了! 哈哈 那还不如直接写一个service方法呢,什么请求都接受 public void service(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { } 还是这样的好 public void service(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { } 用http大文件下载问题(20M以上) 在线等! 求助!!! Myeclipse 又404了。。。 怎样将ꗖ这种编码转换为中文字符串? java里怎样压缩图片? struts2的资料和电子书谁有 讨论生成静态页面思想 jsp中复选框取值问题,判空解决不了.(100分) 关于在JSP中使用JavaBean的问题 奇怪,我用绝对路径可以链接某文件,用相对路径就不行,怎么回事??? 请问这是什么错误。。 菜鸟问题
doPost只响应画面form的method=post的请求
并且get请求是明文传送的,地址栏有你提交的信息
post请求使用数据包方式传送的在地址栏没有你提交的信息
get提交的数据昌都有限制
post理论上是没有限制的
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
.............
}
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException
{
doPost(response,request);
}这样的话,两种传递方法都能处理了! 哈哈
public void service(HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException
{
}
public void service(HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException
{
}