Bug fix
This commit is contained in:
parent
35c755e842
commit
0cc2f253e3
1 changed files with 4 additions and 3 deletions
|
|
@ -78,6 +78,7 @@ public abstract class AjaxFileUpload extends HttpServlet {
|
||||||
public static String JAVASCRIPT = "";
|
public static String JAVASCRIPT = "";
|
||||||
|
|
||||||
public void init(ServletConfig config) throws ServletException {
|
public void init(ServletConfig config) throws ServletException {
|
||||||
|
super.init(config);
|
||||||
try {
|
try {
|
||||||
// Read the javascript file to memory
|
// Read the javascript file to memory
|
||||||
String path = JAVASCRIPT_FILE;
|
String path = JAVASCRIPT_FILE;
|
||||||
|
|
@ -207,10 +208,9 @@ public abstract class AjaxFileUpload extends HttpServlet {
|
||||||
}
|
}
|
||||||
// Process the upload
|
// Process the upload
|
||||||
listener.setStatus( Status.Processing );
|
listener.setStatus( Status.Processing );
|
||||||
handleUpload( fields, files );
|
doUpload( request, response, fields, files );
|
||||||
// Done
|
// Done
|
||||||
listener.setStatus( Status.Done );
|
listener.setStatus( Status.Done );
|
||||||
response.getWriter().print("<html>OK</html>");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
listener.setStatus(Status.Error);
|
listener.setStatus(Status.Error);
|
||||||
|
|
@ -231,5 +231,6 @@ public abstract class AjaxFileUpload extends HttpServlet {
|
||||||
/**
|
/**
|
||||||
* Handle the uppload
|
* Handle the uppload
|
||||||
*/
|
*/
|
||||||
public abstract void handleUpload(Map<String,String> fields, List<FileItem> files);
|
public abstract void doUpload(HttpServletRequest request, HttpServletResponse response,
|
||||||
|
Map<String,String> fields, List<FileItem> files);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue