- 博客(25)
- 收藏
- 关注
原创 memcached 安装及运行
1、安装libeventroot@xxx:# tar vxzf libevent[-version].tar.gzroot@xxx:# cd libevent[-version]root@xxx:# ./configure --prefix=/usrroot@xxx:# makeroot@xxx:# make install 2、安装Memcachedro...
2013-04-20 20:01:31
190
原创 jvm tomcat 监控
关于jvm监控,java有jmx: java management extension ( java.lang.management ) http://www.ibm.com/developerworks/cn/java/j-lo-jse63/index.htmlhttp://www.jdon.com/concurrent/jmx.htmhttp://www.jdon.com/c...
2013-01-19 14:35:35
153
原创 servlet中获取spring context, 获取bean
import org.springframework.web.context.WebApplicationContext;import org.springframework.web.context.support.WebApplicationContextUtils;//struts2 获取ServletContext ServletActionContext.ge...
2013-01-09 16:54:09
168
原创 MySQLSyntaxErrorException: Unknown character set: 'utf8mb4'
今天拿别人的项目部署调试,出现如下问题 org.hibernate.exception.SQLGrammarException: Cannot open connection...root causecom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown character set: 'utf...
2012-12-14 15:24:14
385
原创 maven jasper StreamCorruptedException: invalid stream header: EFBFBDEF
参考: http://javarepo.blogspot.com/2011/02/using-jasper-templates-inside-maven.html 要翻过那堵墙 http://maven.apache.org/plugins/maven-resources-plugin/examples/binaries-filtering.html ireport做的...
2012-07-24 16:48:51
921
1
原创 struts2 前端向后端传送复杂对象/JSON
javascript方法: JSON.stringify(jsonObj), 将JSON对象转为字符串 项目中需要将复杂的对象从前端传到后端, 通过struts2的拦截器, 直接转换注入到action的属性中比如 private List<Bean> test; 当然可以将data写成: { "test[0].note":"note a", "test...
2012-07-18 14:30:52
314
原创 maven资源过滤
使用maven-->build-->resources-->resource-->filtering = true,过滤资源文件,替换资源文件中${propertyName}的部分,可以配合maven profile使用 pom.xml <build> <finalName>xxx-core</finalName&...
2012-07-18 13:42:19
105
原创 Transaction has been rolled back because it has been marked as rollback
参考: http://blog.youkuaiyun.com/waixin/article/details/6551457 org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollbac...
2011-09-02 15:22:51
229
原创 css隐藏超出长度的文字
参考: http://zhidao.baidu.com/question/78317128 css 隐藏超出的文字 overflow:hidden;text-overflow:ellipsis;white-space:nowrap
2011-08-31 16:29:02
113
原创 wtp m2eclipse scope=provided bug
eclipse + wtp + m2eclipse 使用wtp自动部署的功能的时候, 会有scope的bug, scope取值test或者provided都会把相应的jar部署到/WEB-INF/lib下, 而命令行下mvn install产生war就没有这样的bug bug: https://issues.sonatype.org/browse/MECLIPSEWTP-126...
2011-07-05 21:22:38
106
原创 eclipse maven wtp jar/lib deploy
参考: http://www.redredred.com.au/m2eclipse-and-wtp/ eclipse工程(with maven & wtp)在部署的时候, 所有通过maven配置的jar都没有复制过去, 需要在 .classpath文件中添加<attributes/>部分 <classpathentry exported="true"...
2011-07-05 10:45:42
130
原创 hibernate reverse engineering, customized type mapping, MappingException
在myeclipse reverse engineering生成 hbm.xml的时候, mysql的timestamp类型会被映射到java.sql.Timestamp, 需要自定义呢, 要改 customized type mapping, 添加自定义的mapping, 如果输入timestamp --> java.util.Date 会产生以下错误:org.hibernat...
2011-07-04 15:22:07
154
原创 jbpm4.4 deleteProcessInstanceCascade: a foreign key constraint fails
参考: http://blog.youkuaiyun.com/zhouyong0/archive/2010/12/20/6086426.aspx jBPM4.4 执行 executionService.deleteProcessInstanceCascade(processInstanceId)时报以下错误 将hibernate.dialect 由 org.hibernate.dialect....
2011-06-16 17:50:59
191
原创 mvn archetype:generate archetype list
Choose archetype:1: remote -> docbkx-quickstart-archetype (-)2: remote -> multi (-)3: remote -> simple (-)4: remote -> apparat-archetype-asm (-)5: remote -> apparat-archety...
2011-05-31 14:59:51
289
原创 jquery easyui datagrid js获取记录数 页数 当前页
首先要吐槽的是 easyui竟然找不到未压缩的版本(1 也许它是藏在某个个几角旮旯; 2 压缩的版本想看懂? 大概你得在你脑袋上外接个CPU), 而且官方的文档简陋的不能再简陋了, 想实现个稍微复杂点的功能都费劲. 以下代码 获取记录数 页数 当前页, var grid = $('#datagrid');var options = grid.datagrid('get...
2011-05-19 14:03:29
187
原创 spring mvc json @ResponseBody 406 not acceptable jackson
好吧,我承认,MyEclipse这东西是很好用,但是问题也多多。折腾了两小时spring libs之后,再加上jackson 1.8.0,一切正常。 spring-framework-3.0.5 + jackson-1.8.0-all + n多spring依赖的jar 以下内容仅供参考,是MyEclipse带的spring-3.0.1,然后加上自己下载的jackson lib...
2011-04-18 00:01:30
94
原创 javascript form不支持reset(), select清空元素
form中包含一个id="reset"的元素,修改id即可参考:http://www.92798.com/post/147.html document.getElementById(sid).options.length = 0;
2011-03-25 10:44:57
755
原创 struts2 jsp:forward .action/.do
需要修改web.xml中的struts2过滤器<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.do</url-pattern> <dispatcher>REQUEST</dispatcher> &
2011-03-15 09:29:14
165
原创 struts2 json JSONException IllegalAccessException 数组/集合表示
错误: Class org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public" 解决: excludePropertie...
2011-03-08 09:37:46
103
原创 OgnlException: target is null for setProperty
1. form提交的action错误2. 没有getter/setter方法3. 没有无参的构造函数 [WARN ] [10:00:22] com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression 'post.content' with value '[Ljava.lang.String;@1...
2011-03-02 10:55:48
194
原创 AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped clas
生成的注解都没问题, 问题在于hibernate/spring的配置上缺少Post类 <property name="annotatedClasses"> <list> <value>demo.springsecurity.model.Role</value> <value>demo.springsecuri...
2011-02-28 09:06:05
293
原创 fckeditor ClassNotFoundException EnabledUserAction
一个空格折腾了一个多小时, 从网上拷过来的配置, 后面跟了个空格, 在表情的位置 fckeditor.propertiesconnector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction type Exception reportmessagedescription ...
2011-01-06 17:37:00
116
原创 struts2 上传文件大小限制 SizeLimitExceededException
非原创, 只做记录用, http://blog.youkuaiyun.com/zhoutao198712/archive/2008/10/19/3104755.aspx org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (2...
2010-12-27 16:41:11
99
原创 struts2 json Date类型 2010-12-22T10:26:50
非原创, 只做记录用 http://www.iteye.com/topic/568775 json插件默认格式化java.util.Date类型的格式如2010-12-22T10:26:50, 需要添加@JSON(format="yyyy-MM-dd HH:mm:ss") @JSON(format="yyyy-MM-dd HH:mm:ss") public Dat...
2010-12-22 14:55:36
82
原创 tomcat6单向认证https No Certificate file specified
备忘,非原创,参考:http://rhuichao.iteye.com/blog/617201 java.lang.Exception: No Certificate file specified <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="tr...
2010-11-22 09:00:15
111
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人