摘要: HttpServletRequest.getParameter("modelName"); 能取到想要的modelObject吗?经过测试之后,发现是不能的。后来想想,其实道理挺简单的,当两个Web组件之间为转发关系时,转发源会将要共享 request范围内的数据先用setAttribute将数据放... 阅读全文
posted @ 2014-10-30 17:25 sunruntheway 阅读(87) 评论(0) 推荐(0) 编辑
摘要: get和post这是http协议的两种方法,另外还有head, delete等这两种方法有本质的区别,get只有一个流,参数附加在url后,大小个数有严格限制且只能是字符串。post的参数是通过另外的流传递的,不通过url,所以可以很大,也可以传递二进制数据,如文件的上传。在servlet开发中,以... 阅读全文
posted @ 2014-10-30 16:12 sunruntheway 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1.super()和this()区别: super():调用父类无形参的构造方法;super(形参):调用父类中某个带形参的构造方法;this(形参):调用本类中另一种形式的构造方法; 注意:放在方法的首行;2.super和this的区别: super.父类的成员... 阅读全文
posted @ 2014-10-30 15:56 sunruntheway 阅读(1932) 评论(0) 推荐(1) 编辑