In addition to this document, of course, a page is needed to be searched locally on the page. This page does not say ... The following code is the form POST processing page of the above page, ie Action = "Operation.jsp". === ====== Operation.jsp ========= <% @ Page ContentType = "text / html; charset = GBK"%>
<% @ Page Import = "com.zoice.timeidle.phs.dbmsbean.core.dbmsusers,
Org.apache.commons.fileUpload.diskfileUpload,
Org.apache.commons.fileUpload.fileItem "%>
<%
String Opt_msg = Request.getParameter ("M");
IF ("POST" .Equalsignorecase (Request.getMethod () && request.getContentType (). StartSwith ("Multipart / Form-Data") {
DiskfileUpload Upload ();
Upload.setsizemax (1000000);
Upload.setsizetHold (65536);
Upload.setRepositoryPath ("/ tmp");
Java.util.list files = upload.parsequest (request);
FileItem FI = (FileItem) Files.get (0);
Java.io.LineNumberReader line_read = new java.io.LineNumberReader (new java.io.inputstreamReader (fi.getinputstream ()))
DBMSUSERS DBMS_USER = New dbmsusers ();
String str_tmp = line_read.read1 ();
String [] STR_LIST;
For (; str_tmp! = null; str_tmp = line_read.readline ()) {
Str_list = str_tmp.split ("['/"] *, [' / "] *");
DBMS.ExecuteUpdate ("INSERT INTO LUCK_CONTENT (ID, Content) VALUES ('" str_list [0] "" " STR_LIST [1] ") "); // DBMS yourself can define it. Or This is no longer repeatedly
}
}