Friday, March 13, 2009

How does an included file in jsp look in the compiled .java file? (JavaUtil)

Question :How does an included file in jsp look in the compiled .java file? (JavaUtil)
Answer :If you are using jsp action include as then
you see the following line of code in the service method of the .java file
(servlet)
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
"a.jsp", out, false);
If you are using directive include as *lt;%@ include file="a.jsp" %> then
you see the following line of code within the static block as
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/a.jsp");
}

No comments: