Clicky

How to import classes in JSPs

December 30, 2010

To import one class to your jsp file :

<%@
    page import="java.util.List;”
%>
hello

To import more than one using a short sintaxe:

<%@
    page import="java.util.List,java.util.ArrayList;”
%>
hello

To import more than one using in a more readable way:

<%@
    page import="java.util.List”
%>
<%@
    page import="java.util.ArrayList”
%>
hello