I m totally new to the environment.please guide me how to create a session for user and how to pass the objects to next servlet. for ex i have 4 servlet pages like login.jsp,insert.jsp,update.jsp,delete.jsp. a user should be able to access these pages only after loging in successfully . i have completed the login page,insert page ,update page and they are working proprly. i m running this web app in tomcat with a user database.
HttpSession session object and Request Dispatcher for forwarding to your insert ,update.....
Joined: Oct 11, 2012
I m really glad to see the reply soon. vinnu i have my web app ready with database connectivity.it is a ticketing tool. all mmodules are working fine. no need of forwarding pages. i have set frames after logging in. so i have refference link to get the pages in next frame. all i want to do is to create session to users.
As soon as you login you just generate one query string and append to all URL's and put this into session with some attribute. In each and every page get the query string and check whether the query string is there in the session. After logout you just invalidate the session object. So in each page just add the code to check whether session is null, if not check for query string in session and from request url are same.Otherwise just redirect to Login page if fails above condition.