", ">"
;
sTemp = sTemp.replaceAll("\"", """
;
return sTemp;
}
//初始化上传限制数据
public void InitUpload(String realpath){
UploadWebHelper uw = new UploadWebHelper();
uw.filename = realpath+"WEB-INF/style.xml";
uw.getInstance();
UploadBean bean = uw.InitPara();
try{
sUploadDir = bean.getSuploaddir();
System.out.println(sUploadDir);
if(sType.equalsIgnoreCase("remote"
)
{
sAllowExt =bean.getSremoteext();
sAllowExt = sAllowExt + "|" + sAllowExt.toUpperCase();
nAllowSize =Integer.parseInt(bean.getSremotesize()) ;
System.out.println(sAllowExt+nAllowSize);
}
else if(sType.equalsIgnoreCase("file"
)
{
sAllowExt = bean.getSfileext();
sAllowExt = sAllowExt + "|" + sAllowExt.toUpperCase();
nAllowSize = Integer.parseInt(bean.getSfilesize());
System.out.println(sAllowExt+nAllowSize);
}
else if(sType.equalsIgnoreCase("media"
)
{
sAllowExt =bean.getSmediaext();
sAllowExt = sAllowExt + "|" + sAllowExt.toUpperCase();
nAllowSize = Integer.parseInt(bean.getSmediasize());
System.out.println(sAllowExt+nAllowSize);
}
else if(sType.equalsIgnoreCase("flash"
)
{
sAllowExt =bean.getSflashext();
sAllowExt = sAllowExt + "|" + sAllowExt.toUpperCase();
nAllowSize = Integer.parseInt(bean.getSflashsize());
System.out.println(sAllowExt+nAllowSize);
}
else
{
sAllowExt =bean.getSimageext();
sAllowExt = sAllowExt + "|" + sAllowExt.toUpperCase();
nAllowSize = Integer.parseInt(bean.getSimagesize());
System.out.println(sAllowExt+nAllowSize);
}
}
catch(Exception e){
}
}
%>
远程上传");
out.print("");
out.println("");
out.println("");
//DoRemote();
}
else if(sAction.equalsIgnoreCase("save"))
{
//显示上传菜单
out.println("");
out.println("");
out.println("文件上传");
out.println("");
out.println("");
out.println("body, a, table, div, span, td, th, input, select{font:9pt;font-family: \"宋体\", Verdana, Arial, Helvetica, sans-serif;}");
out.println("body {padding:0px;margin:0px}");
out.println("");
out.println("");
out.println("");
out.println("");
out.print("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
//存文件
//DoSave();
SmartUpload up = new SmartUpload();
//初始化上传组件
up.initialize(pageContext);
//设置上传文件大小
up.setMaxFileSize(nAllowSize*1024);
//设置上传文件类型
String setExt=sAllowExt.replace('|',',');
up.setAllowedFilesList(setExt);
// Upload
up.upload();
// Select each file
for (int i=0;i");
out.println("");
out.println("文件上传");
out.println("");
out.println("");
out.println("body, a, table, div, span, td, th, input, select{font:9pt;font-family: \"宋体\", Verdana, Arial, Helvetica, sans-serif;}");
out.println("body {padding:0px;margin:0px}");
out.println("");
out.println("");
out.println("");
out.println("");
out.print("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
//out.println("123");
}
%>
错误信息:
An error occurred at line: 22 in the jsp file: /upload.jsp
Generated servlet error:
Unhandled exception type DocumentException
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErro
rHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher
.java:328)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
不明白为什么????以前没有见过这种错误啊!!!!
|