1. How to create a Thread safe JSP page?
Ans: Theoretically, JSP pages can be indicated as threadsafe via the
2. How to catch RunTimeException in JSP?
Ans: http://www.tutorialspoint.com/jsp/jsp_exception_handling.htm
2. What is the difference between request.getSession() and request.getSession(true)?
Ans: There is no difference at all.
3. Why we don't define constructor in servlets?
Ans: 1. HttpServlet is a dynamically loaded class so any argument can't be passed in the constructor.
2. Servlet is an interface, we can't define a constructor for that.
Ans: Theoretically, JSP pages can be indicated as threadsafe via the
isThreadSafe
page directive attribute2. How to catch RunTimeException in JSP?
Ans: http://www.tutorialspoint.com/jsp/jsp_exception_handling.htm
2. What is the difference between request.getSession() and request.getSession(true)?
Ans: There is no difference at all.
3. Why we don't define constructor in servlets?
Ans: 1. HttpServlet is a dynamically loaded class so any argument can't be passed in the constructor.
2. Servlet is an interface, we can't define a constructor for that.