Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Problem in Connecting Application on J2ME WT Emulator with Servlet on Tomcat

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a problem of establishing a Connection with MIDLET using
J2ME Wireless Toolkit 2.0 . The Code is right. I am getting this warning on the toolkit ...


Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.

and when i run the MIDLET on Emulator, the emulator stucks by giving my four uptions..

ABC wants to send information. this will require airtime which will cost money. IS this OK?

1.Yes Always, Donot ask again.
2.This time, Ask me next time. (Default Selected)
3. Not this time, Ask me next time.
4. Shut down Application

I have this msg and my Emulator stucks. I press the OK button but nothing happens.

If somebody will help me i will be thankful. I am trying my Midlet to get some date using servlet on Tomcat
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to do exactly what WTK told you to do: put the network code in a separate thread and start that thread from commandAction() (as opposed to do the networking inside the commandAction() method).
 
Nauman Aftab
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Michael Yuan,

Thank you for your suggestions. I have tried this with thread and i got it right this time . I am also looking forward to read your book. Hope it will help me to increase my knowledge toward Mobile Commerce.

Bye
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic