这么近 那么远
harbey · 共 115 篇文章
Eclipse/MyEclipse快捷键失效
转自:http://hi.baidu.com/ujjboy/blog/item/31b7888fa7595bfc503d9214.html 装了个MyEclipse6.5,发现不能用快捷键Alt+/来提示代码了,google了一下,发现解决办法如下: 1、Eclipse下进入Windows ->Preperences ->General ->keys 2、把word completion的快捷键设置alt+/删掉! 3、把Content Assist的快捷键由ctrl+space改成alt+/ (ctrl+space一般被输入法占用) 4、window->Preferences->Java-…
2009-05-07 17:26 · eclipse · 评论(0)
java SimpleDateFormat sqlserver日期字段格式化
问题描述: 从sqlserver数据库中有时间字段值2009-05-31 17:00:00.000 取出到页面后得到 2009-05-31 17:00:00.0 解决方法: SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); format.format(rs.getTimestamp("BeginDate"));
2009-05-07 17:04 · Java · 评论(0)
javascript trim方法
在javascript中的string对象没有trim方法,所以trim功能需要自己实现: 代码如下: ﹤scriptlanguage=”javascript”﹥ /** *删除左右两端的空格 */ String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ''); } /** *删除左边的空格 */ String.prototype.ltrim=function() { return this.replace(/(^s*)/g,''); } /** *删除右边的空格 */ String.prototype…
2009-04-24 10:44 · javascript · 评论(1)
设置s:radio为默认选中
<s:radio name="free" list="#{'1':'是','0':'否'}" listKey="key" listValue="value" value="1"></s:radio> 其中value指定默认选中
2009-04-23 23:32 · struts 2.x · 评论(0)
如何把resin安装成window service(windows服务)?
问题描述: 如何把resin安装成window service(windows服务)? 解决办法: 可以通过resin.exe的参数install和remove完成,例如: dos:> ${resin_home}\resin.exe -install dos:> ${resin_home}\resin.exe -remove 另外,安装时可以指定服务名,用以标明服务对应哪些应用application,例如: dos:> ${resin_home}\resin.exe -install-as dos:> ${resin_home}\resin.exe -remove-as dos:> ${re…
2009-04-17 14:47 · resin 3.x · 评论(0)
native2ascii转换中文properties文件
问题描述: 在property文件中的中文,如果不经过encode的话,会以乱码的形式呈现; 解决办法: 可以通过${java_home}/jdk/bin下的native2ascii.exe来encode中文; 例如: 在dos下输入: native2ascii ApplicationResources.properties ApplicationResources_zh_CN.properties 这样就将中文encode成类似如下的字符串: errors.invalid={0} \u65E0\u6548\u3002
2009-04-13 20:37 · Java · 评论(0)
nexus-maven-repository-index.zip手动下载与设置
问题描述: 在启动eclipse的时候,在maven控制台经常会看到更新nexus-maven-repository-index.zip,用eclipse更新速度会很慢,甚至有不能完成下载的情况; 问题解决: 1.在你的eclipse里的这个配置会使你在启动eclipse的时候自动去更新: "window"->"preferences"->"MyEclipse Enterprise Workbeanch"->"Maven4MyEclipse"->"Maven"中能看到"Update Maven projects on startup"被打勾 2.手动去下载nexus-maven-reposi…
2009-04-11 20:37 · maven · 评论(2)
Maven2.0.10学习笔记
2.7使用Maven Help插件: 在dos上输入:mvn help:describe -Dplugin=help -Dfull 会看到dos输出help插件的所有目标(golds),我使用的Maven版本是2.0.10,其有9个golds,分别为: help:active-profiles help:all-profiles help:describe help:effective-pom help:effective-settings help:evaluate help:expressions help:help help:system 控制台中输出了其对应的描述和可用参数; 在mv…
2009-04-11 19:18 · maven · 评论(0)
org.maven.ide.eclipse\nexus\local\_a.fdx
1.问题描述: 在MyEclipse中使用MAVEN时,经常会报告如下错误: Error on adding indexing context central; ${workspace.metadata.plugins\org.maven.ide.eclipse\nexus\central_a.fdx (系统找不到指定的文件。) 2.解决方法: 删除 ${workspace}.metadata.plugins\org.maven.ide.eclipse这个目录 maven会自己重建索引的
2009-04-11 17:39 · maven · 评论(0)
struts2中多action间传递ActionMessage,ActionError
问题描述: 在我的struts.xml中有如下片段 <action name="delete" class="managerAction" method="delete"> <result type="redirect-action">index</result> </action> 由于result type="redirect-action"所以index.action中获取不到delete方法中处理得到的ActionMessage,ActionError; 解决办法: 修改 index 为: index 即可; result type的类型说明如下: Chain : 用来处理Actio…
2009-04-01 11:26 · struts 2.x · 评论(1)