1, StringBuffer The Append method has the error
Cause analysis: Is the default JRE system library for project and the configured JRE mismatch.
Workaround: Project Properties->add libray->jre System library->alternate JRE (select Sun JDK 1.6.0_13)
2, File Upload problem
Mysmartupload.setallowedfileslist ("txt"); Set upload file type can only be txt format
File upload Process
- jsp file:
<div id= " input " Align=" center " Style=" width:900px; " > <p>please file <input type= file " Name=" uploadfile " Id=" file " > &NBSP; </div>
- servlet file:
PrintWriter out=Response.getwriter (); String Wrongmessage= "Success!"; Smartupload Mysmartupload=Newsmartupload (); Mysmartupload.initialize (config, request, response); Mysmartupload.setmaxfilesize (1024*2048); //mysmartupload.setallowedfileslist ("txt"); //Bebug intj = 0; Try{mysmartupload.upload (); for(inti = 0; I < Mysmartupload.getfiles (). GetCount (); i++) { ++J; Com.jspsmart.upload.File File=mysmartupload.getfiles (). GetFile (i); if(File.ismissing ())Continue; } }Catch(Exception err) {wrongmessage= "Error in upload" + err.getmessage () + "File:" +j+ "on line 251"; //out.println ("Error in Upload" +err.getmessage ()); //Allright=false; //return;} out.print (Wrongmessage+ "num:" +j); }
3, prompt error, serialversionuid conflict.
class class Serialversionuid = 8915824483106432775
Serialversionuid Detailed Description: http://www.cnblogs.com/guanghuiqq/archive/2012/07/18/2597036.html
Workaround:
If you don't want to define it, you can also turn it off in Eclipse settings as follows:
Window ==> Preferences ==> Java ==> Compiler ==> error/warnings ==>potential Programming problems
Change the warning of the serializable class without serialversionuid to ignore.
2014-09-20
This content complies with CC3.0 Copyright Agreement, reprint Please specify: Turn self-study and excellent, think then pass
This article link address: Web server (protein protection) problems encountered during the construction process
Problems encountered during Web server (protein protection) Setup