1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Iasi, Romania
    Posts
    144
    Vote Rating
    0
    Answers
    5
    catalin.ciobanu is on a distinguished road

      0  

    Default Answered: .properties file in GXT

    Answered: .properties file in GXT


    Hi guys I am using GXT with an external servlet and I'd like to use a properties file to specify servlet's address.
    It is possible somehow ? As we don't have any access to the file system, it is something like this directly implemented in GXT ?

    I thought it would be possible to specify my address somewhere in the xxxxx.gwt.xml file but I don't see any possibility.

    Please help.

  2. Hi. I file in the file system you cannot read.
    But, you can read a properties file deployed in your webserver with your client code.
    For that, use GWT's RequestBuilder class for reading the content of the file.

  3. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    Answers
    9
    micgala is on a distinguished road

      0  

    Default


    Hi. I file in the file system you cannot read.
    But, you can read a properties file deployed in your webserver with your client code.
    For that, use GWT's RequestBuilder class for reading the content of the file.

  4. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Iasi, Romania
    Posts
    144
    Vote Rating
    0
    Answers
    5
    catalin.ciobanu is on a distinguished road

      0  

    Default


    But, you can read a properties file deployed in your webserver with your client code.
    For that, use GWT's RequestBuilder class for reading the content of the file.
    Do you mean to make a request to my client code with the url like:

    http://localhost:8080/myGxtApp/myFile.properties ?
    Will this work ?

  5. #4
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    Answers
    9
    micgala is on a distinguished road

      0  

    Default


    Yes. By using RequestBuilder you can read that file contents.

  6. #5
    Sencha User
    Join Date
    Jun 2011
    Location
    Iasi, Romania
    Posts
    144
    Vote Rating
    0
    Answers
    5
    catalin.ciobanu is on a distinguished road

      0  

    Default


    It works, thanks !

Thread Participants: 1