Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Tag file deployed in a JAR?

 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As we know If the tag file is deployed in a JAR, there must be a TLD for the tag file.
can Some body give me one example please ?
AR
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Taken from here :
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its also help full



We have a tag file packaged in a JAR file in the /WEB-INF/lib directory. The path to the tag file inside the JAR is /META-INF/tags/myTag.tag.

<taglib xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_1.xsd" version="2.1">

<tlib-version>1.0</tlib-version>

<short-name>Hello</short-name>

<uri>http://com.sap.testExample/HelloSimpleTagFile</uri>;

<tag-file>

<name>myTag</name>

<path>/META-INF/tags/myTag.tag</path>

</tag-file>

</taglib>




You create a JSP page, example.jsp, to use the tag and import the TLD. We can use one of the following ways:

● If you explicitly describe the tag files in a TLD, you use the uri attribute of the taglib directive to import the tags.

<%@ taglib prefix="my" uri=" http://com.sap.testExample/HelloSimpleTagFile " %>


● If you do not describe the tags in a TLD, you use the tagdir attribute of the taglib directive to import the tags.

<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>


To invoke the tag and specify its attributes:

<my:myTag bgcolor="#FF0000" title="myTable"/>



Goutam
SCJP 1.4 (86%)
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic