The import attribute is used to import all the classes in a java package into the current JSP page. With this facility, the JSP page can use other java classes.
Syntax of import attribute available for page directive isĀ
<%@ page import = “java.util.*” %>
In the above statement page and import are keywords.
If there are many Java packages that the JSP page wants to import, the programmer can use import more than once in a JSP page or separate the Java packages with commas, as shown below:
<%@ page import=”{package.class | package.*}, …” %>