(keitai-l) Re: DoJa 1.5 Emulator Problem

From: Sam Joseph <gaijin_at_yha.att.ne.jp>
Date: 07/30/03
Message-ID: <3F278579.20105@yha.att.ne.jp>
Hi Cecilia,

Well there are several possibilities here - one is that the UseNetwork = 
http should be at the end of the ADF file - some phones at least are 
sensitive to this.

Your code looks okay, but it is usally better to use the getSourceURL() 
method to get the url that you are going to send to.

In terms of the emulator - I am not sure about a 1.5 specific emulator, 
but in the 1.0 emulator you ahd to click network enable in the network 
settings field.  However looking at the docs for the 1.5 emulator, i.e. 
p.13 of this document

http://www.nttdocomo.com/pdf/java_for_imode/usersguide20030303.pdf

there seems to be no equivalent ....

but I think you may need to make sure that the Source URL option here is 
set to the url you want to contact, and that the code you are using 
operates on this url, the easiest way to ensure this being to use the 
getSourceURL() method ...

I think the only other thing for you to check is that you are sure that 
your project is really using the ADF file you have specified and not 
another one, i.e. check your application directory for multiple ADF files.

Sorry  not to be of more explicit help.

CHEERS> SAM

Cecilia Chong wrote:

> This is what inside my ADF file :   UseNetwork = http
>LastModified = Wed, 30 Jul 2003 14:11:56
>ConfigurationVer = CLDC-1.0
>AppClass = browser.Browser
>AppName = browser
>PackageURL = bin/browser.jar
>AppSize = 1196   and the following is part of  my code :    try{
>     HttpConnection hc =      (HttpConnection)Connector.open
>("http://www.yourdomain.com/data.txt",Connector.READ,true[1]);
>   /*** This causes the security exception ***/       
>hc.setRequestMethod(HttpConnection.GET);
>     hc.connect();
>                     InputStream is = hc.openInputStream();       byte[]
>text=new byte[(int)hc.getLength()];       is.read(text);
>      String s = new String(text);
>      extractedText = s;
>      is.close();
>      hc.close();   } catch(Exception e) { System.out.println (e); }         
>What other network connection do i need to enable in the Emulator apart from
>the ADF ?     Thanks, Ceci
>   
>
Received on Wed Jul 30 11:50:18 2003