JSP - How to import classes

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

Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction