This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Connector, setRequestProperty, MIDP 1.0  RSS feed

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Im using this code for making a connection to the net. But my question is, whats is the "User-Agent"-key? And can I get that value (User-Agent)dynamicly?
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the user agent is the same as the host device(?), you can make a call to

I believe the other cross-platform calls are "microedition.encoding" for character encoding, "microedition.configuration" for the support CDC/CLCD and "microedition.profiles" for the supported MIDP. There may be others, but those are the ones I know of that are of use in getting information about the device the midlet is running on.
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I supose it works cause Im getting no errors and exceptions and Im having no problems to get the data. Instead of "User-Agent" "j2me" when I use WTK 1.0.4 Thanks but Im not shure what setRequestProperty(), Im using it two times, wouldnt that mean that the "User-Agent" would be overwritten when I use it the seconds time?
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wont be overwritten because I name two diffrent keys. On ther other hand if the key was the same it would be assigned a new value. Right?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!