Target% @in jsp
I always add the following line when I write jsp
-page:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
But what does it mean <%@ %>
in general? I know that we can embed code in jsp using script
<% \\some java code %>
So @taglib
it looks like an annotation being applied to prefix
. Is it correct?
source to share
Its a JSP directive
JSP directives provide guidance and instructions to the container, telling how to handle certain aspects of JSP processing. The JSP directive affects the overall structure of the servlet class. It usually looks like this:
<%@ directive attribute="value" %>
source to share
<%@ >
is a tag for JSP directives , which can be:
-
Page directive <% @page ...%>: defines page specific attributes such as scripting language, error page, and buffering requirements.
-
Include directive <% @include ...%>: Includes the file during the translation phase.
-
Taglib directive <% @taglib ...%>: declares a tag library containing custom actions to be used on the page.
source to share