上一页 1 ··· 244 245 246 247 248 249 250 251 252 ··· 340 下一页
摘要: 实验是在前一篇文章的项目上做的;数据写到页面后台往前台传数据TestController添加/** * 方法的返回值采用ModelAndView, new ModelAndView("index", map);, * 相当于把结果数据放到request里面 * @return * @... 阅读全文
posted @ 2015-10-10 16:28 星辰之力 阅读(1509) 评论(0) 推荐(0)
摘要: value的uri值为以下三类:A) 可以指定为普通的具体值;B) 可以指定为含有某变量的一类值(URI Template Patterns with Path Variables);@RequestMapping(value="/owners/{ownerId}", method=RequestM... 阅读全文
posted @ 2015-10-10 16:17 星辰之力 阅读(1825) 评论(0) 推荐(0)
摘要: web-inf目录是不对外开放的,外部没办法直接访问到。所有只能通过映射来访问,比如映射为一个action或者servlet通过服务器端跳转来访问到具体的页面。这样可以限制访问,提高安全性。 1、把页面资源文件只能放在webroot下面,如 CSS,JS,image等.放在WEB-INF下引用不... 阅读全文
posted @ 2015-10-10 16:08 星辰之力 阅读(285) 评论(0) 推荐(0)
摘要: 在springmvc中的controller所对应的函数中,如果需要从*.jsp页面中获取数据,可以自行在函数括号中写,springmvc会自动封装传过来的。spring-mvc.xml Controller.java 两种形式都可以,但是第二种,jsp页面中的参数是personL... 阅读全文
posted @ 2015-10-10 13:37 星辰之力 阅读(475) 评论(0) 推荐(0)
摘要: DiscHd ks = DiscHdService.getDiscHdByID(code); model.addAttribute("ks", ks);如果传的是对象,则jsp页面直接用"${ks.DValue}"得到值。List discDets=discDetService.getDiscDe... 阅读全文
posted @ 2015-10-10 13:25 星辰之力 阅读(1118) 评论(0) 推荐(0)
摘要: 一、request.getParameter() 和request.getAttribute() 区别(1)request.getParameter()取得是通过容器的实现来取得通过类似post,get等方式传入的数据,request.setAttribute()和getAttribute()只是在... 阅读全文
posted @ 2015-10-10 10:29 星辰之力 阅读(46094) 评论(0) 推荐(3)
摘要: Ajax注册表单用户名实时验证 阅读全文
posted @ 2015-10-10 09:56 星辰之力 阅读(254) 评论(0) 推荐(0)
摘要: AJAX——核心XMLHttpRequest对象 阅读全文
posted @ 2015-10-10 09:06 星辰之力 阅读(122) 评论(0) 推荐(0)
摘要: RequestAttributes ra = RequestContextHolder.getRequestAttributes(); HttpServletRequest request = ((ServletRequestAttributes)ra).getRequest();... 阅读全文
posted @ 2015-10-09 20:09 星辰之力 阅读(854) 评论(0) 推荐(0)
摘要: hasClass(class)检查当前的元素是否含有某个特定的类,如果有,则返回true。参数:class:用于匹配的类名。----------------------------------------------------------------------------------------... 阅读全文
posted @ 2015-10-09 19:04 星辰之力 阅读(1329) 评论(0) 推荐(0)
上一页 1 ··· 244 245 246 247 248 249 250 251 252 ··· 340 下一页