...">

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?

+3


source to share


3 answers


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" %>

      

+4


source


<%@ >

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.

+1


source


This is a JSP directive. JSP directives are messages that tell the web container how to translate the JSP page into the appropriate servlet. The taglib directive is one of the JSP directives. The taglib JSP directive is used to define a tag library that defines many tags.

0


source







All Articles