摘要: 在tomcat7.0下,会报一个异常:org.apache.jasper.JasperException: /head.jsp(1,84) The JSP specification requires that an attribute name is preceded by whitespacehead.jsp我是用<jsp:include page="head.jsp" flush="true"/>引入的,在tomcat6.0的环境下,不会报以上的异常,但在tomcat7.0会报这个异常,后来,仔细查了一下head.jsp文件第一行。原来 阅读全文
posted @ 2012-02-27 20:11 刘振明 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: 数据库中有project表,使用ibatis的根据id获取查询数据时,如果数据没有查询到。则返回的Project.java对象为null 阅读全文
posted @ 2012-02-27 10:22 刘振明 阅读(626) 评论(0) 推荐(0) 编辑
摘要: DateTimestart = new DateTime();DateTimeend = new DateTime();Period p = new Period(start,end,PeriodType.days());最后一个参数如果不写的话,下面的返回值将会是错误的。int day = p.getDays();period类不明白原理。 阅读全文
posted @ 2012-02-24 11:09 刘振明 阅读(6378) 评论(1) 推荐(0) 编辑
摘要: Struts2的property标签可以把“<”、“>”、“&”等等自动转成类似&xxxx;的HTML转意表示,在显示一段带HTML格式的文本时这功能很讨厌,可以设property标签的escape="false",即可关闭自动转码操作。 阅读全文
posted @ 2012-02-24 09:36 刘振明 阅读(1558) 评论(0) 推荐(0) 编辑
摘要: 在eclipse中依次点击Window---->Preference---->Web---->JSP Files,修改Encoding为ISO 10646/Unicode(UTF-8)即可。 阅读全文
posted @ 2012-02-23 20:45 刘振明 阅读(6217) 评论(1) 推荐(1) 编辑
摘要: 原来是在配置文件中返回的是json类型。前台是用window.location.href提交的。 阅读全文
posted @ 2012-02-23 16:23 刘振明 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 标准参考根据 W3C HTML4.01 规范中的描述,"name" 属性值必须以字母 ([A-Za-z]) 开头 ,其后由任何字母、数字 ([0-9])、连字符 ("-")、下划线 ("_")、冒号 (":") 和句号 (".") 组成。更详细内容可以参考 HTML 4.01 规范 6.2 SGML basic types - ID and NAME tokens。单选按钮多个单选按钮共享相同控件名称 (name),如果这个 name 值是合法的,那么同值单选按钮将组成一组,它们是互斥的,只有一 阅读全文
posted @ 2012-02-21 20:13 刘振明 阅读(1278) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" ?><project name="hp" default="war"><property name="src" value="src" /><property name="WebContent" value="WebContent" /><property name="dist" value="dist" />< 阅读全文
posted @ 2012-02-16 23:10 刘振明 阅读(6421) 评论(0) 推荐(0) 编辑
摘要: <move file="${dist}/${warDest}/WEB-INF/config/log4j.build.properties"tofile="${dist}/${warDest}/WEB-INF/config/log4j.properties" />修改文件名 阅读全文
posted @ 2012-02-15 23:02 刘振明 阅读(3638) 评论(0) 推荐(0) 编辑