Open local Folder using Applet Problem

Deal all,
This problem is a real torment to me. Why I could run the code by appletviewer. And I could open local folder. But I try to open one webpage including this applet code, I could not run the same function. Please tell me how should I solve it. It is a Applet Security problem? Even I change my web Server java.policy, it is still not workable. How should I verify java.policy when user run applet?
<<my code>>
==========================
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.lang.*;
import java.applet.*;
public class FileSelectApplet extends Applet{
     Button btn = new Button("Choice");
     File name;
     Label lb = new Label("Please Input File List");
     TextField enter = new TextField("c:\\", 20);
     TextArea output = new TextArea(20, 30);
     public void init() {
          resize(400, 400);
          setLayout(new BorderLayout());
          // Create one Panel with Label/TextField/Button
          Panel pl = new Panel();
          pl.add(lb);
          pl.add(enter);
          btn.addActionListener(new btnListener());
          pl.add(btn);
          add("North", pl);
          add("Center", output);          
     class btnListener implements ActionListener {
          public void actionPerformed(ActionEvent e) {
               if (e.getActionCommand() == "Choice") {
                    output.setText(enter.getText());
                    name = new File(enter.getText());
                    if (name.exists()) {                         
                         output.append(
                                             name.getName() + " exists\n" +
                                             (name.isFile() ? "is a file\n" :
                                                                 "is not a file\n") +
                                             (name.isDirectory() ? "is a directory\n" :
                                                                           "is not a directory\n") +
                                             (name.isAbsolute() ? "is absolute path\n" :
                                                                      "is not absolute path\n") +
                                             "Last modified: " + name.lastModified() +
                                             "\nLength: " + name.length() +
                                             "\nPath: " + name.getPath() +
                                             "\nAbsolute path: " + name.getAbsolutePath() +
                                             "\nParent: " + name.getParent());
                         if (name.isFile()) {
                              try {
                                   RandomAccessFile r = new RandomAccessFile(name, "r");
                                   output.append("\n\n");
                                   do {
                                        output.append(r.readLine() + "\n");
                                   } while (r.getFilePointer() < r.length());
                              catch (IOException ioe) {
                              } // end of try
                         else if (name.isDirectory()) {
                              String dir[] = name.list();
                              output.append("\n\nDirectory contents:\n");
                              for (int i = 0; i < dir.length; i++)
                                   output.append(dir[i] + "\n");
                         } // end of (name.isFile())                         
                    else {
                              output.append(enter.getText() + "does not exists\n");
                              //output.appendText(enter.paramString() + "does not exists\n");
                    } // end of (name.exists())                    
               } // end of if                    
          } // end of actionPerformed
     } // end of btnListener     
==========================

Yes, that is security problem.
Apllet can't get access to any local resource.
To solve that problem you must sign applet or edit "local" policy file.

Similar Messages

  • How can I open a local folder using flash builder or AS3?

    I need to open a local folder get the zip file and unzip it.
    I know that i cannot open a folder using flash builder, i did it using air app. now i do not know how do i integrate it with my flex program.
    Please help me with this issue.
    Thanks

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script source="Asset/folder.as" />
    <mx:Button x="10" y="10" label="My Button" width="122" height="31" id="myButton" click="folder()"/>
    <mx:ComboBox x="10" y="49" id="cbobx" dataProvider="{}"  ></mx:ComboBox>
    </mx:Application>
    and .as code is:
    // ActionScript file
    import flash.display.*;
    import flash.events.*;
    import flash.net.FileFilter;
    import flash.net.FileReference;
    import flash.net.FileReferenceList;
    import mx.controls.Alert;
    import mx.controls.ComboBox;
    private var fr:FileReferenceList;
    private var cmbobx:ComboBox = new ComboBox();
        private function folder():void
    fr = new FileReferenceList();
    fr.browse([new FileFilter("Zip Files", "*.zip")]);
    fr.addEventListener(Event.SELECT, listZipFiles);
    private function listZipFiles(e:Event):void
    Alert.show("selectHandler: " + fr.fileList.length + " files");
            var fls:Array = new Array();
            var file:FileReference;
            for (var i:uint = 0; i < fr.fileList.length; i++)
                file = FileReference(fr.fileList[i]);
                //Alert.show("File Name: " + fr.fileList[i]);
                Alert.show("File Name: " + file.name);
                fls.push(file);
                cmbobx.selectedItem = fls;
    private function getShpFiles(event:MouseEvent):void

  • Can i open a file using applet?

    Hi,
    I try to open a file using applet.. but an error said "access denied(java.io.FilePermission tempecg.out, read) ...."
    tempecg.out is the file that I want to read.. below is part of my code.. what should I do...?
    currently the file is in my harddisk, next time will be linked using URL, will this be another problem?
    thanks!
    public void run()
    while (true)
    try
    LineNumberReader lr = new LineNumberReader(new FileReader("tempecg.out"));
    while (dv.size() < 240)
    int p = Integer.parseInt(lr.readLine().toString());
    //int p = (int)(Math.random() * 260);
    dv.add(new Point(0,p-130));
    Thread.sleep(2000);
    } catch (InterruptedException e) {}
    catch (IOException e) {}

    Hi pjustin1,
    you must use the policytool.exe given with JDK 1.2.x (or more).
    and with this tool you must add a permission on file (FilePermission) you want to access.
    Christophe.

  • Open local file using fileReference in AIR

    I just started to build an AIR application and am facing a
    very basic problem. I need a File->Open menu that pops up a file
    open dialog and returns the location (including folder) of a file
    to edit.
    - I tried the fileReference.browse() but this does not seem
    to provide the full path to the file
    - I tried fileReferenceList.browse() but the SELECT event
    does not fire on my Mac under (seem to be a bug reported last
    October:
    http://bugs.adobe.com/jira/browse/SDK-13220)
    Now, how can I achieve this in AIR? I assume opening local
    file is a pretty standard operation for desktop application, any
    suggestion/tip?
    thanks
    *P

    You don't want to use FileReference in AIR for what you are
    doing. Check the documentation for the mx.controls.FileSystemTree.
    There are actually a handful of AIR-specific controls for accessing
    the file system. There isn't a "File Open" dialog per se; you can
    build your own out of the controls given. I will say that the
    controls will have the flavor of the OS (so on a Mac the controls
    will behave similarly to the way a Mac accessses and browses for
    files).

  • Move email from Inbox to Local Folder using Message Filter moves header only, not contents.

    I created a Message Filter to move email from Inbox to a Local Folder based on Date. The email headers were moved, but not the contents. Since I'm using IMAP, all the emails were deleted from the server.
    I searched for similar problems and I followed one suggestion to "repair" one of the target Local Folders, but that made things worse. Now the header information (Subject, From, Date (now set to the date the transfer was done, not the email received date) is all blank.
    The Local Folder properties indicate the email is contained in
    mailbox:///C:/Users/Ted/AppData/Roaming/Thunderbird/Profiles/c65xcqqf.default/Mail/Local Folders/Archives.sbd/2010
    I can see the messages from other Local Folders here, but the ones "moved" are empty.
    Should this location be changed?
    Is there some way to recover the email contents?
    The info below is from the troubleshooting information tool:
    Application Basics
    Name: Thunderbird
    Version: 31.5.0
    User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
    Profile Folder: Show Folder
    (Local drive)
    Application Build ID: 20150222233048
    Enabled Plugins: about:plugins
    Build Configuration: about:buildconfig
    Memory Use: about:memory
    Mail and News Accounts
    account2:
    INCOMING: account2, , (none) Local Folders, plain, passwordCleartext
    account5:
    INCOMING: account5, , (imap) imap.googlemail.com:993, SSL, passwordCleartext
    OUTGOING: smtp.googlemail.com:465, SSL, passwordCleartext, true
    account6:
    INCOMING: account6, , (imap) imap-mail.outlook.com:993, SSL, passwordCleartext
    OUTGOING: smtp-mail.outlook.com:587, alwaysSTARTTLS, passwordCleartext, true
    account7:
    INCOMING: account7, , (imap) imap.comcast.net:993, SSL, passwordCleartext
    OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
    account8:
    INCOMING: account8, , (imap) imap.comcast.net:993, SSL, passwordCleartext
    OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
    account9:
    INCOMING: account9, , (imap) imap.comcast.net:993, SSL, passwordCleartext
    OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
    Crash Reports
    Extensions
    Lightning, 3.3.3, true, {e2fda1a4-762b-4020-b5ad-a41df1933103}
    Manually sort folders, 1.1, true, [email protected]
    Important Modified Preferences
    Name: Value
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size_cached_value: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    extensions.lastAppVersion: 31.5.0
    font.internaluseonly.changed: true
    font.minimum-size.x-western: 10
    font.name.monospace.el: Consolas
    font.name.monospace.tr: Consolas
    font.name.monospace.x-baltic: Consolas
    font.name.monospace.x-central-euro: Consolas
    font.name.monospace.x-cyrillic: Consolas
    font.name.monospace.x-unicode: Consolas
    font.name.monospace.x-western: Consolas
    font.name.sans-serif.el: Calibri
    font.name.sans-serif.tr: Calibri
    font.name.sans-serif.x-baltic: Calibri
    font.name.sans-serif.x-central-euro: Calibri
    font.name.sans-serif.x-cyrillic: Calibri
    font.name.sans-serif.x-unicode: Calibri
    font.name.sans-serif.x-western: Calibri
    font.name.serif.el: Cambria
    font.name.serif.tr: Cambria
    font.name.serif.x-baltic: Cambria
    font.name.serif.x-central-euro: Cambria
    font.name.serif.x-cyrillic: Cambria
    font.name.serif.x-unicode: Cambria
    font.name.serif.x-western: Cambria
    font.size.fixed.el: 14
    font.size.fixed.tr: 14
    font.size.fixed.x-baltic: 14
    font.size.fixed.x-central-euro: 14
    font.size.fixed.x-cyrillic: 14
    font.size.fixed.x-unicode: 14
    font.size.fixed.x-western: 14
    font.size.variable.el: 17
    font.size.variable.tr: 17
    font.size.variable.x-baltic: 17
    font.size.variable.x-central-euro: 17
    font.size.variable.x-cyrillic: 17
    font.size.variable.x-unicode: 17
    gfx.direct3d.last_used_feature_level_idx: 0
    mail.openMessageBehavior.version: 1
    mail.winsearch.enable: true
    mail.winsearch.firstRunDone: true
    mail.winsearch.global_reindex_time: 1387144538
    mailnews.database.global.datastore.id: 11ee7f66-9920-4f7d-9c5e-a83d079bc6e
    mailnews.database.global.views.conversation.columns: {"threadCol":{"visible":true,"ordinal":"1"},"flaggedCol":{"visible":true,"ordinal":"3"},"attachmentCol":{"visible":false…
    mailnews.database.global.views.global.columns: {"threadCol":{"visible":true,"ordinal":"1"},"flaggedCol":{"visible":true,"ordinal":"3"},"attachmentCol":{"visible":false…
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1424815462
    places.history.expiration.transient_current_max_pages: 104858
    plugin.importedState: true
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_bgcolor: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_bgimages: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_colorspace:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_command:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_downloadfonts: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_duplex: 1515870810
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_bottom: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_left: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_right: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_top: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_evenpages: true
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footercenter:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footerleft: &PT
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footerright: &D
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headercenter:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headerleft: &T
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headerright: &U
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_in_color: true
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_bottom: 0.5
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_left: 0.5
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_right: 0.5
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_top: 0.5
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_oddpages: true
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_orientation: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_page_delay: 50
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_data: 1
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_height: 11.00
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_name:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_size_type: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_size_unit: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_width: 8.50
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_plex_name:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_resolution: 1515870810
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_resolution_name:
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_reversed: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_scaling: 1.00
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_shrink_to_fit: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_to_file: false
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_bottom: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_left: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_right: 0
    print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_top: 0
    security.disable_button.openCertManager: false
    Graphics
    Adapter Description: Intel(R) HD Graphics 4600
    Vendor ID: 0x8086
    Device ID: 0x0416
    Adapter RAM: Unknown
    Adapter Drivers: igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32
    Driver Version: 10.18.10.3379
    Driver Date: 12-18-2013
    Direct2D Enabled: true
    DirectWrite Enabled: true (6.3.9600.17111)
    ClearType Parameters: ClearType parameters not found
    WebGL Renderer: false
    GPU Accelerated Windows: 2/2 Direct3D 10
    AzureCanvasBackend: direct2d
    AzureSkiaAccelerated: 0
    AzureFallbackCanvasBackend: cairo
    AzureContentBackend: direct2d
    JavaScript
    Incremental GC: 1
    Accessibility
    Activated: 0
    Prevent Accessibility: 0
    Library Versions
    Expected minimum version
    Version in use
    NSPR
    4.10.6
    4.10.6
    NSS
    3.16.2.3 Basic ECC
    3.16.2.3 Basic ECC
    NSS Util
    3.16.2.3
    3.16.2.3
    NSS SSL
    3.16.2.3 Basic ECC
    3.16.2.3 Basic ECC
    NSS S/MIME
    3.16.2.3 Basic ECC
    3.16.2.3 Basic ECC

    Fixed the Trouble Shooting information in previous post.

  • How to open a folder using Actionscript 3.0

    Hi,
    I have been trying for about a day to get this to work, but nothing seems to, so i'm finally going to ask.
    So far, code wise, i have this:
         open_btn.addEventListener(MouseEvent.CLICK, OpenButtonHandler);
         function OpenButtonHandler(event:MouseEvent):void
    From there, what code gets flash to literally open up a folder such as My Documents? The end use of this code will be for a CD, whereby the flash .exe file will call up folders from the disc through clicking buttons. Also, please make me awear of under what situations the code may not work. At the moment, i am writting the .exe file to the desktop, and trying to open a folder on my desktop through the application.
    Often times, everything i have tried so far, either causes Syntax Errors or no errors, but just doesn't work.
    Thanks,
    Ricky
    EDIT:
    Primarily in Windows, but if you know the Mac way too, that could be useful.

    Is there no way to get buttons to open up explorer folders specified? It seems people are managing it somehow, but i can't do it. Others aprantly can do it using this code:
         on(release){
          getURL("flash",_black);
    , but that's actionscript 2, not 3 which i am using. Surely actionscript 3 can do this and possibly even better seeing as it is a higher version?
    I also found another bit of code that was like this:
         fscommand("exec","explorer\dirname");
    ,but again that didnt work. However, in another way it did because flash reported no errors when it was run, but nothing happened when the button was clicked.
    The only other thing i tried was this:
         var request:URLRequest=new URLRequest("C:\\");
        navigateToURL(request);
    The problem with that was that it tried to open the internet as expected unfortinatly, not windows explorer to open the folder C:\\.
    Directing users to the appropiate locations on the disk wasn't really what i needed thanks for the suggestion though.
    EDIT:
    That last idea worked, sorry, but it opened in the default web-browser instead of using explorer, so i'm half way there. Is it possible to tell it what application to use to open the directory, so that way i can specify explorer?

  • I had my websites set up in iWeb on macbook.  just purchased a new MacBook Pro, downloaded iweb09, and transferred all my iWeb content.  I publish to local folder using filesilla.  why don't i see my updates on site?

    I recently purchased a macbook pro with osx 10.8.3.  my websites are set up using iweb.  i downloaded iweb 09 and transfered my files to iweb, published to local folder, filezilla seems to be working fine, but when i visit my site there are no changes.  when i view published site the changes are there.  what is the problem?  can someone please help

    If the files are in the right location on the server and you are sure they are replaced, then the only thing left to do is to clear the browser cache and reload the page.
    Standard procedure.

  • File open menu will not open local files using open command but the same files will open if I double click them (permissions seem fine)

    Under File menu Open File will not open local files even those downloaded to the desktop by Firefox 5.
    If I double click on HTML file it does open
    Reinstalled. Same behaviour. Default Browser set correctly.
    Permissions set correctly. Odd behaviour.

    Are you sure it hasn't imported?
    Check for the track names (trackname only, not Album or Artist)) and see if they have a blank Artist and Album, because WAV files have no MetaData, so are kind of stupid as far as knowing anything about the Artist, Album & track id.
    You can't search by 'Untitled' either as there is literally, no name at all, but iTunes does pick up the actual physical track name in Finder and uses that. As an example, if you renamed your Aerosmith WAV file from say 'Toys In The Attic' to 'Love Song' it would import the track as 'Love Song' as that's all it can go by.
    There are a few iTunes AppleScripts that let you import from a file of WAV music, by looking at the enclosing Album in the enclosing Artist as that's how most PC progs create the WAV file structure.
    Mike

  • Opening a folder using a button?

    Can anybody tell me if it is possible to to create an interactive button that will allow you to open a folder view in Windows Explorer?
    I would like to make it easy for my Client to be able open a folder view that they can then populate with their own documents.
    Any suggestions would be much appreciated.

    Thanks for your reply.
    Unfortunately due to a recent security patch this no longer works and you receive a message saying,
    "This file is set to be launched by this PDF file. This is currently disallowed by your system administrator"
    This link explains it I think http://news.softpedia.com/news/Adobe-Finally-Fixes-Launch-Bug-145757.shtml
    I suspect this is because ultimately Windows Explorer is an executable.

  • Problem opening a browser using applet

    I am trying to open a browser window with the following applet. The applet executes fine with no exception and even prints out the debug statement "Browser Opened" I put, but does not actually open the browser. I am using 1.3.1_05 version of plugin and using Appletviewer. Any suggestions?
    package com.info.applet;
    import java.awt.Container;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.net.URL;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    public class TestApplet extends JApplet implements ActionListener {
         public void init() {
              Container cont = getContentPane();          
              JButton b = new JButton("Open Browser");
              cont.add(b);          
              b.addActionListener(this);
         public void actionPerformed(ActionEvent ae) {
              try {
                   getAppletContext().showDocument(new URL("http://www.cnn.com"));
                   System.out.println("Browser Opened" );
              } catch (Exception e) {
                   System.out.println("" + e);
    TestApplet.html
    ======================================================
    <html>
    <body>
    <applet code=com.info.applet.TestApplet.class width="200" height="200" >
    </applet>
    </body>
    </html>

    Hi
    I am doing the same, but using java script to open a new browser window here is the code i am using
    in Applet
    package com.info.applet;
    // import jar file to access javascript object from applet
    import netscape.javascript.*;
    import java.awt.Container;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.net.URL;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    public class TestApplet extends JApplet implements ActionListener {
    public void init() {
    Container cont = getContentPane();
    JButton b = new JButton("Open Browser");
    cont.add(b);
    b.addActionListener(this);
    public void actionPerformed(ActionEvent ae) {
    try {
    JSObject win = (JSObject) JSObject.getWindow(this);
    win.eval("javascript:openWindow(\'"www.cnn.com"\')");
    System.out.println("Browser Opened" );
    } catch (Exception e) {
    System.out.println("" + e);
    in HTML
    TestApplet.html
    ======================================================
    <html>
    <head>
    function openWindow(url)
    window.open(url, 'mywindow');
    </head>
    <body>
    <applet code=com.info.applet.TestApplet.class width="200" height="200" >
    </applet>
    </body>
    </html>

  • Searching CD folder using Applet

    Hi guys,
    the goal is to write a simple search engine that will search a folder on CD which will be containing html and pdf files.
    the GUI for this search tool should be an html page with a text box and search button.
    when i hit search the code should search all files within CD folder and return pages that contains the word entered in text box.
    can we implement this using an Applet ?
    if yes will the applet be able to pass text box word to my java program (probably using parameters) ?
    the important thing : i need to display results as links on the same html page .is this possible?
    please i need your advice on the best way to implement this ?
    Many thanks.

    Yes, that is security problem.
    Apllet can't get access to any local resource.
    To solve that problem you must sign applet or edit "local" policy file.

  • Unable to open local file using af:goLink and anchor link in JSF page.

    Hi,
    I want to open a file at a perticular location on client machine. I am using af:goLink to openg the file. But when i tried to click on the link it is not opening the file. If i give any other value like name of other site, it opens the link. It is not giving any exception also. I tried by puting notmal HTML anchor link. That is also not working. But if i put this anchor link in normal HTML page, it works.
    Following is the JSPX page that i have created. Here c:\dmmsi.log is a temp file on my local system.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document title="File Upload">
    <af:form usesUpload="true">
    File Uploader Test
    <af:inputFile label="Input File" autoSubmit="true"/>
    <af:spacer height="20" width="50"/>
    <af:goLink targetFrame="_new" destination="file:///c:/dmmsi.log" text="Test"/>
    <af:spacer height="20" width="50"/>
    <!--a id="you" href="c:\dmmsi.log" target="_new">Open File</a-->
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    HTML Page i tried using anchor link
    <html>
    <body>
    <form>
    Please specify a file from your local machine</b>
    <input name="file" type="file" onblur="document.forms[0].hello.value = document.forms[0].file.value; document.getElementById('you').innerHTML =document.forms[0].file.value; document.getElementById('you').href = 'file://'+document.forms[0].file.value;">
    <br><br>
    <input type="text" name="hello" value="">
    <br><br>
    <!-- a id="you" href="c:\dmmsi.log" target="_new">Click Me to Open file< / a -->
    </form>
    </body>
    </html>
    (Note: Please remove the comments that i have added in creating anchor link. I was facing some issue in putting my code in this editor. It was creating the HTML link when i see the preview.)
    I hope you will be able to reproduce my problem.
    Sujay

    What version of IE are you using? IIRC, IE 7 is supposed to prompt you. ("The web site is attempting to open a page in your Trusted Zone. This can let hax0rs pwnz0r you. Continue?" or something to that effect.)
    If you use the verbatim tags, do you get an actual error message? That might help diagnose the problem.

  • Edit locally option using Applet not working

    Hi ,
    We do not want to use Activex control for editing a document locally,
    so we are left with Applet option.
    The steps we have followed for using the Applet:
    1) Configuration -- Content Management -- Utilities -- Editing ,
    Active component : Applet, Java Runtime version : 1.4
    2) We have followed the note : 594980 but could find the
    htmlb.properties file at the path specified in the note, so we searched
    for it in our portal, we could find htmlb.properties file in the below
    mentioned path:
    /usr/sap/xxx/JC00/J2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.sap.portal.htmlb/lib/htmlb.properties
    we have given codebaseV14 as
    http://java.sun.com/products/plugin/autodl/jinstall-1_4_1-windows-
    i586.cab#version=1,4,1,0 and restarted the server. We got operation
    failed error.
    Please let us know if we are missing some step in between.
    Thanks
    Som

    Hi Karol,
    Yes, it worked fine.
    Here are the steps you need to follow:
    1) Install JRE 1.4 on the client PC where you want to edit the document locally
    2) Follow the OSS note # 879494
    You are also set to edit a document locally..
    let me know if it works..
    Som

  • Opening local files using a URLRequest

    is it possible to open a file from say C drive when your flash file is in C:\somefolder?

    I suppose if it's in the same folder as the requesting swf you can, but after that you're likely to run into sandbox security issues that you would have to deal with. Here's a fuller discussion of what's happening in Flash 10, which opens some possibilities:
    http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-playe r-10/

  • Establish socket connection with local pc using Applet

    Hi,
    I want to write an applet embedded in my web application.
    When I access the web application from my PC which is connected to a RFID reader, I need the applet to make a socket connection to the attached RFID reader.
    Is this allow?
    If not, what do I need to make this possible for applet?
    Please advise.
    Thank you.

    HI Helen,
    Just to check.
    He is on XP ?
    He is using AIM 5.9 ?
    He has Tuned the camera and Mic to the App ?
    If he is at Service Pack 2 he has enabled the app through the XP firewall ?
    You have the MAc firewall Off.
    The ports are enabled in your modem.
    Either using UPnP or these actual ports
    5060, 5190, 5678, 16384-16403 for just the AIM stuff.
    Have you changed the Quicktime setting to match your download speed ?
    Can you and he get any of the people or test accounts o this page ?
    http://www.ralphjohnsuk.dsl.pipex.com/ContactTesters.html
    2:34 PM Saturday; April 8, 2006

Maybe you are looking for

  • Installing Acrobat on a machine running both Mac OS and Windows OS

    I have a new MacAir (Mountain Lion OS) and that will also have Windows 7 installed (via Parallels software).  I want to install Adobe Acrobat XI (Standard preferably, or Pro if required) so that I can print to a PDF from any application, whether in e

  • Exporting a pdf by echosign

    I have tried repeatively to export a filled out form that was sent to me, to fill out and send back to the sender through echosign. I fill it out but I can not save the information that I placed in the form.  It sends the form, but it sends a blank f

  • Network Card for PowerBook G3

    Hello everyone, I have an older laptop and I have been told that I can only access the Internet with dialup because the computer does not have a network card. Is there one available for the PowerBook G3. Better yet, can I get a wireless card? Thank y

  • Slightly off topic --- should i give transfer to my company

    Hey every1...i need some suggestions from u people.... I work in here in riyadh (Saudia Arabia)....during the interview process for the company where i am working ryt now..... i was told that as an oracle guy u will be dealing with transfer of compan

  • Check box in basic list

    Hi frieds, I wants to display a list of record in basic list and also one chek box for every record. Then based on selected check box i want to cancel that record in database means i want to set it's flag. also in application toolbar of basic list di