方法1:可以使用@ControllerAdvice增强Controller @ControllerAdvice public class BaseControllerAdvice { // 初始化绑定 @InitBinder public void initBinder(WebDataBinder binder) { //处理表单数据转换对象异常(Date) binder.registerCustomEditor(Date.class, new CustomDateEditor(new Simp…
看着别人开始体验win8了,前几天我也安装了win8系统,总体来说还不错,但是今天安装完Wampserver后,浏览器输入localhost,竟然报了403错误,我以为我安装出错了,后来研究了半天,发现输入127.0.0.1可以访问.习惯localhost访问的我顿感蛋疼不已.无奈只能打开度娘,各种搜索相关资料,终于找到了解决方案. php错误: Forbidden You don't have permission to access / on this server. 解决方法: 打开htt…
开发说明: http://msdn.microsoft.com/zh-tw/library/microsoft.visualbasic.powerpacks.aspx Microsoft.VisualBasic.PowerPacks 命名空间包括 Visual Basic power pack 控件的类. Visual Basic Power Pack 控件是 Windows 窗口的附加控件.它们最初作为免费的外接程序公布,如今包括在 Visual Studio 中. 安装的VS2013并未加入…
Yii的action可以带参数,比如: class PostController extends CController { public function actionCreate($category, $language='en') { $category=(int)$category; // ... fun code starts here ... } } 这样确实很方便.不过,这默认只从$_GET中提取参数的.如果是post请求,就会报400错误. 如果想使用其他类型的请求参数,可以重写…
首先我用vue上传阿里图片用的是分片上传,分片上传由于一片是以100kb为起始的,所以当图片大小小于100kb的时候不分片,可以正常上传,当大于100kb的时候,会报400错误如下 One or more of the specified parts could not be found or the specified entit 当报这个错误时你要去登录阿里后台设置一下 文档地址:https://help.aliyun.com/document_detail/32069.htm exopos…
如何自定义JSTL标签 1.创建一个类,从SimpleTagSupport继承 A) 通过继承可以获得当前JSP页面上的对象,如JspContext I) 实际上可以强转为PageContext II) 通过PageContext可以拿到HttpServletRequest等对象 B) 通过JspContext可以获取输出流,向页面上输出内容(文字/HTML标签) C) 重写doTage()方法实现标签的内部逻辑 2.在tld(标签库描述)文件中添加<tag>标签 A) 如果tld还没有,则从…
前言: 在用IE浏览器时访问tomcat项目时,页面报400错误,后台错误: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 在网上查得资料时因为Tomcat版本在7以后会对http头进行验证,不符合规范的就会抛出异常 而IE浏览器无法对URL自动转义 解决办法:…
出现400错误是yii2.0的csrf防范策略导致 在components里面添加request配置如下: 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => '83r5HbITBiMfmiYPOZFdL-raVp4O1VV4', 'enableCookieValid…