![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Web
三千炼心
这个作者很懒,什么都没留下…
展开
-
重定向页面和跳转调度的区别
一:跳转request.setAttribute(“error”, “账户名不存在,请重新登录”);request.getRequestDispatcher(“Login.jsp”).forward(request, response);//发了一次请求//不可以转发到服务器意外的页面,比如不可以转到百度二:重定向HttpSession session=request.getSession...原创 2019-06-12 09:39:59 · 399 阅读 · 0 评论 -
在配置web.xml的时候配置错误警告与session过期时间
配置session时间为120分钟,即使两个小时<session-config> <session-timeout>120</session-timeout></session-config>配置的时候可以根据网页报错显示不同的错误提示,下面例子都配置了同一个报错页面<error-page> <error-...原创 2019-06-12 09:13:16 · 469 阅读 · 0 评论 -
logback加入按时间与大小分割日志文件时报错处理
ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:19 - RuntimeException in Action for tag [rollingPolicy] java.lang.IllegalStateException: FileNamePattern [/mySoft/logs/demo.log] does not contain ...原创 2019-06-11 19:07:23 · 1888 阅读 · 0 评论 -
后台如何将图片的byte[]转成流传给前端展示
这里用springMVC做个例子,前端请求以下方法时,直接返回一张图片@RequestMapping("/showPhoto")public void showPhoto(String photoID, HttpServletResponse response) { OutputStream outputStream = null; try { byte[] photoByte = p...原创 2019-04-19 23:45:17 · 12465 阅读 · 10 评论