What is HTTP Session in Servlets

Session tracking in Servlets is done by using Interface HttpSession. It helps to identify a client throughout many page requests or visiting a website and to store details about that client. One of the recommended approaches is HTTP session. A request is being identified by the session which is originated from similar browser during the … Read more

Why we are used setMaxAge() and getMaxAge() in Cookies

Gets/sets how much time (in seconds) should elapse before the cookie expires. If you don’t set this, the cookie will last only for the current session (i.e. until the user quits the browser), and will not be stored on disk. In Java, specifically in the context of web development using servlets or JSP (JavaServer Pages), … Read more

What is Cookies and what is the use of Cookies

A “cookie” is a small piece of information sent by a web server to store on a web browser so it can later be read back from that browser. This is useful for having the browser remember some specific information. to create a temporary session where the site in some way “remembers in the short term” what … Read more

When init() and Distroy() will be called

init() is called whenever the servlet is loaded for the first time into the webserver.it performs certain one time activities which are required during the lifetime of the servlet.It may be some initialisation of variables or a database connection. Destroy will be called whenever the servlet is removed from the webserver. Various resources which are … Read more

What is use of parseQueryString

Parses a query string and builds a hashtable of key-value pairs, where the values are arrays of strings. The query string should have the form of a string packaged by the GET or POST  method. In Advanced Java, particularly in the context of web development using technologies like Servlets or JavaServer Pages (JSP), the parseQueryString … Read more