Hi,
I am new to GWT, I want to read property file on Server side. I have
DBConfig.java, useDBConfig.java and DBConfig.properties all placed in
server package. I can't read the values from property file on Server Side.
Your help is highly appreciated.
public interface DBConfig extends Constants {@DefaultStringValue("host")String
host(String host);
@DefaultStringValue("port")String port(String port);
@DefaultStringValue("username")String username(String username);
@DefaultStringValue("password")String password(String password);
}
public void useDBConfig() {DBConfig constants =
GWT.create(DBConfig.class);Window.alert(constants.host());
host = constants.host(host);
port = constants.port(port);
username = constants.username(username);
password = constants.password(password);
}
property file...
host=127.0.0.1
port=3306
username=root
password=root
I found out that constants couldn't be used on server side. There could be
a solution of JSON etc. I don't know about that stuff. Could someone please
help me out.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.