Tuesday, February 25, 2014

Ask questions about the tomcat server


Since I am not quite understand the knowledge server side, so today doing a Andrews' version upgrade, "the task, found when entering the application, the program does not perform to that step I wanted, that did not get the latest version and version number information names. I suspect that my tomcat not used correctly. As part of the program, seeking expert help.
public class JobActivity extends Activity {

/ / -------------- Automatically updated with
private static final String TAG = "Update";
public ProgressDialog pBar;
private Handler handler1 = new Handler ();
private int newVerCode = 0;
private String newVerName = "";
/ / ----------
・ ・ ・
/ / ---------- Update function on behalf of the code
if (getServerVerCode ()) {
int vercode = Config.getVerCode (JobActivity.this);
if (newVerCode> vercode) {
doNewVersionUpdate ();
}
}

/ / ---------
private boolean getServerVerCode () {
try {
String verjson = NetworkTool.getContent (Config.UPDATE_SERVER
+ Config.UPDATE_VERJSON);
JSONArray array = new JSONArray (verjson);
if (array.length ()> 0) {
JSONObject obj = array.getJSONObject (0);
try {
newVerCode = Integer.parseInt (obj.getString ("verCode"));
newVerName = obj.getString ("verName");
System.out.println (newVerCode);
System.out.println (newVerName);
} Catch (Exception e) {
newVerCode = -1;
newVerName = "";
return false;
}
}
} Catch (Exception e) {
Log.e (TAG, e.getMessage () + "");
return false;
}
return true;
}
}
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The tomcat address you want to visit, which is to get the IE URL address directly open tomcat do not know is not the problem?
Reply:
cited a floor yiyamzen reply:
the tomcat address you want to visit, which is to get the IE URL address directly open tomcat do not know is not a problem it?
I know, tried, I put in a apk file under the root folder, if the address is written to the folder can not access this level, of course, but on the plus / on. Apk can be downloaded, but the phone still does not respond to debug.

No comments:

Post a Comment