Page of the JSP Interview Questions.Question: What is JSP Custom tags?
Question: What is JSP?
Answer: JavaServer Pages (JSP) technology is the Java platform technology for delivering dynamic content to web clients in a portable, secure and well-defined way. The JavaServer Pages specification extends the Java Servlet API to provide web application developers
Question: What is the role of JSP in MVC Model?
Answer: JSP is mostly used to develop the user interface, It plays are role of View in the MVC Model.
Question: What do you understand by context
Answer: The context-param element contains the declaration of a web application's servlet context initialization parameters.
The Context Parameters page lets you manage parameters that are accessed through the ServletContext.getInitParameterNames and ServletContext.getInitParameter methods.
Question: Can you extend JSP technology?
Answer: JSP technology lets the programmer to extend the jsp to make the programming more easier. JSP can be extended and custom actions and tag libraries can be developed.
Question: What do you understand by JSP
Answer: JSP translators generate standard Java code for a JSP page implementation class. This class is essentially a servlet class wrapped with features for JSP functionality.
Question: What you can stop the browser to cash
Answer: Instead of deleting a cache, you can force the browser not to catch the page.
//response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
put the above code in your page.
Question: What you will handle the runtime
exception in your jsp page?
Answer: The errorPage attribute of the page directive can be used to catch run-time exceptions automatically and then forwarded to an error processing page.
<%@ page errorPage="customerror.jsp" %>
above code forwards the request to "customerror.jsp" page if an uncaught exception is encountered during request processing. Within "customerror.jsp", you must indicate that it is an error-processing page, via the directive: <%@ page isErrorPage="true" %>.
Liked it! Share this Tutorial