Difference between JSP include directive and JSP include action.

Explain the difference between JSP include directive and JSP include action.

When a JSP include directive is used, the included file's code is added into the added JSP page at page translation time. This happens before the JSP page is translated into a servlet.

However, if any page is included using the action tag, the output of the page is returned back to the added page which happens at runtime.

What is the difference between <jsp:include> and '<%@include:>'?

Both are used to insert files into a JSP page.

<%@include:> statically inserts the file at the time the JSP page is translated into a servlet.
<jsp:include> dynamically inserts the file at the time the page is requested.

Explain how to include static files within a JSP page?

<jsp:include>
Static resources should always be included using the JSP include directive. Using this, the inclusion is performed just once during the translation phase.
JSP Declaration - What is a Declaration?
JSP Declaration - A declaration consists of one or more variables or methods that are used in JSP source file....
Explain how to use JavaBeans components (beans) from a JSP page
The JSP specification includes standard tags for bean use and manipulation..
What is the jspInit() method?
The jspInit() method of the javax.servlet.jsp. JspPage interface is similar to the init() method of servlets..
Post your comment