06 2013 档案
tomcat启动报错Document base D:\apache-tomcat-6.0.35\webapps\CelLoud does not exist or is n...
摘要:错误:java.lang.IllegalArgumentException: Document base C:\test\apache-tomcat-6.0.35\apache-tomcat-6.0.35\webapps\springmvc does not exist or is not a readable directory...解决方法:1.找到D:\apache-tomcat-6.0.35\conf\server.xml,把server-config.xml中无效的连接配置都删除掉
阅读全文
mysql报错:No operations allowed after statement closed.
摘要:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.
阅读全文
代码优化——eclipse抽取相同内容
摘要:选中需要抽取的重复代码——>右键——>Refactor——>Extract method......
阅读全文
List中去除重复项的方法
摘要:方法一: 利用HashSet不可重复的特性先将List中不重复的数据添加到HashSet中,然后再重新给List复制List list = dataService.getStrainItem(userId); HashSet h = new HashSet(list); list.clear();list.addAll(h);方法二: 第一种方法的进化,原理相同publicstaticListremoveListSameObject(Listlist){SetsomeSet=newHashSet(list);Iteratoriterator=someSet.iterator();Listr..
阅读全文
struts2 文件上传显示进度条
摘要:一. struts2读取进度原理分析(作为草稿存了好久,刚刚发布出来......)1. 在strut2中控制文件上传信息的类是实现MultiPartRequest接口的JakartaMultiPartRequest其实第一次看到源文件时我打了个退堂鼓,因为觉得内容太长了,不想看。冷静下来将思路理顺,将分开的各个方法还原到一个方方中中,发现还是很好理解的:@Override public void parse(HttpServletRequest request, String saveDir) throws IOException { setLocal...
阅读全文
Chrome调试js
摘要:在IE中用onblur调用某个方法可以执行,但是在chrome中必须改成onchange事件才可以......
阅读全文
调节file文件上传框的样式
摘要:页面:<span class="sl-custom-file"> <a href="#" class="btn btn-green" id="selectFile4" >选择文件</a> <input type="file" name="uploadImage" id="uploadFile4" value="选择" onblur="clickFile(4)" title=&
阅读全文
浙公网安备 33010602011771号