Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Session management in Java ME

From Wiki
Jump to: navigation, search
26 Sep
Article Review by kalki (20090926)

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.

29 Sep
Article Review by Larry101 (20090929)

This article demonstrates how we can perform session management between a Java ME midlet and a servlet through the use of cookies. A code example is provided, showing how the first time a midlet makes a request to a servlet, it generates a cookie consisting of a random number. All future requests by the midlet are accompanied by that cookie, which serves to identify the midlet. The code example shows both the midlet code and the servlet code.

This article covers a useful topic. If a midlet is to communicate with a servlet, it is important that the user of the midlet should only have to login once per session, but that this should not compromise security or usability. The use of cookies helps to address this issue. Cookies are wisely used to get around the problems of stateless HTTP, so it is not surprising to see their use in midlet to servlet communication. The use of cookies can help to identify users, and to keep track of their previous actions, and so introduce some sort of state memory in the stateless environment of HTTP. The code example in this case is nicely written. Perhaps the best thing about this article is that the code is heavily commented. Comments are essential to help readers understand the code, and in this article they are used to very good effect.


Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.