This free J2ME sample program, shows how a J2ME application can do authentication to the backend server. Source code: import javax.microedition.midlet..