Skip to main content

connecting midlet with the server

5 replies [Last post]
nisha_dh
Offline
Joined: 2010-07-30
Points: 0

hii all,
I want my midlet to connect to remote server, so that i can query the database from the server through the midlet and add the information frm midlet to the server.

Is it possible to use php along with j2me for that purpose??
Or there's any better way???
please help me , with this...
thanx in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nisha_dh
Offline
Joined: 2010-07-30
Points: 0

I got the answr to my question now:)

sfitzjava
Offline
Joined: 2003-06-15
Points: 0

Ok, now that you have the answer maybe you would like to share? :)

Ending a thread with "I found the answer" but without an answer is not too helpful for other newbies that go to google and find the questions they seek but no answers.

Sometimes why it's the right answer for you is good as you may have other goals that affect why it's the right answer to you.

=Shawn

sfitzjava
Offline
Joined: 2003-06-15
Points: 0

See this forum message:
http://forums.java.net/jive/thread.jspa?threadID=72982&tstart=0

Yes PHP can talk to javaME, however there are many things about javaME communications that you must watch out for.
These include:
- Data Chunking (http1.1)
- Missing "content-length" header
- Multiple "user-agent" headers
- Large buffer write timing out connection
- Emulators lie
- You can not make a http connection or socket connection into a phone from a server. Works great in emulators... see previous item.
- Signing midlets for carriers requires verisign cert (stupid restriction)
- Data packets over cellular is slow. (I don't care if you have 4G or HSPA+, don't bloat your data stream) It's really more of a latency issue than a speed issue.
- Your data connection may drop for no reason, or you may not have any connection after several valid request, or you will get some data, but loose information and the client may not realize this.

Oh and if you thought JavaME would be easy, forget it. There is no consistency in device, development SDKs, or good tools (IMHO). Either read a lot, and dive down to the commandline with light use of the WTK or lock-in to some proprietary tool set and hope for the best but don't complain when it fails on most edge cases.

=Shawn

nisha_dh
Offline
Joined: 2010-07-30
Points: 0

Hii Shawn,
Thanx for the reply....I don't have the deep knowledge in the subject of connecting with servers and all..so i want to learn it.
Can you /anyone suggest how to start with ??

nisha_dh
Offline
Joined: 2010-07-30
Points: 0

hii.,
I am so confused, if its better to use JAVA or JSP/servlets to connect to the DB or
PHP to make a connection using JDBC for midlet- server communication????