
工作笔记
丶瓦力
这个作者很懒,什么都没留下…
展开
-
Eclipse导入web项目变为java项目的解决办法
1、找到项目工作空间目录,打开.project文件,并修改文件, 修改如下: 找到: 代码段,在代码段中加入如下内容并保存: org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature org.转载 2015-08-19 11:23:45 · 3919 阅读 · 0 评论 -
使用insert向一个表中插入其他表中的多条记录
insert into t1 (c_groupid) select c_groupid from t2 where t2.c_grouplevel =1原创 2015-11-04 11:52:07 · 1004 阅读 · 0 评论 -
tomcat可以启动,localhost:8080无法访问
症状:tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误。同时其他项目页面也不能访问。关闭eclipse里面的tomcat,在tomcat安装目录下双击startup.bat手动启动tomcat服务器。访问htt://localhost:8080/能正常访问tomcat管理页面。症状原因: e转载 2015-11-16 23:27:48 · 17709 阅读 · 4 评论 -
获取properties中的 value
Properties properties = new Properties(); try { properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("log4j.properties")); configPath = properties.getPrope转载 2015-12-09 09:50:44 · 516 阅读 · 0 评论 -
oracle简单触发器
触发器写法:create or replace trigger UserToTemp after insert or update or deleteon 表1 for each rowdeclare //定义变量 integrity_error exception; errno integer; errmsg char(2转载 2015-12-17 10:31:58 · 460 阅读 · 0 评论 -
oracle触发器 判断插入的记录是否满足条件,如果满足,则在b表中插入相应记录
需求:表A,有字段level等,当a中记录有update操作时,如果其字段level>3,则把这条记录插入到B表中, create trigger triggerTest on A for update as begin insert b select xxx,xxx from inserted a //查询在a中插入的记录的level字转载 2015-12-17 10:58:36 · 2874 阅读 · 0 评论 -
action中获取request对象
ServletActionContext.getRequest()转载 2015-12-08 10:28:53 · 360 阅读 · 0 评论 -
easyui datagrid getChecked只能获取一行的问题
datagrid初始化时需要指定idFiled属性,指明哪一个字段是标识字段(string)。转载 2015-12-08 13:43:56 · 1613 阅读 · 0 评论 -
easyui分页显示本地log4j文件+文件下载+打包下载
DAO层private File[] files=null; @Override public DataGrid getAllData(LogFile l) { DataGrid dg = new DataGrid(); List rowsList = new ArrayList(); long total=0; InputStream logInputStr原创 2015-12-09 09:53:14 · 641 阅读 · 0 评论 -
ORA-14411: 该 DDL 不能与其他 DDL 并行运行
1.查找出被锁定的会话的sid,serial#select sid,serial# from v$session t where t.SID IN (select session_id from v$locked_object);2.结束掉进程(有几行执行几次)alter system kill session '25,3343';kill system转载 2015-12-16 17:05:38 · 3067 阅读 · 1 评论 -
退出时清空session并关闭所有打开的子页面
var windowObjList=new Array();//用于子页面关闭function newWindow(url){ var windowObj =window.open(url,"_blank");//将打开的窗口对象作为值赋给Wind对象,括号里意思(地址,长宽) windowObjList.push(windowObj);}//关闭子页面//.....清空se原创 2015-12-11 11:48:28 · 673 阅读 · 0 评论 -
自定义zTree+easyui右键菜单
/* * 自定义zTree右键菜单 */ function zTreeOnRightClick(event, treeId, treeNode) { // 判断是否点击到tree节点上 if (!(!treeNode && event.target.tagName.toLowerCase() != "button" && $( event.target).parents(转载 2015-11-20 09:44:24 · 747 阅读 · 0 评论 -
根据IE和FF加载不同css样式文件
$(function() { if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) { //ie jQuery("head").append(""); a = jQuery("head").children(":last");原创 2015-11-13 10:33:13 · 388 阅读 · 0 评论 -
使用超链接提交中文参数时的乱码问题
String str =new String(ServletActionContext.getRequest().getParameter( "参数名").getBytes("ISO8859-1"),"UTF-8");//解决中文乱码原创 2015-10-26 10:05:25 · 632 阅读 · 0 评论 -
下载文件时保存中文名称有乱码
String saveName = fileName + ".ini";response.setHeader("Content-Disposition", "attachment;filename=" + new String( saveName.getBytes("UTF-8"), "ISO8859-1" ) ); ;原创 2015-10-26 11:07:29 · 1802 阅读 · 0 评论 -
文件下载实例
HttpServletResponse response = ServletActionContext.getResponse(); InputStream inputStream = null; OutputStream outputStream = null; msg = "文件下载成功"; try { response.setContentType("applic原创 2015-10-20 14:31:59 · 333 阅读 · 0 评论 -
动态为a标签的href中添加参数
zTreeNode = $.fn.zTree.getZTreeObj('leftzTree').getSelectedNodes()[0].name;$("#aDownLoad").attr("href","${pageContext.request.contextPath}/stationLocationAction!downLoadFile.action?dwdName="+zTreeNod原创 2015-10-20 16:00:48 · 8926 阅读 · 0 评论 -
js中使用正则表达式去除字符串前后空格
String.prototype.trim=function() { /* ^ : 第一位的字符 s : 1个或N个空白字符 $ : 最后的字符 | : 或 g : 全局 */ return this.replace(/(^\s*)|(\s*$)/g,'');}转载 2015-09-21 15:24:15 · 501 阅读 · 0 评论 -
easyUi datagrid实时刷新的闪屏问题
在中添加datagrid的css /*-- 消除grid屏闪问题 --//*/ .datagrid-mask{ opacity:0; filter:alpha(opacity=0); } .datagrid-mask-msg{ opacity:0; filter:alpha(opacity=0); }转载 2015-09-18 10:14:00 · 1715 阅读 · 0 评论 -
ajax提交参数,后台接收乱码
1、ajaxtype:'post',contentType:'application/x-www-form-urlencoded; charset=UTF-8',2、actionServletActionContext.getResponse().setCharacterEncoding("UTF-8");原创 2015-10-26 09:16:10 · 445 阅读 · 0 评论 -
在servlet中使用spring注解
在sevlet的init中添加两句话: super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); 网上搜了半天,乱七八糟,就这个靠谱转载 2015-10-22 10:46:22 · 475 阅读 · 0 评论 -
文件上传实例(使用plupload)
1、UploaderServlet private static final long serialVersionUID = 1L; String repositoryPath; /* * uploadPath : tomcat-项目文件-upload * 在init中设置 */ String uploadPath; private static final Log原创 2015-10-21 15:44:08 · 1912 阅读 · 0 评论 -
在jsp中使用log
console.log();原创 2015-11-06 11:10:33 · 3185 阅读 · 0 评论 -
模拟QQ的停靠时隐藏效果,隐藏树形菜单
目前只实现了停靠在left和top//script脚本//鼠标悬停 function showTreeMenu() { //获取treeMenu的top和left的值 var posTop = document.getElementById("treeMenu").offsetTop+document.body.scrollTop; var posLeft = docu原创 2015-11-12 15:07:46 · 520 阅读 · 0 评论