mySmartUpload.upload();
String fn=mySmartUpload.getFiles().getFile(0).getFileName();
调用文件名时中文乱码,看了网上的解决方案找到SmartUpload.class修改upload()的内容如下:
String value = new String(m_binArray, m_startData, (m_endData - m_startData) + 1,"UTF-8");
我现在反编译修改好后,在NetBeans IDE 3.5.1编译,却报了一大堆错!也许对高手这个问题很简单,我实在不是很明白!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
private Files m_files;
^
classes/com/jspsmart/upload/SmartUpload.java [43:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
private Request m_formRequest;
^
classes/com/jspsmart/upload/SmartUpload.java [101:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [201:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [207:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [248:1] cannot resolve symbol
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
public Files getFiles()
^
classes/com/jspsmart/upload/SmartUpload.java [253:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
public Request getRequest()
^
classes/com/jspsmart/upload/SmartUpload.java [259:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [265:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [271:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [277:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [347:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SQLException, SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [685:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException
^
classes/com/jspsmart/upload/SmartUpload.java [59:1] cannot resolve symbol
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
m_files = new Files();
^
classes/com/jspsmart/upload/SmartUpload.java [60:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
m_formRequest = new Request();
^
classes/com/jspsmart/upload/SmartUpload.java [127:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to upload.");
^
classes/com/jspsmart/upload/SmartUpload.java [172:1] cannot resolve symbol
symbol : class File
location: package upload
com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
^
classes/com/jspsmart/upload/SmartUpload.java [172:1] cannot resolve symbol
symbol : class File
location: package upload
com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
^
classes/com/jspsmart/upload/SmartUpload.java [362:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to save file from the DataBase (1020).");
^
classes/com/jspsmart/upload/SmartUpload.java [705:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to upload.");
^
classes/com/jspsmart/upload/SmartUpload.java [719:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("The Form cannot be saved in the specified file (1030).");
^
21 errors
编译 SmartUpload. 时出错
String fn=mySmartUpload.getFiles().getFile(0).getFileName();
调用文件名时中文乱码,看了网上的解决方案找到SmartUpload.class修改upload()的内容如下:
String value = new String(m_binArray, m_startData, (m_endData - m_startData) + 1,"UTF-8");
我现在反编译修改好后,在NetBeans IDE 3.5.1编译,却报了一大堆错!也许对高手这个问题很简单,我实在不是很明白!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
private Files m_files;
^
classes/com/jspsmart/upload/SmartUpload.java [43:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
private Request m_formRequest;
^
classes/com/jspsmart/upload/SmartUpload.java [101:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [201:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [207:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [248:1] cannot resolve symbol
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
public Files getFiles()
^
classes/com/jspsmart/upload/SmartUpload.java [253:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
public Request getRequest()
^
classes/com/jspsmart/upload/SmartUpload.java [259:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [265:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [271:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [277:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [347:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SQLException, SmartUploadException, IOException, ServletException
^
classes/com/jspsmart/upload/SmartUpload.java [685:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throws SmartUploadException, IOException
^
classes/com/jspsmart/upload/SmartUpload.java [59:1] cannot resolve symbol
symbol : class Files
location: class com.jspsmart.upload.SmartUpload
m_files = new Files();
^
classes/com/jspsmart/upload/SmartUpload.java [60:1] cannot resolve symbol
symbol : class Request
location: class com.jspsmart.upload.SmartUpload
m_formRequest = new Request();
^
classes/com/jspsmart/upload/SmartUpload.java [127:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to upload.");
^
classes/com/jspsmart/upload/SmartUpload.java [172:1] cannot resolve symbol
symbol : class File
location: package upload
com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
^
classes/com/jspsmart/upload/SmartUpload.java [172:1] cannot resolve symbol
symbol : class File
location: package upload
com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
^
classes/com/jspsmart/upload/SmartUpload.java [362:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to save file from the DataBase (1020).");
^
classes/com/jspsmart/upload/SmartUpload.java [705:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("Unable to upload.");
^
classes/com/jspsmart/upload/SmartUpload.java [719:1] cannot resolve symbol
symbol : class SmartUploadException
location: class com.jspsmart.upload.SmartUpload
throw new SmartUploadException("The Form cannot be saved in the specified file (1030).");
^
21 errors
编译 SmartUpload. 时出错
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货