Java JSB Servlets Question and Answers

25. What is Session Hijacking?
  • If your application is not very secure, then it is possible to get the access of system after acquiring or generating the authentication information.
  • Session hijacking refers to act of taking control of a user session after successfully obtaining or generating an authentication session ID.
  • It involves an attacker using captured, brute forced or reverse engineered session IDs to get a control of a legitimate user's Web application session while that session is still in progress.
Your Name Your Email-ID
Your Answer
26. How do you delete a Cookie within a JSP?
  Cookie mycook = new Cookie ("name" , "value") ;
response.addCookie (mycook) ; ;
Cookie killmycook = new Cookie ("mycook" , "value") ; ;
killmycook.setMaxAge(0) ; ;
killmycook.setpath (" / ") ; ;
killmycook.addCookie (killmycook) ;
Your Name Your Email-ID
Your Answer
27. What is the query used to display all table names in SQL Server (Query analyzer)?
  select * from information_schema.tables.
Your Name Your Email-ID
Your Answer
28. What is session migration?
  • Session Migration is a mechanism of moving the session from one server to another in case of server failure.
  • Session migration can be implemented by
  • Persisting the session into database.
  • Storing the session in memory on multiple servers.
Your Name Your Email-ID
Your Answer

Page 7 of 15