Jspsmartupload (1)
I. Installation
Jspsmartupload is a free-of-charge, full-featured file upload and download component developed by the [url] www.jspsmart.com [/url] website. It is suitable for embedding JSP files for uploading and downloading operations. This component has the following features:
1. Easy to use. Only three or five lines of Java are written in the JSP file.CodeYou can easily upload or download files.
2. Full upload control. The objects provided by the jspsmartupload component and their operation methods can be used to obtain information about all uploaded files (including file names, sizes, types, extensions, and file data) for easy access.
3. restrict the size and type of uploaded files. This filters out non-conforming files.
4. Flexible download. Only two lines of code can be written to convert the Web server into a file server. You can use jspsmartupload to download files in the web server directory or any other directory.
5. You can upload files to the database or download data from the database. This function is intended for MySQL databases, because it is not universal, so this article does not prepare examples to introduce this usage.
The jspsmartupload component can be freely downloaded from the [url] www.jspsmart.com [/url.pdf website. The name of the compressed package is jspsmartupload.zip. After the download, use WinZip or WinRAR to decompress it to the webapps directory of Tomcat (this article takes the Tomcat server as an example ). After decompression, change the web-INF name in the subdirectory under the webapps/jspsmartupload directory to a fully capitalized WEB-INF so that the jspsmartupload class can be used. Because Tomcat is case sensitive to file names, it requires Web ApplicationsProgramThe Directory of the related class is WEB-INF and must be in uppercase. Restart tomcat to use the jspsmartupload component in the JSP file.
Note: After installation as described above, only programs under the webapps/jspsmartupload directory can use the jspsmartupload component. To make all web applications of the Tomcat server use the jspsmartupload component, you must do the following:
1. Go to the command line status and switch the directory to the Tomcat webapps/jspsmartupload/WEB-INF directory.
2. Run the jar packaging command: jar CVF jspsmartupload. Jar com
You just need to change the keystore name to the jspsmartupload. jar file .)
3. Copy jspsmartupload. jar to the shared/lib directory of Tomcat.