Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I am new to JSP , what is <%@ taglib ?  RSS feed

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JSp AND was wondering what this does:

<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

in this page

 
Luke Zechariah
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taglib is a directive. In fact there are 3 kinds of directives for JSPs

• include directive

• taglib directive

• page directive

It is used in EL, JSTL and Custom Tags and is used to avoid scripting on Jsps. Read the Head First JSP and Servlets book if possible.

Thanks,
Luke.

("Yes He Lives")
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That particular declaration enables the use of the JSTL core function on the page.

Those references are the ones that start with ${fn:
 
Mohan Mehra
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its a page directive. whatever you write in it shows at the top line of the file.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rajshekar mehra wrote:its a page directive. whatever you write in it shows at the top line of the file.

No, this does not cause anything to "show". It's as I already described.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!