connection to midlet from v3xx
Hi
I have writte a simple midlet which goes to a servlet on the web and gets a simple text string. Now on the generic emulator my midlet runs perfectly however when I load the app onto my motorola v3xx phone the app freezes when I try and contact the servlet. I cannot use the v3xx emulator because every time I try running it the jblend.exe file freezes and tries unsuccesfully to instal something.
If someone could help me either with my midlet or with my motorola emulator I'd really apreciate it!
Thanks
here is the problematic function:
private String dbConnect()
{
String myString ;
HttpConnection hc = null;
InputStream in = null;
//String url = "http://localhost:8080/freshnetProj/testservlet";
String url = "http://64.202.176.93:9080/freshnetproj/testservlet";
try
{
hc = (HttpConnection)Connector.open(url);
in = hc.openInputStream();
int contentLength = (int)hc.getLength();
byte[] raw = new byte[contentLength];
int length = in.read(raw);
in.close();
hc.close();
// Show the response to the user.
myString = new String(raw, 0, length);
}
catch (IOException ioe)
{
myString = ioe.toString();
}
return myString;
}

