Skip to main content

J2ME Webserver Implementation

3 replies [Last post]
Joined: 2010-08-15

Dear All

The concept of Client/Server Architecture using J2ME is usually implmented wherein J2ME app acts as a client and connects to a webserver over http.

I need help in getting Client/Server Architecture implemented using J2ME such that J2ME app acts as a webserver and can generate requests to get the elements of DM tree inside the mobile phone.

The J2ME app should assign itself an IP and acts as external webserver but in reality resides inside the phone i.e. we need to simulate client server communication inside the phone instead over http.

Thanks in anticipation.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-04-23

well i really like your J2MGE concept of Client/Server Architecture its really a great app nice.
Silver Springs Locksmith

Joined: 2003-06-15

Well here is your problem. What you want to do has all the characteristics of virus, or malware. I'm not saying it is, just that from a security management point of view it looks fishy.
JavaME is designed with security to the user in mind, and pain & suffering for developers. :D

So you can do this by setting up a ServerSocketConnection using the GCF as you would for HTTP, but using the url format of "socket://
". Most JavaME JVM's will not support this unless you have a signed app, and usually that being an operator signature (ie. the phone service provider [att,sprint,tmobile,etc])

Then you only need to write your client app to go against a
and you will be able to connect to your webserver.

Now this is a bad idea from a performance standpoint as you will have to run both applications at the same time, sucking up 2x the CPU, and most likely turning the phone into a pocket warmer. So only devices supporting background support and the JTWI standard are going to be able to run your software.

Sprint tried something like this using a OSGi implementation called "titan" I think. It didn't go far, as I only remember 1 device that supported it, and I don't know that it ever made it to market.

Honestly if you want to have some type of messaging service take a look at It is much lighter, much faster, much more secure design, unless you want inter-process communication, in which case you should look into CHAPI.

Good luck

Joined: 2010-08-15


Thanks a ton shawn for showing a bright light in darkness!!! Can you plz share your email ID?

Thanks in anticipation.