Hi all, I have just started learning JSP and have some Qs.They may be very basic but I am confused,so please help me 1.What is the functional impact on the session when dial-up connection dropped between the requests but quickly reconnects(within few seconds)? 2.ServletRequest interface has a method getRemoteHost(),why can't we use the simple IP address to identify a perticular client? Thanks all, Tejal
hi shah! Answers to ur questions: 1.if u close ur browser and open it again ur session gets expired.otherwise there will be no impact on session.it also depends on the expiry date of the cookie. 2.ur idea is very good,but think what if i am connected to a proxy server.for eg.if i am connected to a proxy server,users are shopping and their selected items are stored in a session,when we r retrieving the items they get replaced since it is the same IP address for all the clients. hope u find this information useful. thanks preethi
1) Your session terminates only when your browser is terminated or if you have specified a specific time for your session cookie. But according to me If your connection fails or a few seconds it won't matter as the session will be the same. 2) In this case you are trying to hard code an IP address whereas different client have different IP addresses.
Joined: Jun 02, 2000
Thanks Preethi and Nitin.It really helped one more qs. which session management technique requires minimal amount of code if we can control the clent(browser) configuration? Thanx Tejal
Hi Shah, HttpSession session management technique is very easy to implement and it requires a minimal amount of a code. Try to implement this in ur project
Joined: Oct 24, 2000
Hi Teajl, When dealing with small sets of public data using cookies or URL rewriting is accepatable. when dealing with private and large amounts of data preffered method is to use HttpSession object.so by sending small amount of data to the client u can associate each user with large amount of data on the server. Good Luck Preethi