xinbei-Monitoring management-historical video retrieval = Add image download Path function

Source: Internet
Author: User

① in the Viewallplat project to create Class Filetool under Package Com.baosight.viewall.common, inherit applets, add the following method to the class:

/**     * @authorDongmingwang * @time 20150807 *@returnFilePath*/     PublicString Selectfilepath () {Try{Uimanager.setlookandfeel (Uimanager.getsystemlookandfeelclassname ()); JFileChooser JFC=NewJFileChooser ();            Jfc.setfileselectionmode (jfilechooser.directories_only); Jfc.showdialog (NULL, "select"); File File=Jfc.getselectedfile (); if(File! =NULL)                 returnFile.getabsolutepath (); }Catch(Exception e) {e.printstacktrace (); }                return"C:\\hisvideo"; }
Selectfilepath

② package This class into a Filetool.jar file placed under the applet path under Project WebContent
③ Add the following code to reference the applet in page zjsp02.jsp:

<id= "Filepathchoose"= "Com.baosight.viewall.common.FileTool"  codebase= "applet/"  archive= "Filetool.jar"  width= " 0 "  height=" 0 "></applet>
Filepathchoose

④ Add the following method to the file Zjsp02.js to call the above Java method

/** * @author    Dongmingwang * @time    20150804 * File path selection */function Selectfilepath () {    var filePath    = Filepat Hchoose.selectfilepath ();    $ (Id_txtpath). Val (FilePath);}
Selectfilepath

NOTICE: This method requires the client to have a JRE environment, and when it comes to security issues, it is necessary to sign authentication when playing the jar package of the applet.

xinbei-Monitoring management-historical video retrieval = Add image download Path function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.