|
The Package Tool helps in building an archive of taglib components. The archive consists of Tag classes, other classes and the XML Tag Library Descriptor file.
The Tag Library Descriptor (TLD) file describes a tag library. A JSP container uses the TLD for a tag library, to interpret pages that include taglib directives referring to that tag library. The TLD is also used by JSP page authoring tools that will generate JSP pages that use a library, and by authors who do the same manually.
Tools > Package > Taglib > New
A dialog box pops up where the name of the Taglib is to be given. The Taglibs get saved under the specified JAR node in the Desk. Clicking on OK creates a new Taglib JAR.
The following details can be edited under the Details section:
There are two ways of storing the taglib created and using them in a JSP:
The first method is recommended, as using the given structure requires no changes to be made while packaging the WAR. To know more about the second method, read the section on Packaging Web Components.
Tools > Package > Taglib Name > Right Click > Add Tag
Select the Tag to be added to the Taglib and click on OK. This adds the Tag to the Taglib and the details can subsequently be viewed in the Tag node.
Selecting the Tag name displays the details on the right hand side of the window. The following details of the tag are displayed here. These details are not editable:
Add and Remove the attributes that the tag requires to the taglib descriptor file. Set the following sub-elements of the attribute here:
To delete a tag that has been added to the taglib JAR, click on Delete. After adding all the tags in the taglib JAR, assemble the taglib JAR into a WAR file.
Taglib file on the Desk> Right Click > Update
Updates the taglib, static content like HTML, images and all classes. If the package names of the above are changed, then the changed components are not updated. Files like HTML, and images are stored with their absolute paths and therefore may not be located if they have been moved from their original location.
These files that are stored with their absolute paths, may not be located if they have been moved from their original location.
A log of update operations is available on the Update Tab in the Output area of Studio. This log shows normal messages in black, updating messages in green and any failures or errors in red. Usually a remedial measure is also provided in the case of errors. A progress bar indicates the progress of the operation.
A time stamp based update is used to update the taglibs, which makes the updating faster in most scenarios. Choosing Update brings up a dialog box with a progress bar. All the updating messages are displayed here. To stop updating the taglib, click on Cancel. Studio in the meantime can be used as usual but the taglib file being updated cannot be opened.
Tools > Package > Taglib > Save
Saves the open Taglib.
Tools > Package > Taglib > Close
This command closes the current Taglib. The Taglib is saved before closing.
Tools > Package > Taglib > Revert
The Taglib can be restored to its last saved state.
The META-INF/taglib.tld file corresponding to the Taglib JAR can be viewed in the XML node.
| Pramati Technologies © Copyright |
|