aspose file tools*
The moose likes Java Micro Edition and the fly likes how to transfer data from mobile to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to transfer data from mobile to servlet" Watch "how to transfer data from mobile to servlet" New topic
Author

how to transfer data from mobile to servlet

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
hi,
here i am developing a chat prog in j2me...
so i want to know how can i send the data which is typed in mobile... is transfered to servlet.....
and also how can recipint recieve the msg... from the servlet...
plz any body help.....
thanks in advance


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Well there are a few ways.

1) has the Servlet call keeping the session alive until there is a response. (Not really a good way) (Create an HTTPConnection, pass the entered data as a parameter, adding it to the end of the URL String

2) use the SMS messaging API. Not really real time, but like e-mail. But saves connection time, but will probably cost per message by the provider, can be expensive.

3) Use one of the Chat programs already created for Cell Phones (You don't have to recreate anything here).

There are more, but none that I can think of off the top of my head.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
hello sir,
Thaks for ur suggestion but i want to know the address of the site
that where can i found the chat application for mobile... if u know plz send me the link...
thanking u sir,


regards
cinux
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

I did a Google search on "J2ME Chat Program" And got these two links. There are lots more, just do the same search and see what you get.

Chat 1

Chat 2

Good Luck

Mark
saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
hello sir,
i am very much happy for ur reply msg ...thanks for ur reply....


but why i've asked is i just really want to see the interface of the program... thats all i dont want to use other's application...

i want to do it my self... and more over i've completed the interface..for the chat application... just now i am able to connect it .. to the local host server(tomcat)... but i am getting an error msg saying that 402:---bad request
what should i do for this???

the same error occured in the demo prog... which comes with sun one ME 4 and wirless toolkit..

if u have those application's plz refer to demos/http in that choose localhost:8080 from menu...

so plz solve this proble....


thanks in advance...


cinux
saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
sir here is specifically showing my prob...
plz help me ...

the eroor msg


Initializing class:
'com/sun/midp/io/InternalConnector'com.sun.midp.io.kvem.http.Protocol@ea0ef881Exception: java/lang/ClassNotFoundExceptionInitializing class:
'com/sun/cldc/io/NetworkConnectionBase'Initializing class: 'com/sun/cldc/io/j2me/socket/Protocol'Exception: java/lang/ClassNotFoundExceptionException: java/io/IOExceptionException: java/io/IOException
java.io.IOException: Error initializing HTTP tunnel connection:
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Date: Wed, 27 Apr 2005 17:16:29 GMT
Server: Apache-Coyote/1.1
Connection: close


i think u'll surely help me ....




cinux
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to transfer data from mobile to servlet