CN104866313A - Universal method for uploading files in JSP - Google Patents

Universal method for uploading files in JSP Download PDF

Info

Publication number
CN104866313A
CN104866313A CN201510267136.3A CN201510267136A CN104866313A CN 104866313 A CN104866313 A CN 104866313A CN 201510267136 A CN201510267136 A CN 201510267136A CN 104866313 A CN104866313 A CN 104866313A
Authority
CN
China
Prior art keywords
jsp
uploadify
file
plug
uploading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510267136.3A
Other languages
Chinese (zh)
Inventor
齐兆勇
徐震宇
孙傲冰
季统凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201510267136.3A priority Critical patent/CN104866313A/en
Publication of CN104866313A publication Critical patent/CN104866313A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to the technical field of Java-based Web development, and in particular relates to a universal method for uploading files in JSP. According to the present invention, an upload plugin jQuery Uploadify is encapsulated such that the plugin is called where necessary, thereby implementing the file uploading function in JSP. The method supports concurrent uploading of a plurality of files, with a progress bar but no refresh display, and in addition, the upload speed is high. The method according to the present invention can be widely applicable to the technical field of Java-based Web development.

Description

A kind of method of general jsp upload file
Technical field
The present invention relates to Java language Web development technique field, be specifically related to a kind of method of general jsp upload file.
Background technology
Current website or system often can use files passe and user carries out alternately.Traditional files passe is uploaded by form list, and the distinct disadvantage of this method is exactly to upload a file at every turn, will operate repeatedly if will upload multiple file, upload progress is not had to show, and want refresh page, so very inconvenient, user experience is very poor.
Summary of the invention
The technical matters that the present invention solves is a kind of method providing general jsp upload file; Promote convenience and Consumer's Experience.
The technical scheme that the present invention solves the problem is:
Described method uploads plug-in unit Uploadify to JQuery to encapsulate, and the place being provided with files passe is called, and realizes the files passe function of jsp; Described method supports that multifile is uploaded simultaneously, and band progress bar is without refreshing display and uploading speed is fast.
Described method mainly comprises the following steps:
1st step, write the unified jsp template page uploadify.jsp for uploading;
2nd step, in template page uploadify.jsp, introduce the associated class library file of Uploadify plug-in unit: jquery-1.4.2.min.js, jquery.uploadify.v2.1.4.js, swfobject.js etc.;
3rd step, submission path, file directory, type, size to the upload file of Uploadify plug-in unit, whether support multiple document uploading, the correlation parameters such as quantity can be uploaded at every turn and modify;
4th step, encapsulation unified call interface, be put into template page uploadify.jsp in an Iframe, rewrite simultaneously to the correlation parameter of Uploadify plug-in unit;
5th step, write and receive the backstage java program of files passe file is preserved;
6th step, upload complete, destory is carried out with releasing memory to control.
The invention has the beneficial effects as follows: the files passe function being realized jsp by the encapsulation of JQuery being uploaded to plug-in unit Uploadify to have and support that multifile is uploaded simultaneously, band progress bar is without refreshing display and the advantage such as uploading speed is fast.Efficiently solve the drawback that traditional files passe mode is brought, be widely used in Java language Web development technique field.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is process flow diagram of the present invention.
Embodiment
As shown in Figure 1, the present invention realizes the files passe function of jsp by the encapsulation of JQuery being uploaded to plug-in unit Uploadify;
Concrete steps are as follows:
1st step, write the unified jsp template page uploadify.jsp for uploading;
2nd step, in template page uploadify.jsp, introduce the associated class library file of Uploadify plug-in unit: jquery-1.4.2.min.js, jquery.uploadify.v2.1.4.js, swfobject.js etc.;
3rd step, the correlation parameter of Uploadify plug-in unit to be modified, such as: submission path, file directory, type, the size of upload file, whether support multiple document uploading, can quantity etc. be uploaded at every turn
4th step, encapsulation unified call interface, be put into template page uploadify.jsp in an Iframe, rewrite simultaneously to the correlation parameter of Uploadify plug-in unit
5th step, write and receive the backstage java program of files passe file is preserved;
6th step, upload complete, destory is carried out with releasing memory to control.

Claims (2)

1. a method for general jsp upload file, is characterized in that: described method uploads plug-in unit Uploadify to JQuery to encapsulate, and the place being provided with files passe is called, and realizes the files passe function of jsp; Described method supports that multifile is uploaded simultaneously, and band progress bar is without refreshing display and uploading speed is fast.
2. the method for a kind of general jsp upload file according to claim 1, is characterized in that: described method mainly comprises the following steps:
1st step, write the unified jsp template page uploadify.jsp for uploading;
2nd step, in template page uploadify.jsp, introduce the associated class library file of Uploadify plug-in unit: jquery-1.4.2.min.js, jquery.uploadify.v2.1.4.js, swfobject.js etc.;
3rd step, submission path, file directory, type, size to the upload file of Uploadify plug-in unit, whether support multiple document uploading, the correlation parameters such as quantity can be uploaded at every turn and modify;
4th step, encapsulation unified call interface, be put into template page uploadify.jsp in an Iframe, rewrite simultaneously to the correlation parameter of Uploadify plug-in unit;
5th step, write and receive the backstage java program of files passe file is preserved;
6th step, upload complete, destory is carried out with releasing memory to control.
CN201510267136.3A 2015-05-22 2015-05-22 Universal method for uploading files in JSP Pending CN104866313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510267136.3A CN104866313A (en) 2015-05-22 2015-05-22 Universal method for uploading files in JSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510267136.3A CN104866313A (en) 2015-05-22 2015-05-22 Universal method for uploading files in JSP

Publications (1)

Publication Number Publication Date
CN104866313A true CN104866313A (en) 2015-08-26

Family

ID=53912164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510267136.3A Pending CN104866313A (en) 2015-05-22 2015-05-22 Universal method for uploading files in JSP

Country Status (1)

Country Link
CN (1) CN104866313A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180107A (en) * 2017-06-08 2017-09-19 山大鲁能信息科技有限公司 Mobile phone accessory under Ionic frameworks uploads the method and system of select file
CN109729120A (en) * 2017-10-30 2019-05-07 北京国双科技有限公司 The method and device that file uploads
CN109800392A (en) * 2019-01-11 2019-05-24 滨州建筑工程施工图审查中心 Digitize the Multifunctional graph paper method for uploading and device in check of drawings

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609526A (en) * 2012-02-13 2012-07-25 工购电子商务(上海)有限公司 Internet website content management system
US20130076797A1 (en) * 2011-09-26 2013-03-28 Zhaorong Hou Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same
US20130198606A1 (en) * 2012-01-30 2013-08-01 Microsoft Corporation Software application distribution in documents
CN103440139A (en) * 2013-09-11 2013-12-11 北京邮电大学 Acquisition method and tool facing microblog IDs (identitiesy) of mainstream microblog websites
CN104462491A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Image uploading method and system and corresponding server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130076797A1 (en) * 2011-09-26 2013-03-28 Zhaorong Hou Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same
US20130198606A1 (en) * 2012-01-30 2013-08-01 Microsoft Corporation Software application distribution in documents
CN102609526A (en) * 2012-02-13 2012-07-25 工购电子商务(上海)有限公司 Internet website content management system
CN103440139A (en) * 2013-09-11 2013-12-11 北京邮电大学 Acquisition method and tool facing microblog IDs (identitiesy) of mainstream microblog websites
CN104462491A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Image uploading method and system and corresponding server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴绍兴,李勇,明延堂: "《jQuery实战案例精粹》", 31 July 2014, 清华大学出版社 *
张星亮: "基于开源软件流媒体服务***的设计与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180107A (en) * 2017-06-08 2017-09-19 山大鲁能信息科技有限公司 Mobile phone accessory under Ionic frameworks uploads the method and system of select file
CN109729120A (en) * 2017-10-30 2019-05-07 北京国双科技有限公司 The method and device that file uploads
CN109800392A (en) * 2019-01-11 2019-05-24 滨州建筑工程施工图审查中心 Digitize the Multifunctional graph paper method for uploading and device in check of drawings

Similar Documents

Publication Publication Date Title
WO2017088509A1 (en) Page customization method and device
CN104426967B (en) Cross-platform and cross-equipment mobile application development system
CN110020353B (en) Method and device for constructing webpage form
CN103593196A (en) Page layout self-adaptation method and device
CN105630459A (en) Method for converting PPT document to HTML page
CN104426896A (en) Method and device for producing topic pages
CN105208442A (en) Video playing method of video playing application program and apparatus thereof
CN105553959A (en) Remote control method and system capable of dynamically generating intelligent device operation interface
CN104866313A (en) Universal method for uploading files in JSP
CN103974111B (en) By the method, apparatus of the data transfer on intelligent terminal to television terminal
CN103176802B (en) Realize the method that the user interface UI of system separates with widget library by control pond
CN102262539A (en) Implementation method for self-defined paging dataTable control based on struts2 technology
CN103064667A (en) Method for controlling hardware equipment based on JavaScript extension
CN104680421A (en) Scalable vector graphics (SVG) display method and device
CN104156222A (en) Method for self-defining Android equipment desktop
CN105204859A (en) Animation management method and system
CN105573967A (en) Multi-format file online browsing method and system
CN102591787A (en) Method and device for data processing of JAVA card
CN101398807A (en) Method and device for decompressing mobile terminal zip file
CN104166545A (en) Webpage resource sniffing method and device
CN103294463A (en) Editing system and method
CN103440123A (en) Method and device for setting individualized space on mobile terminal
CN105843631B (en) A method of improving system firmware burn writing speed
CN103744663A (en) Pre-caching technology based Android interface design frame model
CN103559280A (en) Method for flexibly storing and displaying icons

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150826

WD01 Invention patent application deemed withdrawn after publication