1) What is JSP?
It is a technology which is used to create web application like Servlet technology.
It provides more functionality than Servlet.
It consists of HTML and JSP tags.
2) What are the advantages of JSP over Servlet ?
Advantages of JSP over Servlet are:
- It is easy to maintain
- Extension to Servlet technology
- The code is less in JSP than Servlet
- There is no need to recompile and redeploy in JSP
3) What are the JSP implicit objects ?
JSP implicit objects:
- out
- request
- response
- config
- application
- session
- pageContext
- page
- exception
4) What are the JSP lifecycle phases?
JSP lifecycle phases are:
- Translation
- Compilation
- Classloading
- Instantiation
- Initialization
- Request Processing
- Destroy
5) What are the types of JSTL tags?
There are Five types of JSTL tags:
- Core tags
- Formatting tags
- Function tags
- XML tags
- SQL tags
6) What are the types of JSP Scripting elements?
JSP scripting elements :
- Scriptlet tag
- Expression tag
- Declaration tag
7) What are the attributes of JSP page directives?
Attributes of JSP page directives are:
- import
- contentType
- extends
- info
- buffer
- language
- isELIgnored
- isThreadSafe
- autoFlush
- session
- pageEncoding
- errorPage
- isErrorPage
8) What are the types of JSP actions?
There are six types of JSP actions:
<jsp:include>
<jsp:forward>
<jsp:plugin>
<jsp:usebean>
<jsp:setProperty>
<jsp:getProperty>
9) What is the use of import attribute in JSP?
It is used to import class, interfaces and several packages.
Example of import:
<html>
<body>
<%@ page import="java.util.Date" %>
Today is: <%= new Date() %>
</body>
</html>
10) What is the use of info attribute in JSP?
It is used to set the information of the JSP page.
This information is retrieved later by using
getServletInfo() method.
Example of info:
<html>
<body>
<%@ page info="Example made by TutorialandExample " %>
Today is: <%= new java.util.Date() %>
</body>
</html>
11) How can we pass the information from one JSP to another JSP page?
The tag
<jsp:param> is used to pass information from one JSP to another JSP page.
12) What are the various scope values of <jsp:useBean> tag?
Scope values of
<jsp:useBean> tag are:
- application
- request
- page
- session
13) What are the ways to include the result of another page?
There are two ways to include the result of another page are:
- By the use of include directive
- By the use of include action
14) Which directive is used in JSP custom tag?
The JSP taglib directive is used in JSP custom tag.
15) What are the tags used in JSP bean development?
There are three types of tags used in bean development are:
- jsp:useBean
- jsp:setProperty
- jsp:getProperty