The TaglibExtDevKit sample application includes an extended custom JSP tag, along with a web application in which to test it. Also included in the application is a project that illustrates how to make your custom tag library available to WebLogic Workshop web applications.
The following projects are included in the TaglibExtDevKit application:
The first three of these projects are described in more detail under <tdk:barcode>. The last is described under TaglibInstall Sample.
The <tdk:barcode> tag sample provided with this release illustrates the basics of extending a custom JSP tag library. As described in Developing Tag Library Extensions, you extend a tag library in order to integrate the tag with the WebLogic Workshop IDE.
Note that if you haven't already, you will need to build the sample in order to see it working in the IDE. For more information, see Building and Running the Sample.
The code for this sample (and other extended JSP tags) can be divided into two categories:
The <tdk:barcode> sample illustrates a few basic areas where tag library extensions provide tag integration with WebLogic Workshop. In Design View, the tag displays a barcode representing whatever value you type into the tag's value property attribute.
To illustrate help integration, the <tdk:barcode> sample provides a few placeholder topics that are displayed when the user presses F1. This is typical for custom tags and controls used in WebLogic Workshop.
Note: As installed, these topics don't open in the frameset used by other topics. To enable this, you will need to include several templates that all workshop help files include. For the GA release of WebLogic Platform 8.1, we do not provide these templates, but you are encouraged to look at the source of any of our help files if you would like to reproduce this functionality.
This section describes how to build components of the TaglibExtDevKit sample application so that you can run the TaglibWebProject sample and see the result. You needn't perform these steps in order to merely browse the sample code.
In the Extension Development Kit, the WORK file is located at ExtensionDevKit/TaglibExtDevKit/TaglibExtDevKit.work.
Building the project will compile and package the sources. It will also copy resulting JAR to the workshop/extensions folder where the tab library extensions can be found the IDE, and it will copy the documentation in the project to the correct location in the help hierarchy (workshop/help/doc/en/tldx).
Note that after you rebuild the index, you will only need to rebuild it again if you have either added new help files or modified the toc.xml file.
The Web Project libraries need to be in sync with the version of WebLogic Workshop that is currently running.
demo.jsp should open in a Test Browser. If the test is successful, the browser will display the following text:
SUCCESS: value to encode=value_of_value_attribute
This sample demonstrates how you can write an extension that enables your tag libraries for use in web projects.
To use this sample, use the following steps:
The build target copies an extension jar into workshop's extension folder and a template archive into workshop's template folder.
This copies the files from the template archive into the webapp directory structure.
The logic for this process is captured in TaglibInstall/TDK/TemplateProcessor.java. The processor class must implement com.bea.ide.workspace.project.IProjectTemplateProcessor and be referenced in the template archive's template.xml file (for an example, see TaglibInstall/template/template.xml).
None.