I am new to blackberry. I want how to authentication in browserfield
BrowserField web;
String Usname="[email protected]";
String password="123456788";
setTitle("sample");
String Welcome ="[email protected]/isloginmethod.aspx";
String logindata ="LoginID="+Usname+"&Password="+password;
byte[] encodeLogin =Base64OutputStream.encode(logindata.getBytes(),0,logindata.length(), false, false);
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
web = new BrowserField(myBrowserFieldConfig);
add(web);
web.requestContent(Welcome,encodeLogin,null);
The web.requestContent method you've used here is for calling the url/posting the data and not for authentication.
HTTP Authentication does not come standard in the BrowserField2 API. You'll have to implement ProtocolHandler and override it for doing authentication.
Check this :
This will help you implement that.