2011-12-09 11 views
0

私は、httpsのサイト(sample.aspx)にアクセスしています。私たちはuseragent、javascript、cookieが有効になっている必要がありますので、私はブラウザフィールドで試しました。私はresponse.Pleaseは、http接続で次のプロパティを使用する方法を私を助け得るカントhttp接続、http接続のブラウザフィールドのプロパティを使用

String userAgent = "BlackBerry" + DeviceInfo.getDeviceName() + "/" + DeviceInfo.getSoftwareVersion() +" Profile/" + System.getProperty("microedition.profiles") +" Configuration/" + System.getProperty("microedition.configuration") + " VendorID/" + Branding.getVendorId() 
BrowserFieldConfig config = new BrowserFieldConfig(); 
      config.setProperty(BrowserFieldConfig.USER_AGENT, userAgent); 
      config.setProperty(BrowserFieldConfig.ENABLE_COOKIES,Boolean.TRUE); 
      config.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE); 
      myBrowserField = new BrowserField(config); 

のように私には、JavaScriptとクッキーと私のHTTP接続でを有効にする必要があります。

答えて

0

あなたの返事のため

httpConnection.setRequestProperty("User-Agent", 
      "Profile/MIDP-2.0 Configuration/CLDC-1.0"); 
+0

おかげのようなものを呼び出すことができます。ユーザーエージェントを使用しましたが、javascriptを有効にする方法はわかりません。 – Gopinath

+0

誰か助けてください – Gopinath

関連する問題