|
1. What is JSP technology? Java Server Page is a standard Java extension that is defined on top of the servlet Extensions. The goal of JSP is the simplified creation and management of dynamic Web pages. JSPs are secure, platform-independent, and best of all, make use of Java as a server-side scripting language. 2. What is JSP page? A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format such as HTML, SVG, WML, and XML, and JSP elements, which construct dynamic content. 3. What are the two kinds of comments in JSP and what's the difference between them. <%– JSP Comment –%> <!– HTML Comment –> 4.What is the difference between ServletContext and PageContext Answer: ServletContext: Gives the information about the container. PageContext: Gives the information about the Request 5. What is the difference between RequestDispatcher and sendRedirect Answer: RequestDispatcher: server-side redirect with request and response objects. sendRedirect : Client-side redirect with new request and response objects. 6. How to pass information from JSP to included JSP Answer: Using <%jsp:param> tag. 7. Can we implement an interface in a JSP Answer: No 8. The code in a finally clause will never fail to execute, right? Using System.exit(1); in try block will not allow finally code to execute. 9. What information is needed to create a TCP Socket? The Local Systems IP Address and Port Number. And the Remote System’s IPAddress and Port Number. 10. What Class.forName will do while loading drivers? It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.
|