JSP中应用jspsmartupload出现的问题
JSP代码如下:<%@pagelanguage="java"import="com.jspsmart.upload.*"%><jsp:useBeanid="mySmart...
JSP代码如下:
<%@ page language="java" import="com.jspsmart.upload.*"%>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<HTML>
<BODY BGCOLOR="white">
<H1>jspSmartUpload : Sample 1</H1>
<HR>
<%
// Variables
int count=0;
// Initialization
mySmartUpload.initialize(pageContext);
mySmartUpload.setTotalMaxFileSize(100000);
// Upload
mySmartUpload.upload();
try {
// Save the files with their original names in the virtual path "/upload"
// if it doesn't exist try to save in the physical path "/upload"
//count = mySmartUpload.save("/upload");
// Save the files with their original names in the virtual path "/upload"
count = mySmartUpload.save("/upload", mySmartUpload.SAVE_PHYSICAL);
// Display the number of files uploaded
out.println(count + " file(s) uploaded.");
} catch (Exception e) {
out.println(e.toString());
}
%>
</BODY>
</HTML>
出现的异常描述是:
java.lang.IllegalArgumentException: This path does not exist (1135).
请高手赐教啊~ 展开
<%@ page language="java" import="com.jspsmart.upload.*"%>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<HTML>
<BODY BGCOLOR="white">
<H1>jspSmartUpload : Sample 1</H1>
<HR>
<%
// Variables
int count=0;
// Initialization
mySmartUpload.initialize(pageContext);
mySmartUpload.setTotalMaxFileSize(100000);
// Upload
mySmartUpload.upload();
try {
// Save the files with their original names in the virtual path "/upload"
// if it doesn't exist try to save in the physical path "/upload"
//count = mySmartUpload.save("/upload");
// Save the files with their original names in the virtual path "/upload"
count = mySmartUpload.save("/upload", mySmartUpload.SAVE_PHYSICAL);
// Display the number of files uploaded
out.println(count + " file(s) uploaded.");
} catch (Exception e) {
out.println(e.toString());
}
%>
</BODY>
</HTML>
出现的异常描述是:
java.lang.IllegalArgumentException: This path does not exist (1135).
请高手赐教啊~ 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询