SSH 框架整合遇到的一些問題以及目前项目中遇到的一些常见问题解决方案汇总...

  1. java.lang.ClassCastException: sun.proxy.$Proxy11 cannot be cast to分析 请参阅 http://www.2cto.com/kf/201307/228174.html 出现这样的异常请参考以上网址 主要原因是如果类没有继承或者实现UserService 那么就可以这样用 UserServiceImpl dao = (UserServiceImpl) ctx.getBean("userService"); 否则UserService service= (UserService) ctx.getBean("userService");

2 Log4j配置问题%c{1}:% 主要留意下 log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c{1}:%L - %m%n

3.BootStrap 或者JqueryMobile 对IE支持的不够友好,可能某些时刻效果无法显示那么请尝试添加以下代码 为了兼容IE http://www.myexception.cn/web/1457358.html <meta http-equiv="X-UA-Compatible" content="IE=edge">

<script src="https://oss.maxcdn.com/libs/html5shiv/3.6.2/html5shiv.js"></script>

<script src="js/respond.src.js"></script>

4.以下代码可以防止用户未登陆就访问页面 <% //主页中为了防止没有登陆就能访问 User currentUser=(User)session.getAttribute("currentUser"); if(currentUser==null){ String contextPath=request.getContextPath(); response.sendRedirect(contextPath+"/login.jsp"); } %>

转载于:https://my.oschina.net/u/946001/blog/228893

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值