Forums Register Login

pageContext .include("somefile")

+Pie Number of slices to send: Send
What happens when we say : pageContext.include("somefile") in any normal JSP file, is this statement equivalent to include method of ServletContext, or of <jsp:include>, pls explain...
One more query : what does PageContext represent ? Whats its use ? why PageContext instance is automatically availablein JSp pages ?
+Pie Number of slices to send: Send
Hi Sam,

What happens when we say : pageContext.include("somefile") in any normal JSP file, is this statement equivalent to include method of ServletContext, or of <jsp:include>, pls explain...
-> It is equivalent to <jsp:include page="somefile">. Besides, does not exist a method named include in ServletContext interface...
One more query : what does PageContext represent ? Whats its use ? why PageContext instance is automatically availablein JSp pages ?
-> PageContext is an implicit object that let us access all other implicit objects proggramatically. It is generally used in the development of custom tag libraries.
Regards,
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 673 times.
Similar Threads
What happens to pagecontext when jsp is converted to servlet
Regarding Implicit Objects
Page context encapsulation
FileOutputStream
the difference...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:08:11.