- 浏览: 33406 次
- 性别:
- 来自: 深圳
最新评论
文章列表
首先是web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j ...
AjaxFileUpload实现文件异步上传效果更好,使用简单:<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="http://www.phpddt.com/usr/themes/dddefault/jq ...
虽然我最后没有用ajaxfileupload实现异步上传的功能,但是也对其中的错误进行查看,错误整理如下:
问题1:jQuery.handleError is not a function 原因是,经测试handlerError只在jquery-1.4.2之前的版本中存在,jquery-1.6 和1.7中都没有这个函数 ...
文件上传是通过2进制传输到后台,值能通过submit进行提交,并且中的配置如下<form id="id名称" method="post" enctype="multipart/form-data" action="对应的action">对应的上传文件的 文本框<input type="file" id="importFile" name="importFile" value="" />,后台的取得文件写法: ...
今天在使用jquery.form插件的ajaxSubmit上传文件时,在IE、chorme下测试,老是出现下载文件的提示框,
在查看了jquery.form的源码时,发现了下面的代码:if (options.iframe !== false && (options.iframe || shouldUseFrame)) { if (options.closeKeepAlive) ...
【maven package】错误: [INFO] Scanning for projects…[INFO] [INFO] Building Struts 2 Blank Webapp 1.0-SNAPSHOT[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 0.547s[INFO] Finished at: Wed Apr 13 13:09:48 CST 2011[INFO] Final Memory: 2M/4M[INFO] [ERROR] Faile ...
jar包直接拷贝到WEB-INF/lib下和以userLibrary形式引入的区别?
jar包放置在WEB-INF/lib下和通过build path导入的区别是什么?问题: 1、web架包找不到 2、maven项目转变web项目通过 Deployment Assembly把架包添加到WEB-INF/lib引起的架包冲突
通俗的讲是和classLoader有关,对于纯java项目,它不存在WEB-INF目录,所以在引入jar包的时候一般都是通过buildpath直接引入,例如我要引入Spring3X,那么先定义一个user library,然后通过build path引入。
纯java项 ...
1、没有修改前出现的错误:2013-11-15 10:43:42 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet CXFService as unavailable
2013-11-15 10:43:42 org.apache.catalina.core.ApplicationContext log
严重: Error loading WebappClassLoader
context: /qqq
delegate: false
repositories:
/WEB-INF/classes ...
Spring 获得全局变量
- 博客分类:
- Spring
使用静态变量缓存ApplicationContext 的两种方法:http://rayoo.iteye.com/blog/1520219
Spring的PropertyPlaceholderConfigurer应用 http://www.cnblogs.com/yl2755/archive/2012/05/06/2486752.html
Java中如何获取spring中配置的properties属性文件内容 .
http://blog.csdn.net/lhy030320999/article/details/7683243
@Override是JDK5 就已经有了,但有个小小的bug,就是@Override还不能用在interface上,只能用在class上。给我们的代码注释带来了一定的烦恼。
为了表明一个方法是实现一个interface,我们可以使用{@inheritDoc}来标识,同时,该tag会把super type的注释复制下来。
而JDK6 修正了这个Bug,无论是对父类的方法覆盖还是对接口的实现都可以加@Override
关于java1.5中{@inheritDoc}的使用的使用参考http://www.iteye.com/topic/711156
单例设计模式---饿汉式 和懒汉式
- 博客分类:
- 设计模式
首先写个单例:
//懒汉式
public class SingleDemo {
private static SingleDemo s = null;
private SingleDemo(){}
public static SingleDemo getInstance(){
if(s == null){
s = new SingleDemo();
}
return s;
}
}
//饿汉式
public class singleDemo{
private static SingleDemo s = new SingleDemo ();
private Singl ...
假设我们有一个表Student,包括以下字段与数据:
drop table student;
create table student
(
id int primary key,
name nvarchar2(50) not null,
score number not null
);
insert into student values(1,'Aaron',78);
insert into student values(2,'Bill',76);
insert into student values(3,'Cin ...
in和select的技术原理:
㈠ in:先进行子查询,再进行主查询
㈡ exists:先进行主查询,再到子查询中过滤
in和exists的使用建议:
Ⅰ 如果限制性强的条件在子查询,则使用in
Ⅱ 如果限制性强的条件在主查询,则使用exists
可用查询结果集来理解上面这段话,采用最优化匹配原则:拿最小记录匹配大记录。限制性强,则结果集小;反之,则大。
注释:
① 使用exists可以将子查询结果定位常量,不影响查询结果,而且,效率高。
比如:
select e.*
from emp e
where exists
(select 1 from dept d
where ...
- 2013-09-08 20:59
- 浏览 630
- 评论(0)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
...