Deploying Custom Adaptive Tags
To deploy custom adaptive tags, follow these steps.
- Navigate to PORTAL_HOME\settings\portal and open CustomTags.xml
in a text editor (you might need to make the file writeable).
- Find the <AppLibFiles> tag and add a new entry using
the name of the .jar/.dll file used to define the custom tag library
(e.g., mytags).
<AppLibFiles>
<libfile name="sampletags"/>
</AppLibFiles>
- Add the custom implementation (.jar/.dll) to the portal
hierarchy:
- Java: Copy the custom .jar file to PORTAL_HOME\lib\java and
add it to the portal.war file in PORTAL_HOME\webapp. (You must stop
the portal while modifying portal.war because it will be locked while
the portal is running.)
- .NET: Copy the custom .dll file to PORTAL_HOME\webapp\portal\bin.
- Run a clean build of the portal to refresh all the jar
files associated with the portal.
- Once you have deployed your code, create a portlet that
contains the tag. Custom Adaptive Tags must either include the correct
XML namespace or be contained within another tag that does. The simplest
way is to put the HTML inside a span. Custom adaptive tags must use
the pt:libraryname.tagname and pt:attributename format. The sample
code below references the custom tag from Creating Custom Adaptive Tags.
<span xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'>
<pt:sample.hellolocation pt:message="Hello" pt:location="San Francisco"/>
</span>
- Add the portlet to a portal page and view the page. Test
all custom tags.