Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2me app not working on device

 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I have made a simple network application using j2me. I'm using HttpConnection class for establishing the network connection. Basically it just sends a string to the server and fetches back a string from the server. I'm using a java servlet on Apache/Tomcat server. The application works fine using emulator and remote server. It takes around 3 seconds for the server to send back the response( when using emulator).
1) I have a java compliant cell phone and a GPRS network connection. But my application does not work on the device. I do not get any response from the server. What can be the possible reasons ?

2) Secondly how much time do you think it should take for the server to send back the response ( a string) to the client when using cell-phone and wireless network.
Regards
Danish
[ June 10, 2003: Message edited by: Danish Shaukat ]
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What wireless service are you using?
 
Fred Grott
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are using http or https to make the conncetion?
 
Jean De Bulge
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had a similar case... the problem was that the GPRS-Internet gateway server did not allow communication on port 8090... and my tomcat server was listening on that port... Maybe check that with your service provider?
Yours
J.
 
sing
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2) Secondly how much time do you think it should take for the server to send back the response ( a string) to the client when using cell-phone and wireless network.

Just wondering how much time if want to read a video from server and play to the phone. Someone developed similar MIDlet program? Any advice?
Thanks.
steffy
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fred Grott:
are using http or https to make the conncetion?

I thought https is only available under MIDP 2.0, or am I mistaken?
 
sing
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought https is only available under MIDP 2.0, or am I mistaken?

you are right.
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the server show any sign that it received the message?
Have you tried to simplify the problem? Can you just send a message to the server and see it appear without sending a reply?
Just trying to determine exactly (or as close as possible) what the problem is and where it is most likely happening.
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
Sorry folks, i could not answer your questions. Actually the cell-phone is with my co-worker who is in another country.
Anyway i found out that the URL was being truncated( saw the server logs). For this reason the servlet was not running. The cell-phone ( a Samsung one) was truncating the URL. So now i am using Post method instead of Get and it works fine.
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.
Regards
Danish
[ June 25, 2003: Message edited by: Danish Shaukat ]
 
La Vish
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.

Well said,Danish..
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Danish Shaukat:
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.

Reminds me of a favorite quote (thought I don't know who originally said it)...
"In theory there's no difference between theory and practice. But in practice there is."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic