How can we locate the property file and read from it in .js page?

HI
I am having an static html page where in the url is hardcoded,so i wanted to read it from a property file and which can be done by using .js files
i wanted to know how to deal with property files in .js?
Thankx

I assume you know that Java and JavaScript only share a name and they are both programming languages but little else.
You can load JavaScript in Java 6. However for questions on what the JavaScript should do I suggest you try a javascript forum.

Similar Messages

  • How can i open the directory/​folder and read all the files inside it in order and then close it?

    How can i open the directory/folder and read all the files inside it in order and then close it? any example would be nice.
    thanks

    In the File I/O>>Advanced File Functions Palette is a function named "List directory". This function will give you two arrays. One contains the names of all subdirectories the other the names of all files. If you want to sort them by name use the array sort function. If you want to sort them by another attribute use the File/Directory Info function to get more data. Use a cluster which contains the attribut to sort and the original index of the name. Then sort this array.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap?

    How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap? Currently my program reads the data from several text files in a directory and the saves that information in a text file called output.txt. I would like to cache this data in order to use it later. How can I do this using the TreeMap Class? These are the keys,values: TreeMap The data I'd like to Cache is (date from the file, time of the file, current time).
    import java.io.*;
    public class CacheData {
      public static void main(String[] args) throws IOException {
      String target_dir = "C:\\Files";
      String output = "C:\\Files\output.txt";
      File dir = new File(target_dir);
      File[] files = dir.listFiles();
      // open the Printwriter before your loop
      PrintWriter outputStream = new PrintWriter(output);
      for (File textfiles : files) {
      if (textfiles.isFile() && textfiles.getName().endsWith(".txt")) {
      BufferedReader inputStream = null;
      // close the outputstream after the loop
      outputStream.close();
      try {
      inputStream = new BufferedReader(new FileReader(textfiles));
      String line;
      while ((line = inputStream.readLine()) != null) {
      System.out.println(line);
      // Write Content
      outputStream.println(line);
      } finally {
      if (inputStream != null) {
      inputStream.close();

    How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap? Currently my program reads the data from several text files in a directory and the saves that information in a text file called output.txt. I would like to cache this data in order to use it later. How can I do this using the TreeMap Class?
    I don't understand your question.
    If you don't know how to use TreeMap why do you think a TreeMap is the correct solution for what you want to do?
    If you are just asking how to use TreeMap then there are PLENTY of tutorials on the internet and the Java API provides the methods that area available.
    TreeMap (Java Platform SE 7 )
    Are you sure you want a map and not a tree instead?
    https://docs.oracle.com/javase/tutorial/uiswing/components/tree.html

  • How can i send the music, photos and films from extern hdd to time capsule?

    how can i send the music, photos and films from extern hdd to time capsule?

    Hi Niel, i open Time Mchine, starts a new screen where i can see all Data (program etc.), my macbook and my extern hdd. there i have musik, films and picture...when i click them, where i have to set them?
    Sorry, i got the last 20 years a pc, this is my first macbook pro and from today my first 2TB air port time cap.

  • How can i locate the resource file in the weblogic?

    hello
    in struts, i can leave some parameter in a resource file (such as "Application.properties")outside of my code,and get them in the "Action" class by the "getResource" method.
    in my data access tier,i still want to use such a machanism but i can't use the "getResource()" method,for example,there is a ConnectionPool class,i want to read some parameters from a resource file ("param.properties") that is under the same directory as the ConnectionPool class,the following is the code snippet:
    public static void init(DataSource ds){
    myself=new ConnectionPool(ds);
    java.util.Properties prop=new java.util.Properties();
    try{
    java.io.FileInputStream fin=new java.io.FileInputStream("./param.properties");
    prop.load(fin);
    }catch(Exception e){
    e.printStackTrace();
    System.out.println(prop.get("help.create"));
    the "ConnectionPool" class is in the "com.jhtop.task.forum.db.util" package,the "param.properties" is in the same package (com.jhtop.task.forum.db.util),
    but when i execute the program,it tell me that it can't find the file.if i use the absolute path,it works.
    i wonder how can i locate the file path in the weblogic,or what's my current path,or how may i setup my work directory?
    in tomcat,my current directory is bin directory,how about weblogic?
    who can help me?thank you!

    My english is bad and I'm not sure I've well understood your problem.
    How have you created your file ?
    Why do you put it in such a directory and not an other ?

  • How can i locate the properties files within a ejb container?

    when i develop servlet+javabean structure application,in order to imploement decoupling,i
    would like to write the config information in the properties files(key-value pair),in
    servlet,i use "getResourceAsStream(String relativePath)" method to retrieve the
    configuration information from the properties files(i even write the SQL clause
    in the files),it alwsys works well.
    now,i want to implement such function within the ejb container,that is to read
    a properties file from session bean,but i don't know how can i locate the file
    within the ejb container by using relative path,i wonder if there is the same
    method within ejb container as "getResourceAsStream(.......)" method within servlet
    container?
    thanks for any helps!
    the code snippet is appreciated!

    In general, you should look at using environment entries (variables) in the
    deployment descriptors (both the war and EJB jar rather than properties
    files for configuring J2EE applications. The reasons for this are many:
    1. This is the official way to do it according to the spec. Properties
    files are the J2SE way of doing things
    2. As you note, that it's not obvious how you would (legally) read a
    properties file inside an EJB.
    3. It's consistent between the web and EJB part of your code
    4. the weblogic console and tools have good capabilities to edit these
    fields.
    Kent
    "zhebincong" <[email protected]> wrote in message
    news:[email protected]..
    >
    when i develop servlet+javabean structure application,in order toimploement decoupling,i
    would like to write the config information in the propertiesfiles(key-value pair),in
    servlet,i use "getResourceAsStream(String relativePath)" method toretrieve the
    configuration information from the properties files(i even write the SQLclause
    in the files),it alwsys works well.
    now,i want to implement such function within the ejb container,that is toread
    a properties file from session bean,but i don't know how can i locate thefile
    within the ejb container by using relative path,i wonder if there is thesame
    method within ejb container as "getResourceAsStream(.......)" methodwithin servlet
    container?
    thanks for any helps!
    the code snippet is appreciated!

  • How can I see the hidden file and erase it?

    I had to make a file starting "." and had to put it on my FTP client. I made it by Text Edit and Microsoft word and save it. Since it is hidden file, I can't see on my Mac but when I use the FTP client and click post, the file listing was showed up and I can check as "Show Hidden file". Then I could post the files on the FTP client. However, since I don't need it on my computer, I'd like to erase it but can't find the files. How can I find the hidden files? Thank you.

    if you know the folder then navigate to that folder. Open the Terminal application in your Utiities folder and do the following::
    Enable Finder to Show Invisible Files and Folders
    Open the Terminal application in your Utilities folder. At the prompt enter or paste the following command line then press RETURN.
    defaults write com.apple.finder AppleShowAllFiles TRUE
    To turn off the display of invisible files and folders enter or paste the following command line and press RETURN.
    defaults write com.apple.finder AppleShowAllFiles FALSE
    Alternatively you can use one of the numerous third-party utilities such as TinkerTool or ShowHideInvisibleFiles - VersionTracker or MacUpdate.

  • How can I transfer the metadata templates and keywords from one computer to another? Working on a new iMac CS6?

    I've just changed computers and upgraded to CS6. I am trying to import my Bridge metadata templates and keywords. I had done this once before but I can not remember the procedure for doing this. I have created a lot of templates and do not want to do this all over again. Any and all help would be appreciated. Thank you in advance. Kevin

    komphoto,
    The keywords file is buried deep inside the INVISIBLE user Library, or "~Library" (that's a tilde before the word Library, which designates the User Library, a.k.a, the Home Folder Library).
    In order to make it visible temporarily, you have to go to the Finder, then go to the "Go" menu and select the "Go To Folder…" menu item, and type ~Library in the text field.
    That will open a new Finder window which will be grayed out to indicate that it's normally hidden.  From there you can follow the path:
    Note that I'm not saying this will work.  I have never done it myself.  I'm just trying to clear up the confusion caused by the previous poster.

  • How can I hide the user name and password from the url address?

    Good afternoon every body,
    I have a form running with Oracle9i Developer Suite Release 2 and when I run the form on the web it shows the user name and password of my data base. Can anyone of you please help me to hide the user name and password, if there's any way of course?.
    Thanks a lot!!.

    Luis,
    Then, as inolau's notice, create logon screen (or use the default one) and force the users to logon at runtime. Do not pass username/password as parameters.
    inolau,
    True that if the connection is specified in the config it will be the same for everyone. However, every case is different. For example one of our apps gets S3 credentials (from non-Oracle S3) as session parameters. It uses this common db connection to validate some stuff with the database, read security definitions and then it re-connects the forms using the credentials.

  • How can I write to port C and read from port A&B simultaneously using 6503 DIO-24

    I attempting to read from Port A and B which are grouped together and at the same time I want to write to Port C. The problem I having now is that every time I want to read from Port A and B, Port C seems to be effected. I have only used the easy dio's vi this may be the root of my prblem

    Hello,
    You will need to use the advanced digital VIs to accomplish what you are trying to do.
    The Easy DIO VI's are simply a combination of two DIO advanced VI, so you will use the same two advanced VI with a little different calling method. We want to call both PORT Config VI first to configure two ports for read and one port for write. Then we can simply read and write to the ports as desired, perhaps in a loop.
    The best place to start would be to look at the LabVIEW examples for Digital Input and Output operations. In LabVIEW, go to Search Examples then under I/O interfaces select DAQ (or Data Acquisition)-> Digital Input and Output->Immediate Digital Input and Output. From her you will want to look at the examples under the 8255 chip which is the chip on
    the DIO-24. I would recommend looking at Read from two digtial ports and the Write to one digital port VI's.
    From here you will simply need to combine the two together. One note: you will want to make sure that both port config VI are called before either Port Read or Port Write VIs.

  • How can I get the old file and bookmark back on the top left cnr.?

    I had to download FF as I had to do a reinstall for win 7. Now my old bar that had "file, to bookmarks"
    Is gone and I want it back! Also I had some icons below my Google start window, gone now, in fact I cannot find Google or Yahoo in the upper right corner. Also I DO NOT want all the add-ons. Every time you guys upgrade it gets worse. Can you not have a download site just for old buggers like me??

    See this about the Menu Bar. <br />
    https://support.mozilla.org/en-US/kb/display-firefox-button-menu-instead-menu-toolbar#w_ive-tried-it-and-i-want-to-go-back

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • I have downloaded a music file through a downloader . But the file is not found in the captured in music player . How can I locate the physical location and move the file . I cannot do via itunes also .

    I have downloaded a music file through a downloader . But the file is not found in the captured in music player . How can I locate the physical location and move the file . I cannot do via itunes also .

    Exactly what do you mean by a 'downloader'?
    Thanks
    Pete

  • Hello! I have one iTunes library on my iPod and one iTunes library on my computer. When I connect my iPod touch to my PC, however, I cannot find any files in my iPod except for pictures. How can I find the music files so I can add them to my iTunes?

    Hello! I have one iTunes library on my iPod and one iTunes library on my computer. When I connect my iPod touch to my PC, however, I cannot find any files in my iPod except for pictures. How can I find the music files so I can add them to my iTunes?

    You can't do that.
    And before you decide to store any music that you own on a computer at work, talk to your IT department. Many organizations do not permit it for legal reasons. Standard policies are that anything stored on company owned computers is the property of the company. It could not be legally stored on their machines unless you transfer the licenses and all copies, physical and digital, to the company, meaning you no longer own the music. If they were to be audited and could not prove that they own the music, they would be subject to copyright violation penalties. Just use your iPod when you're at the office if you want to listen to music.

  • The hard drive on my MacBook died and I had it replaced. I can't locate my website files and every time I try to open my idisk it looks for a name and password (even reset my apple id as prompted) I keep being told that it's the wrong name or password?

    The hard drive on my MacBook died and I had it replaced. Now I can't locate my website files and every time I try to open my finder/idisk it looks for a name and password (even reset my apple id as prompted) I keep being told that it's the wrong name or password? Any suggestions out there

    Arty ~ Welcome to the Support Communities. iWeb can't import/open published HTML/media files on your iDisk. iWeb can only open its key Domain file which contains your site data — it's usually located here:
    ...If you don't have a backup of your Domain file (e.g. via Time Machine), paragraph 2.3 of this FAQ page gives some tips on how to use published files, graphics, photos, etc., to help rebuild the site from scratch:
    http://iwebfaq.org/site/iWeb_Backup_retrieve.html
    Also this thread may help:
    Hard Drive replacement causes new/unknown user password?

Maybe you are looking for

  • I did it! Opened Intel Mac all by myself!

    Hello, For a girl, I like to think I'm a little tech savy. I like gadgets just like most guys. I have recently picked up a Intel Mac Mini and was kinda itching to crack it open to see what kind of trouble I could get into. (Hopefully none of course)

  • For creation of follow up transactions automatically through Actions do we require copy control?

    Hi All, I have to create folow up transactions automatically when quotation gets approved. My question is when we create a follow up transaction automatically through Action Profile is it required to have copy control settings or not? Thanks, Rao

  • Is there a way to only import video?

    Is there a way to only import video? In the import window, I can see a list of files from my SD cards. But they only everything, like photos or even system files sometimes. Is there a way to tell final cut pro to only list or show video files? Or pre

  • I need some help with finder

    ok so i was clearing my mac to give back to my school at the end of the year.... i know a little early but still..... and well i messed up. my mac was locked so i couldnt find the system files and core files and stuff..... but i cracked that right op

  • Lumira Server - Authentication Issues

    Hi all! I just finished installing Lumira Server 1.15, following through all the config steps (http://server:port/sap/hana/xs/sqlcc/) and logging on with a user that has the sap.bi.common::BI_DATA_ANALYST role I get a list of all views that are deplo