An include directive tells the JSP engine to include the contents of another file (HTML, JSP, etc.) in the current page. This process of including a file is also called as static include.
ye, we can. We do it usually when we need to initialize any members which are to be available for a servlet/JSP throughout its lifetime.
Using errorPage attribute of page directive and also we need to specify isErrorPage=true if the current page is intended to URL redirecting of a JSP.
Define a Class HttpSessionNotifier which implements HttpSessionBindingListener and implement the functionality what you need in valueUnbound() method.
Create an instance of that class and put that instance in HttpSession.
Yes , of course you can use the constructor instead of init(). Thereâ€™s nothing to stop you. But you shouldnâ€™t. The original reason for init() was that ancient versions of Java couldnâ€™t dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig. That no longer applies, but servlet containers still will only call your no-arg constructor. So you wonâ€™t have access to a ServletConfig or ServletContext.
Opendir():- It opens the directory. This function returns a directory stream on success and FALSE and an error on failure.
Context is a set of options that can modify the behavior of a stream
Example: opens sample directory.
$dir = opendir("directory");
Readdir(): It returns an entry from a directory handle opened by opendir().
$file = readdir($dir);
A null pointer does not point to any object.
NULL and 0 are interchangeable in pointer contexts.Usage of NULL should be considered a gentle reminder that a pointer is involved.
It is only in pointer contexts that NULL and 0 are equivalent. NULL should not be used when another kind of 0 is required.
Previously, in ASP.NET, the pages and the code used to be compiled dynamically and then cached so as to make the requests to access the page extremely efficient. In ASP.NET 2.0, the pre-compilation feature is used with which an entire site is precompiled before it is made available to users.
There is a pre-defined folder structure for enabling the pre-compilation feature:
Custom controls are user defined controls. They can be created by grouping existing controls, by deriving the control from System.Web.UI.WebControls.WebControl or by enhancing the functionality of any other custom control. Custom controls are complied into DLLâ€™s and thus can be referenced by as any other web server control.
Basic steps to create a Custom control:
It's a way in CLR to maintain a boundary between various applications to ensure that they do not interfere in working of any other application. CLR acts as a mini operating system where a single process may have various application domains.