1.

What are the options in JSP to include files?

Answer»

In JSP, we can perform inclusion in the following ways −

  • By include directive − For example −

<% include file = ”header.jsp” %>
  • By include action − For example −

<% include file = ”header.jsp” %>
  • By using pageContext implicit object For example −

<% pageContext.include(“/header.jsp”); %>
  • By using RequestDispatcher object − For example −

<% RequestDispatcher rd = request.getRequestDispatcher(“/header.jsp”); Rd.include(request,response);%>


Discussion

No Comment Found