Java script in HTMLDB to check if file exists in Unix file system

How do I use javascript to check if file is exists in Unix file system. I would like to dispaly the columns only if file is exists.

Hello,
This is one of those features that the manuals do not cover.
How to use and build AJAX features could be a whole book all by itself, and it's not really HTML DB specific feature even though we have built some hooks in application and javascript to make it easier.
Take a look at this thread
Netflix: Nice UI ideas
and I've built some examples here
http://htmldb.oracle.com/pls/otn/f?p=11933:11
Or just search the forums for AJAX or XMLHTTP
Carl

Similar Messages

  • How to upload pdf file format in unix file directory?

    how to upload pdf file format in unix file directory?

    Hi Karthikeyan,
    If you have PDF internal table with you, You can follow the below method to upload into Unix directory.
        DATA:file_path TYPE char100 VALUE '/usr/sap/tmp/rep_out.PDF'.
        OPEN DATASET file_path FOR OUTPUT IN BINARY MODE.
        IF sy-subrc EQ 0.
          LOOP AT it_pdf.
            TRANSFER it_pdf TO file_path.
          ENDLOOP.
        ENDIF.
        CLOSE DATASET file_path.
    Thanks
    Venkat.O

  • File.exists() vs. File.getAbsoluteFile().exists()

    Is there a well known cause for File.exists() to have a different return value from File.getAbsoluteFile().exists()?
    This thread: http://forum.java.sun.com/thread.jspa?threadID=428403&messageID=2595075 says that this can be the result if you attempt to change your current working directory, but as far as I can tell I don't do anything like that, no System.setProperties or anything. I am running from JUnit, but it doesn't seem like that would make a difference. Any ideas of what I should look for?
    Thanks!

    Thanks for your reply. I have looked through the API, and I understand the difference between relative and absolute path if that's the difference you mean. My (incorrect, apparently) assumption was that relativeFile.exists() would always refer to the same location as relativeFile.getAbsoluteFile().exists()-- That is, at one point or another, you more or less concatenate the working directory and the relative path before checking to see if that exists
    I'm sorry I cannot post any example code because I don't know what could cause this situation. I was hoping for a general possible cause or two that might give me an idea where to look in my application

  • File permission in unix - file is created by File Adapter

    I've created a composite that creates an output file in unix server. Problem that I have is the file permission. When file is created it has a permission like below even though this directory is widely open - chmod 777.
    -rw-r----- 1 oracle dba 1123 May 4 17:30 Item_18.xml
    How can I configure this so that when file is created by SOA composite it can share with others. As you see third group doesn't even have "read" permission.
    Edited by: user613835 on May 5, 2011 9:09 AM

    Hi,
    That means at os level it using umask value of 002 ...where as when you create it from ABAP it is using umask of 022.
    Is the owner for both the files are sidadm only?
    Thanks.

  • Font Files Changed to Unix Files

    Hello all. I had backed up my fonts to an external drive. Recently my iMac's HD crashed and when I tried to reinstall my fonts, I noticed they are all Unix files with zero bytes! I can't get them to open, I tried adding the extensions they were before but nothing works. Any ideas? And how coudl this happen?
    Thanks;
    Henry

    The real font information is stored in a resource fork, not the data fork fo the file.  Depending type type of file system you copied them to, how you copied them, and what method you are using to look at them, you may not be seeing the resource fork.
    You can see more detail about files usng a Terminal command such as
    ls -leaO@ file
    If there is a resource fork, it will be displayed.
    If the file system was not a Mac OS X external file system, then you might want to look for a file with a similar name only starting with a leading period to make it invisible to the Finder
    ls -leaO@ /the/directory/with/your/fonts

  • Call shell scripts from htmldb

    Hi,
    I've a requirement to check for the existance of a file in Linux server using htmldb. The problem is html db is installed on a different machine. Is there any way I could execute shell scripts in html db that connects to the linux server and checks for the file existance?

    Andy,
    The general answer is: whatever you can do from SQL or PL/SQL can be run from an HTML DB process. So to output to the server you might use utl_file. There are several ways to run external commands, you might start by searching for 'shell' on askTom.
    Scott

  • Apex Java Script

    I want to do a search by empid in emp table.
    If no return row, I want to pop up a message for user to select Yes or No.
    If user select No, stay at current page.
    If user selects Yes, then I should carry this empid to another page to create this empid.
    How can do this in Java Script?
    How to check if no row return?
    How to carry this empid to another page by Java Script?
    Where should I control which page to go?
    Thank you.
    Edited by: user628655 on Oct 9, 2009 7:50 AM

    For your first questions;
    You can use Ajax to call an application process to validate if you get null rows or not. There are several examples on this forum. You can also look at something like [Carl's Apex|http://carlback.blogspot.com/2008/03/new-stuff-1.html]
    With respect to How to carry this empid to another page by Java Script?
    Where should I control which page to go?
    Once you know if the value is not null, submit a request using doSubmit and then have conditional processes on the page to decide where to go and what values to pass.
    Cheers
    Kofi
    Edited by: Kofi on Oct 9, 2009 8:12 AM

  • Check if a file exists in network dir (JS)

    I've found an old post that has pointed me at:
    if (myFile.exists){
    alert("File Exists");
    else
    alert("File doesn't exist");
    The problem is that when I use the path  macname/volumes/dir/folder/folder/file.indd (which was created from variables) as myFile the script doesn't find a file that I know exists. All I get is the "File doesn't exist" alert.
    Do I need to define myFile as being a string?
    I'm still fumbling my way around JS, and converting Applescripts to JS to work cross-platform. Thanks in advance....

    To get the path to a file i normally use this little script:
    // JavaScript Document
    var myFile = File.openDialog("Choose a File");
    if((myFile != "")&&(myFile != null)){
        alert("Path: " + myFile + "\nType: " + myFile.type);
    Perhaps this c/p can help you:
    function mounter() {
        var myDocument = app.activeDocument;
        // we are saving the preview
        var destination = "/Volumes/myfoldername";
        //var destination = "/Users/tn/Documents/Tryksager/Design/";
        var volume = "afp://sub.dn.com/myfoldername";
        try {
            with (myDocument) {
                if(file_name = get_filename(name)) {
                        if (Folder(destination).exists) {
                        //alert("Folder exists: " + Folder(destination));
                        } else {
                        if (confirm ("Mount volume?", false, "Mount volume")) {
                            mount_volume();
                            // volume mounted, do what you need
                        } else {
                            alert("Could not mount");
        } catch ( err ) {
            // No error warning
        function mount_volume() {
            var myScriptFolderPath = pluginPath + "/resources/"; // Path to the applescript
            app.doScript(File(myScriptFolderPath + "mountvolume.scpt"),ScriptLanguage.applescriptLanguage);
    //The applescript for mounting volumes
    (*set user_name to ""
    set Dialog_1 to display dialog "Please enter your user name" default answer ""
    set the user_name to the text returned of Dialog_1
    set pass_word to ""
    set Dialog_2 to display dialog "Please enter your password" default answer "" with hidden answer
    set pass_word to the text returned of Dialog_2*)
    tell application "Finder"
        try
            mount volume "afp://mysub.mydn.com/myfolder" as user name "myusername" with password "mypassword"
        end try
    end tell
    Thomas B. Nielsen
    http://www.nobrainer.dk

  • File.exists() speed

    I have written a recursive algorithm for a particular statistical analysis that often requires in excess of 1x10^30 permutations. The function looks to see if file.exists(). If file.exists()==true, then a calculation is perfomed and a new file is written. If file.exists()==false, three "smaller" files are checked for using file.exists() by calling back on the same function. The function continues to divide the problem into smaller parts until it finds the files it needs. It then creates the files it doesn't currently have.
    When I run the function, it performs quickly when only a small number of recusions are required. Otherwise, the function gets very slow (the current run has been executing for 4 days now, and no it is not an infinite recusion). I don't know if the slowness is due to the number of objects that are created by the recusion (I create several thousand BigIntegers with each recusion), or if it is due to the file.exists() method. At the moment, several hundred files are stored in the directory where the file.exists() method is checking. If the slowness I'm encountering is due to the file.exists() method, and if that method is slowed by the number of files I have, is there a way to speed things up? For example, would it be faster to store all the file names in a file and then only search through this file for an existing file name?
    Another possibility for the slowness is that I'm also reading files at each recusion and the files may be 1-20MB each.
    Sorry I can't post any source code. I can't access my files at the moment.
    Any help or suggestions for speeding things up are greatly appreciated.
    Thanks,
    Patrick

    You should profile your code to see what it's actually doing all the time. Once you know what is slowing it down you can try to search for fixes.
    There are several profilers available for tuning Java:
    http://www.google.com/search?q=java+performance+profiler

  • File.exists() returns false even when the file exists

    hi,
    the exists() function of java.io.File function returns false even when the file exists on the file system. why is this? i checked the path of the file which gives me the correct path, but exists returns false. can anyone help?

    post some of the code you�re using - then maybe I can help you out
    //Anders

  • Fonts changed to Unix files when saved to a remote server

    Hi all, I read an archived thread regarding this, but not sure if my situation is related somehow. The issues others have had was that their font files were converted to Unix files at 0KB, when stuffed.
    My issue is I backed up fonts (PS and TT) from my Mac to a remote server (PC based). When that server is accessed by Mac users, some saw the file as a Unix file at 0KB. However, there were some (including myself) that saw the actual font file.
    That was a few months ago, we've retired that server since, but before doing so I transferred all the fonts to a new server. It's now a raid drive run off a Mac Xserve. After the transfer, I checked to see if the fonts were still okay, and they were showing full Mac file (no Unix). I didn't go into the new server for a couple of months, but when I did I noticed that all the fonts had been changed to Unix files. Some were at 8KB, others at 60KB. But no 0KB files. +Note: because the initial transfers was a success, the original files from the old server were deleted along with it. So there is no way of retrieving the original files. As well, were were running 10.4.10 with the original server and files. Switched to 10.5.x when files were transferred to the new server.+
    I've tried the tips here (using the Terminal method and the FileUtilsCM script) http://discussions.apple.com/message.jspa?messageID=6041364 but to no avail. I'd hate to think these fonts are scrap. As they were all purchased (and there's a whole load of them). Any input in saving these files would be of great help.
    Thanks in advance.

    The real font information is stored in a resource fork, not the data fork fo the file.  Depending type type of file system you copied them to, how you copied them, and what method you are using to look at them, you may not be seeing the resource fork.
    You can see more detail about files usng a Terminal command such as
    ls -leaO@ file
    If there is a resource fork, it will be displayed.
    If the file system was not a Mac OS X external file system, then you might want to look for a file with a similar name only starting with a leading period to make it invisible to the Finder
    ls -leaO@ /the/directory/with/your/fonts

  • Unix file system & Oracle datafiles--urgent plz

    How i can chech my oracle db files on which unix file system? In HP/UX exvirnment??

    select * from dba_data_files
    AUTOEXTENSIBLE column gives you whether autoextend is on or not.
    Join with dba_free_space to get free space for each file.
    You can check the following link
    http://www.oracle.com/technology/oramag/code/tips2003/083103.html

  • External Tables to Unix File System 10G R2

    Can anyone help with setting up an external table that reads a flat file from a Unix File system.
    I have sampled a file ok and created an external table and deployed it to the database ok but it can find the link through to the unix file system to read the file.
    I created the location as an FTP type and have referenced the path to the relevant directory /oracle02/app/OWB_files when creating the location. I have placed the relevant named file in the directory but when i try to look at the table in TOAD i get the following errors
    ORA-29913 error in executing ODCIEXTTABLEOPEN callout
    ORA-29400 data cartridge error
    KUP-04040 files 121123_PENS.txt in MLCC_FILES_LOCATION_0 not found
    Does anyone have a step by step guide for creating these and am i doing some thing wrong. Is choosing the FTP type in the location correct and is the path specified correctly. I can see much information on thisin the manual!
    Your assistance would be appreciated

    HI,
    You make sure that, the path should be shared one. We can do this using samba server.
    Regards,
    Gowtham Sen.

  • How to test an image file existing or not

    Hi Everyone,
    I want to test whether an image file exists or not before setting the url of an image component in JSF to it. Following is my code:
    File testFile = new File(image_path + "/p1.jpg");
    if(testFile.exists()){
    info("file exists");
    }else{
    info("file not exists");
    this.myImage.setUrl(image_path+"/p1.jpg");
    Althoug the p1.jpg can be linked to myImage, the existence test always fails. That is, I got the message "file not exists" even though it is already displayed.
    What did I do wrong?
    Thanks in advance,
    Message was edited by:
    field

    File testFile = new File(image_path + "/p1.jpg");Is image_path an absolute path or relative path?

  • Error message: "Java Script turned off, Enable Java Script" How to do this? I have gone into "Tools--then Options--Then checked Java Script--Then the "OK/Save" Button but this has not helped. What is the right course of action?

    Java Script is disabled on my HP laptop. I have done the obvious things. It still will not enable Java Script. What do I try next?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

Maybe you are looking for

  • Error in BAPI while creating incoming invoice

    Hi Experts, Im creating incoming invoice by using the BAPI,  'BAPI_INCOMINGINVOICE_CREATE'. when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to

  • Can't install Bootcamp, stuck in Windows XP

    Hey everybody, I recently got a MacBook Pro with OS X Lion. I partitioned the hard drive and successfully installed Windows XP. I tried to install Bootcamp, but I get an error message saying that Bootcamp can only be installed in Windows 7. How can I

  • Raw Imported images are too dark

    When I import RAW files from my Nikon D80 they are much darker than they show in the camera's display and I'm always obliged to boost exposure in AP2 by at least 1 to 1,5 step. This doesn't happen if I shoot in JPEG. There is anything wrong in the ca

  • AE: Multiple Mitigation controls per risk

    Hi, I am currently setting up mitigation controls in CC and am wondering if it is possible to have 2 mitigation controls for a risk? It does not look possible, because when assigning access in AE and mitigating the risks,  it is only possible to choo

  • How to remove Safari 5 from pc with xp.....add/remove does not work

    Looking for help removing Safari 5 from my PC using XP. Add/Remove program will not uninstall it.