on 01-08-2007 12:20 PM
Hi Friends,
I am tring to implement ClientInfo object to track the browser Information / device Information. Using following Code.
ClientInfoFactory clientInfoFactory = ClientInfoFactory.newInstance();
ClientInfo clientInfo = clientInfoFactory.newClientInfo();
IWDProtocolAdapter protAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protAdapter.getRequestObject();
clientInfo.load(request);
String strUseragent = null;
String strHostname = null;
// - This statement throws NullPointerException-
strUseragent = clientInfo.getUserAgent();
strHostname = request.getClientHostName();
wdComponentAPI.getMessageManager().reportSuccess("useragent is "+strUseragent);
wdComponentAPI.getMessageManager().reportSuccess("hostname is "+strHostname);
The statement which is shown above throws nullPointerException.
I have tested this application in servlets and it works fine there. Kindly help me understanding the probable reasons why this statement fails to execte in webdynpro.
Thanks
Praveen
Hi Armin,
Thank you for reply. If we can not use ClientInfo object then is there any way to track the similar information.
Thanks
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These are not API classes, so you cannot use them in applications.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.