- 浏览: 24270 次
- 性别:
- 来自: 北京
最新评论
-
lkw225657:
请教一下,这是文件上传,还是文件拷贝。
java文件上传方法
文章列表
<beans>
Spring配置文件的根元素,包含一个或多个bean元素。
default-autowire属性:默认的bean自动装配模式。可选5种模式。
no:不使用自动装配。Bean的引用必须通过ref元素定义。
byName:通过属性名字进行自动装配。
byType:如果BeanFactory中正好有一个同属性类型一样的bean,就自动装配这个属性。如果有多于一个这样的bean,就抛出一个致命异常,它指出你可能不能对那个bean使用byType的自动装配。如果没有匹配的bean,则什么都不会发生,属性不会被设置。如果这是你不想要的情况(什么都不发生),通过设置de ...
- 2009-07-09 19:32
- 浏览 811
- 评论(0)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset ...
- 2009-06-02 10:49
- 浏览 1080
- 评论(0)
/**
* 发布
* @preserve
*/
public ActionForward declare(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
if (log.isDebugEnab ...
- 2009-06-02 10:41
- 浏览 831
- 评论(0)
import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
im ...
- 2009-06-02 10:39
- 浏览 729
- 评论(0)
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringWriter;
public class PublishFileWriter {
/**
* 写文件到磁盘 realpath 生成文件的位置 fileName 生成文件的文件名
*
* @param articlecolumn
* @param fileContent
* @throws IOException
* @preser ...
- 2009-06-02 10:38
- 浏览 661
- 评论(0)
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class FileReaderUtil {
/**
* 读文件到String
* @param fileName
* @return
* @throws Exception
*/
public static String readFile(String fileName) throws Exception {
...
- 2009-06-02 10:36
- 浏览 807
- 评论(0)
一、分析阶段
一般来说,在系统分析阶段往往有太多需要关注的地方,系统各种功能性、可用性、可靠性、安全性需求往往吸引了我们大部分的注意力,但是,我们必须注意,性能是很重要的非功能性需求,必须根据系统的特 ...
- 2009-06-02 10:24
- 浏览 740
- 评论(0)
辅助函数(Miscellaneous Single-Row Functions)
1、DECODE(exp,s1,r1,s2,r2..s,r[,def]) 可以把它理解成一个增强型的if else,只不过它并不通过多行语句,而是在一个函数内实现if else的功能。
exp做为初始参数。s做为对比值,相同则返回r,如果s有 ...
- 2009-06-02 10:23
- 浏览 756
- 评论(0)
<html>
<head><style type="text/css">
<!--.link {
color : #000000;
text-decoration : none;
}A.link:hover {
color : red;
}A.link:active {
color : #000000;
text-decoration : none;
}//-->
</style>
<style type="text/css">
<!--
#slide ...
- 2009-06-02 10:08
- 浏览 937
- 评论(0)
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import org.apache.commons.logging.Log;
/**
* 2005-7-26 14:41:31
*/
public class DateU ...
- 2009-06-02 10:04
- 浏览 672
- 评论(0)
1.导入struts、spring、hibernate的jar包。
注意:1.jta.jar不导入会导致Error creating bean with name 'sessionFactory' defined in ServletContext异常
2.asm.jar asm-attrs.jar cglib-2.1.3.jar commons-cllections-2.1.1.jar 包重复也会导致上面的异常
2.建立存放spring、struts配置文件的文件夹,然后再WEB.XML文件中配置他们的路径
<!--②-->
<context-par ...
- 2009-06-02 09:55
- 浏览 1253
- 评论(0)
update sat_taxpayer set nsrmc='AAAA'
where nsrsbh = '110107751318780' ;
insert into sat_taxpayer(remarkid, nsrsbh)
select '999', '110107751318780' from dual
where ('110107751318780') not in (select nsrsbh from sat_taxpayer );
- 2009-06-02 09:47
- 浏览 634
- 评论(0)
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import org.apache.struts.upload.FormFile;
public class NSRImport ...
- 2009-06-02 09:45
- 浏览 871
- 评论(0)
public class UploadUtils {
/**
* 根据文件路径,上传文件
* @param sourcePath 源文件路径和名字
* @param targetPath 目标文件路径和名字
* @param maxFileSize 文件大小
* @return 布尔值
*/
public static boolean uploadFile(String sourcePath, String targetPath, int maxFileSize){
...
- 2009-06-02 09:34
- 浏览 2541
- 评论(1)
/**
* 下载文件
*/
public ActionForward downLoad(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String destPathName = servlet.getServletContext().getRealPath("/");
response.reset();
String fileName = ...
- 2009-06-02 09:20
- 浏览 743
- 评论(0)