You're never
testing that the value returned here:
String url = getAppProperty("http://localhost:8080/midp/thename");
is not null, so it might be... and in fact, almost certainly is. The argument to this method is supposed to be the
name of a property, like APP_URL or something; the
value of the property would be the actual URL. You could start by simply changing above to
String url = "http://localhost:8080/midp/thename";
and see if things work; then look into properly storing this url in your JAD file under a name like APP_URL .