Getting User-Agent through J2ME Client

Hi, i think most of the developers here might have come across this problem.

I have a servlet that will get the client's User-Agent headers value when the client access it. When i access the servlet through a phone browser, the header will give me the phone's user agent. But when i access the same servlet through my J2ME client, the header will return a value of 'UNTRUSTED/1.0' string which doesn't contain any user agent info.

I understand that in JSR implementation the 'UNTRUSTED' string will be appended to the User Agent header, but the original user agent value is not there. Does anyone knows what is the reason behind this?

Thanx.

FooShyn

[687 byte] By [blurfLya] at [2007-11-27 5:29:34]
# 1

first:

- do not multipost the same message

second:

- did you put headers on your connection in your application?

- and the only useragent that you can get is the useragent defined in the app...

for example:

try {

c = (HttpConnection)Connector.open(url);

c.setRequestMethod(HttpConnection.GET);

c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");

c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");

c.setRequestProperty("Content-Language", "en-CA");

os = c.openOutputStream();

...

taken from http://developers.sun.com/techtopics/mobility/midp/articles/network/ThirdExample.java

suparenoa at 2007-7-12 14:52:54 > top of Java-index,Java Mobility Forums,Java ME Technologies...