29 December 2020

Session

Session

  • By calling invalidate() method on session object, we can destroy the session.

Cookies

  • You can use HTTP cookies to store information. Cookies will be stored at browser side.

URL rewriting:

  • With this method, the information is carried through URL as request parameters. 
  • In general added parameter will be sessionid, userid. 

HttpSession:

  • Using HttpSession, we can store information at server side. 
  • HttpSession provides methods to handle session related information.

Hidden form fields:

  • By using hidden form fields we can insert information in the webpages and this information will be sent to the server. 
  • These fields are not visible directly to the user, but can be viewed using view source option from the browsers. 
  • <context:component-scan> and <mvc:annotation-driven />
  • Add the <context:component-scan> and <mvc:annotation-driven /> tags to the Spring configuration file.
  • <context:component-scan> activates the annotations and scans the packages to find and register beans within the application context. 
  • <mvc:annotation-driven/> adds support for reading and writing JSON/XML 

No comments:

Post a Comment

Most views on this month