我在使用smartUpload组件上传文件下面是代码 打印“上传成功了,但是upload文件夹没有上传的文件,没提示
我是在webroot下文件夹下建的upload文件。<%@pagelanguage="java"import="java.util.*"pageEncoding="gbk...
我是在webroot下文件夹下建的upload文件。
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'imageUpLoad.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form action="smartUpload.jsp" method="post" enctype="multipart/form-data">
请选择上传的文件<input type="file" name="pic">
<input type="submit" value="上传">
</form>
</body>
</html>
--------------
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page import="org.lxh.smart.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'smartUpLoad.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<%
SmartUpload smart=new SmartUpload();
smart.initialize(pageContext);//初始化上传操作
smart.upload(); //上传准备
try{
smart.save("/upload");
System.out.println("上传成功");
}
catch(Exception e){
out.println(e.getMessage());
}
%>
</body>
</html>
哪位大侠帮帮我,远程也可以 展开
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'imageUpLoad.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form action="smartUpload.jsp" method="post" enctype="multipart/form-data">
请选择上传的文件<input type="file" name="pic">
<input type="submit" value="上传">
</form>
</body>
</html>
--------------
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page import="org.lxh.smart.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'smartUpLoad.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<%
SmartUpload smart=new SmartUpload();
smart.initialize(pageContext);//初始化上传操作
smart.upload(); //上传准备
try{
smart.save("/upload");
System.out.println("上传成功");
}
catch(Exception e){
out.println(e.getMessage());
}
%>
</body>
</html>
哪位大侠帮帮我,远程也可以 展开
若以下回答无法解决问题,邀请你更新回答
2个回答
2011-02-21
展开全部
这里有一个无刷新多文件上传系统
里面可以判断文件多少 文件类型
里面有教程和源码
里面可以判断文件多少 文件类型
里面有教程和源码
参考资料: http://www.blueidea.com/common/shoutbox/redir.asp?7=n&id=11280
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
组件上传文件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询