I am simply trying to get an image from a cgi script in order to display it on my Nokia N90 phone.

My code works through the S60 Nokia emulator but not on the deployed Nokia N90 Phone (I am using Eclipse + EclipseME + Nokia S60 SDK 3rd edition). The download image size is 0K.

Could anyone help me please? This is an urgent issue for me...

Here is an extract of my code :

public void paint(Graphics g) {


String imageData = getMapFromMapServer2(mapServerUrl+"/fast-cgi/mapservmode=map&map=/exec/applis/esgmap/current/mapserv/enville.map&mapext="+minX +"+"+minY +"+"+maxX+"+"+maxY+"&mapsize=352+290&layers=georoute4000k+georoute1000k+georoute500k+georoute250k+georoute100k+georoute50k+georoute20k+georoute5k+departements");


The called function :

public static String getMapFromMapServer2(String url) throws IOException {

StringBuffer b = new StringBuffer();
InputStream is = null;
HttpConnection c = null;

long len = 0;
int ch = 0;
c = (HttpConnection) Connector.open(url);
is = c.openInputStream();

//I know the size in advance
len = 25389;

for (int i = 0; i < len; i++)
b.append((char) ch);

return b.toString();

Many thanks in advance for help !!!!