03 2013 档案

摘要:原创文章,请尊重作者辛勤劳动运行环境:spring3.2.1 + simple-spring-memcached3.1.0(以下简称SSM)1. 所需jar包,spring的包到spring官网下载,ssm所需包在这里下载,我下载的是3.1.0版本注:解压simple-spring-memcached-3.1.0-dist.zip,复制lib目录中所有jar到工程lib中,如果有相同的jar,保留版本高的,删除版本低的。复制dist目录中除了带有test的之外所有jar到工程的lib中。最终lib包如下:2. 配置项目的web.xml文件,因为本人项目用的是spring-mvc,所以代码如下: 阅读全文
posted @ 2013-03-22 09:44 东师理想--周枫 阅读(3244) 评论(0) 推荐(0)
摘要:今天使用spring mvc配置jstl的时候报错SEVERE: Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: /WEB-INF/bizroot/bag/teach_upload/list.jsp (line: 39, column: 5) According to TLD or attribute directive in tag file, attribute test does not accept any expressions 如果按tomcat6的方法配置,可能 阅读全文
posted @ 2013-03-08 10:15 东师理想--周枫 阅读(1976) 评论(0) 推荐(0)
摘要:@RequestMapping(value="/logout",method=RequestMethod.GET) public void logout(HttpServletRequest request,HttpServletResponse response) { //清除session Enumeration<String> em = request.getSession().getAttributeNames(); while(em.hasMoreElements()){ request.g... 阅读全文
posted @ 2013-03-07 16:33 东师理想--周枫 阅读(3963) 评论(0) 推荐(0)
摘要:一直使用struts2的request,把自己的思维限制死了,今天使用spring-mvc时,怎么获取request都是null,最后多方查找原因,终于发现了解决方法1. 在web.xml配置监听<listener> <listener-class>org.springframework.web.context.request.RequestContextListener </listener-class> </listener>2. 后台获取代码HttpServletRequest request = ((ServletRequestAttri 阅读全文
posted @ 2013-03-07 10:49 东师理想--周枫 阅读(493) 评论(0) 推荐(0)
摘要:先下载 kaptcha-2.3.2.jar 包,maven获取代码:<!-- 验证码 --> <dependency> <groupId>com.google.code</groupId> <artifactId>kaptcha</artifactId> <version>2.3.2</version> </dependency>web.xml增加如下代码<!-- google的验证码插件 --> <servlet> <servlet-name>Kap 阅读全文
posted @ 2013-03-07 09:33 东师理想--周枫 阅读(701) 评论(0) 推荐(0)
摘要:转:spring security3 初探http://yzxqml.iteye.com/blog/1756106现在很多企业和开发团队都使用了SSH2(Struts 2 +Spring 2.5 +Hibernate)框架来进行开发, 我们或许已经习惯了强大的Spring Framework 全局配置管理,不可否认,Sping是一个很优秀的开源框架,但是由于Spring3.0版本后强大的的注解式bean的诞生,Spring MVC框架这匹黑马正悄然杀起,但今天Spring MVC不是主角,今天我和大家分享一个同样隶属于SpringSource的安全框架——Spring Security,下面的 阅读全文
posted @ 2013-03-06 09:32 东师理想--周枫 阅读(715) 评论(0) 推荐(0)
摘要:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.mchange.v2.c3p0.ComboPooledDataSource] for bean with name 'dataSource' defined in URL [file:/D:/workspaces/lxyy_spring/WebRoot/WEB-INF/classes/spring-mvc.xml]; nested exception is java.lang.ClassNotFoundEx 阅读全文
posted @ 2013-03-01 09:45 东师理想--周枫 阅读(5115) 评论(0) 推荐(0)
摘要:调试框架报错org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [file:/D:/workspaces/lxyy_spring/WebRoot/WEB-INF/classes/spring-mvc.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor at org... 阅读全文
posted @ 2013-03-01 09:40 东师理想--周枫 阅读(13536) 评论(1) 推荐(0)