Talk:Session management in Java ME
Session management is the most important part of any secure application. MIDlet does this using cookies. When MIDlet first request the servlet, that is server side script that handles incoming request and send response as HTML. So first time Servlet send unique ID to the MIDlet.Whenever MIDlet send second request to the same server,serer look for the Cookies and if found then treat MIDlet as active one and provide resources with minimum time duration.
MIDlet store unique Id in record store.The Code example given in this article is very useful to make secure MIDlet transaction over server and that includes multiple users for same service. Using this article people get to know about session management at server side how to write and store cookie is given with very little but effective code example.