How to read JBoss server 'app.properties' file in the deployed Flex application?

Hi, my current Flex project is using LCDS server to make call (Remote object call and Data managements services' call) to the backend Java services and consume data to render. I have defined the AMF and RTMP channels in the services-config.xml file and destinations for the Java services' in the remoting-config.xml and data-management-config.xml files.
     <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://localhost:8080/eqcFlex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
            </properties>
     </channel-definition>
As of now both the Flex application WAR file and Java services EAR files are depolyed on the JBoss server on my machine, therefore I can hardcode the endpoint URL as http://localhost:8080 in the services-config file and hit the Java services.
But the requirement is that the Flex application WAR file needs to be deployed on JBoss servers deployed on different machines and hence the endpoint URL cann't be hardcoded in the services-config.xml file. Is there a way we can pick up the endpoint URL from the JBoss server's app.properties file so that we can dynamically create channels in Actionscript code and make call to the backend services with dynamic endpoint URL?

But in Command prompt I found out that My properties file by name
'cedrelay.properties' is not recognised by web.xml.My web.xml structure is
How does web.xml "recognize" anything?
You specify the properties file as an init parameter. Do you read it in the init method of the servlet? If so, what does the code look like for reading the properties file?
You'll have better luck if you put that properties file in WEB-INF/classes and load it as a resource input stream from the CLASSPATH.
%

Similar Messages

  • How to read a passward protected excel file with the help of database connectivity tool kit

    hi, i was reading an excel file with the help of database connectivity tool kit in labview 8.0
    i made tabels in the excel file nand made odbc connection and specified the workbbok name.
    now my problem is how to read the same file if i specife a pasword to that excel file ?

    Hi,
    Check out this thread about opening a password-protected Excel file using ActiveX. This should take care of it for you!
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • How to read and paste an image file in the Adobe Indesign document by using plugins?

    Hai i'm senthil...
    i had just now started working with Adobe Indesign plugins...
    Can any one tell me how to read an image file from the hard disk and paste that image file in a text box in the document...
    plzz send me the codings and in which file we want to attach these codings...
    thank you..
    bye
    senthil

    hai art,
    thanks for ur reply...
    i tried and developed the program for pasting the image from
    the database...
    But now i want to paste 3 images in a page...
    for this i had used while loop;
    But i'm having 6 images in the database...
    when the 4th image is in reading, automatically a new page will
    be created and the 4th image will be pasted in the newly created page.. i tried and develped for creating a new page...
    But how shall i paste the 4th image in the newly created page...
    is there methods or classes?
    plzz reply...
    thanks..
    senthil..

  • How to read a server side file in Applet?

    When I used ZipFile like this,
    ZipFile zf = new ZipFile("http://xxx.com/res.jar");
    It throwed exception about access denied, File pemission...
    How to read a server side file in Applet?

    You generally can't tell with Stream how many bytes are going to be available. You could download the whole thing into a ByteBuffer, for example, and process it from there.
    Or you can try opening an http connection explicitly (using URL and casting the connection to HttpURLConnection and see if there's a "Content-length" header.

  • How to give Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    You can use ResourceBundle class to load this properties file from the classpath:
    ResourceBundle props = null;
    props = ResourceBundle.getBundle("com.company.sql.SQL");

  • How do I setup permission to transfer files to the MacMini Server. I thought I had it setup to do such but apparently not as I get an error message?

    How do I setup permission to transfer files to the MacMini Server. I thought I had it setup to do such but apparently not as I get an error message that I don't have permission?

    Both the Mac and Windows units we are usinghave connectivity to the MacMiniServer (on the same network) to open and edit files but cannot transfer new files to the MacMini. FileSharing is on. I went to File Sharing on the MacMini and added the appropriate users and checked FileSharing. Is there something else I needed to do?

  • URGENT PLEASE:How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server? Can I run through an Applet?
    How can I set Environment variables in Windows2000 Professional Environment?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    The code is here
    import java.sql.*;
    public class RecordShow {
    public static void main(String args[]) {
    String url = "jdbc:mysql://localhost/myhost";
    Connection con;
    String query = "select mytable.column," +
    "from mytable " +
    "where mytable.column = 1";
    Statement stmt;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,
    "myuser", "mypassword");
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    int rowCount = 1;
    while (rs.next()) {
    System.out.println("Row " + rowCount + ": ");
    for (int i = 1; i <= numberOfColumns; i++) {
    System.out.print(" Column " + i + ": ");
    System.out.println(rs.getString(i));
    System.out.println("");
    rowCount++;
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.print("SQLException: ");
    System.err.println(ex.getMessage());
    Please advise... THANKS
    VJ

    Ehm, I wasn't referring to you at all... read up,
    there's a comment by jschell saying that CGI might be
    easier/better for his purposes.
    Yep.
    I know PHP/Perl/whatever might be easier for some
    purposes, but only if you happen to know them and want
    to/are able to use them. Ok. But you aren't the one asking the question are you. And the person who asked the question seems to have absolutely no familiarity with Apache or applets.
    So whatever they do they are going to have to learn a lot.
    And that does indeed suggest that in all likelyhood they have not investigated the alternatives.
    And for the vast majority of internet applications, especially with smaller projects (obvious this person is not working with a large team), using perl, or something besides java, is going to be the best business solution. It is simpler, and more secure (probably due to the fact that it is simpler.)
    Since this is a Java forum, I
    answer under the assumption that people have made a
    choice one way or another to use a Java solution to
    their problem, so I try to solve it in Java first, and
    only when that fails (very seldom) do I turn to other
    solutions.You approach problems by arbritrarily deciding to try to solve it in java first and only if you fail do you then look to other solutions?
    My first step is to try to figure out which of the various avenues is going to cost less. (And a secondary, but non-trivial concern, is then to convince the customer that just because they have heard of a buzz word like 'enterprise bean' that it doesn't mean that is a cost effective solution.) We must come from different worlds.

  • How to set Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    I am using the propeties file to get the SQL statements. I have all the SQL query statement in the properties file. I am creating a preparedstatement after getting the statement from the properties file with the id like we do in ResourceBundle. If I keep the properties file in the config directory of the Sun App Server instance , then it is working fine. But If I don't keep it there, then it is giving me a file not found exception.
    My SQL class which is accessing the properties file are in same package (com.company.sql). But still it is not able to find the file. As suggested by you, I tried it by giving the path as com.company.sql.SQL. Still it did not found the file. The file is there inside the WEB-INF/classess/com/company/sql/.
    Thanks
    Amit

  • How to read contents of a property file sequentially

    hello all,
    please can any one tell me how to read contents of a property file sequentially.
    i saw most of the classes provided by JAVA API, which get All keys and there return type is enumeration which dosent preserve , or may the getKeys() method of those classes do not preserve the sequential order.
    Kindly do let me know if anyone has done this before.
    Thanks.

    The best solution is that you redesign your program so that it does not depend on the order of the entries in the properties file.
    If you really want to stay with your design, you will have to read the properties file yourself, line by line, just like you would read any other text file, and parse the content of each line yourself.
    BufferedReader in = new BufferedReader(new FileReader("stuff.properties"));
    String line;
    while ((line = in.readLine()) != null) {
        // Parse the line, use e.g. String.split() to split it around the '='
    in.close();

  • How to conifg jdeveloper10g to include properties files?

    hello
    in my project,i have a "param.properties" file,that contain the configuration info,i want to read it from my program.
    i put it under the "src" directory in my jdeveloper10g project,and hope it can be included in the "class" directory after compilation and package.unfortunately it CANN'T.
    i remember that jbuilder can be configed to include any kind of resource,but i don't know how can i config the jdeveloper10g to include the properties in the classpath?
    thank you!

    You can get JDev to "compile" (it doesn't really compile the properties file), and put it into your classes directory by adding it into the src directory and getting JDev to open it inside your project. Just make sure to put that properties file into the correct package for your code to reference it in the src directory (meaning just put it in the correct package folder in 'src').

  • How to read MG1, MGU, SG1, SGU files?

    I have copies of Band in a Box and Aebersold music software, from an older PC.
    How to read MG1, MGU, SG1, SGU files on my MacBook Air?
    Many thanks, Antoine

    I believe in Linux/Unix, everything is treated as a file descriptor, be it a disk, socket, hardware device or an actual file. Since Java will simply call the appropriate method (length() for example) on the descriptor, I would imagine it would be up to the operating system to determine what to return. If I ask for the length() of a socket, I'm not sure what it would return. The bytes not flushed in the buffer? Total transmitted? Some random uid? I'm sure it is defined somewhere but the behavior may not be what you expect. See if you can use a 'vanilla' command-line method to get the file length from that device. If it too returns zero, you know it's not your program.
    - Saish

  • How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    Please advise...
    VJ

    cross posted
    http://forum.java.sun.com/thread.jsp?thread=299137&forum=31&message=1184025

  • How to read and upload microsoft word file into database using forms9i

    Hi,
    How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
    Thanks in advance
    Mahesh Ragineni

    The webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
    Regards
    Grant Ronald
    Forms Product Management

  • Is there any way to get the server app other that through the app store. We do not have our system conneted to a network. I typical downloaded items on a non-apple system.

    is there any way to get the server app other than through the app store. The system that I need it on are not connected to the internet.
    We run a closed-loop network of apple systems and I tipically downloaded updates on a non-apple system that was on the internet.
    Any ideas?

    I did buy the server app, went to the app store to download it. This system I'm using for downloads is Snow Leopard 10.6.8, it shows that I can download it but only as an Install which says I need 10.8. I can't seem to find a way for it to just download as a package or .dmg file so that I can copy it to DVD/CD or flash drive.

  • How do u out your own video files on the ipad?

    How do u put your own video files on the ipad and once u have done it where do u look to find it to play

    You load them into iTunes and then sync them to your iPad. You'll then find them in the Video app. For detailed information, consult the iPad User Guide; the sections on Synching and Videos will be most applicable. Then if you have specific questions, post back and we can help further.
    Regards.

Maybe you are looking for

  • Error message of "video format not supported" for ATV1 for files from iTunes

    I have an ATV first generation, I had to redo my windows profile and now ATV is not syncing all my movies from iTunes. It says that ATV does not support the video format from movies I downloaded from Itunes.

  • 15-minute passcode lock self-defeating

    I've learned that having an Exchange account (apparently only Exchange 2007, not 2003)  results in a diminished set of choices regarding the time interval before the passcode lock sets, and that is consistent with my experience: the four-hour option

  • N73 and mac os 10.5.6

    I just bought a N73. I have problem with Bluetooth connexion. I can connect it with USB cable but not via Bluetooth. The Mac Operating System is rather new OS 10.5.6. I tried from different computer and I had success only with an old Mac OS 10.4.11.

  • Cddvdw not working in windows 7

    I have an hp Pavilion dv5-1002nr  with TSSTcorp_CDDVDW_TS-L633L  drive.  originally purchased with vista.  I have upgraded to a clean install of windows 7 performed by Staples.  No one has been able to get the cd working....  windows sees the device

  • Ok back again with 55 error code endless on and off loop

    So a few days ago i decided to clean up the computer. Removed/reinstalled/cleaned video card, 2 fans attached to a tall finned CPU cooler (to clean out the cooler fins) with q-tip and compressed air can, and remove filters and some fans to clean. All