This package contains a diverse set of JSP tags which are used in the template pages.
Managing tag pooling
A typical problem for many tag developers is that many web containers pool tags, i.e. the tag is not released after doEndTag(), but put into a pool, from which it can be invoked again. This is highly efficient, as you don't need to instantiate the tag again.
The problem, however, is that when your tag is put back into the pool, it still retains all the internal references, i.e. none of the member fields are cleared. This means there can be dangling references to things which will take a lot of memory. In JSPWiki's case, the WikiContext is a good example: it can actually contain quite a lot of stuff accumulated during it's life time, and therefore it's important for memory use that all references are cleared.
Unfortunately, the "easy" solution of implementing your custom release handler
Tag.release() does not help, since it is called only when the tag
is truly and completely released from the pool. So, as long as the tag sits
in the pool, release() is not called, and your references keep on dangling like wet
spaghetti off the balcony.
Neither can you trust e.g. doEndTag() being called every time, since e.g. if there is an exception, doEndTag() is never called.
The correct way to do reference cleaning is to implement the
interface, where the
doFinally() method is called every time the tag
has been finished with and prior to it being put back into the pool. Most JSPWiki
base tag classes
implement the TryCatchFinally
interface, which means that any class subclassed from them also allows has those methods.
Check out the javadocs for the tags for more info!
Interface Summary Interface Description ParamHandlerInterface to be implemented by any tag that wishes to contain a wiki:param tag for passing dynamic name-value pairs.
Class Summary Class Description AdminBeanIteratorInfoJust provides iteration support for AdminBeanIteratorTag AdminBeanIteratorTagProvides an iterator for all AdminBeans of a given type. AttachmentsIteratorInfoJust provides the TEI data for AttachmentsIteratorTag. AttachmentsIteratorTagIterates through the list of attachments one has. AuthorTagWrites the author name of the current page, including a link to that page, if that page exists. BaseURLTagWrites the jspwiki baseURL. BreadcrumbsTagImplement a "breadcrumb" (most recently visited) trail. BreadcrumbsTag.FixedQueueExtends the LinkedList class to provide a fixed-size queue implementation CalendarTagProvides a nice calendar. CheckLockInfoA companion to CheckLogTag. CheckLockTagChecks whether the page is locked for editing. CheckRequestContextTagIncludes body, if the request context matches. CheckVersionTagDoes a version check on the page. CommentLinkTagWrites a comment link. ContentEncodingTagReturns the app name. ContentTagIs used as a "super include" tag, which can include the proper context based on the wikicontext. CookieTagSets or gets Cookie values. DiffLinkTagWrites a diff link. EditLinkTagWrites an edit link. EditorIteratorInfoJust provides the TEI data for EditorIteratorTag. EditorIteratorTagIterates through editors. EditorTagCreates an editor component with all the necessary parts to get it working. FeedDiscoveryTagOutputs links to all the site feeds and APIs this Wiki/blog supports. HasAttachmentsTagIncludes body if page has attachments. HistoryIteratorInfoJust provides the TEI data for HistoryIteratorTag. HistoryIteratorTagIterates through tags. IfNoSearchResultsTagIf there have been no search results, then outputs the body text. IncludeResourcesTagThis tag is used to include any programmatic includes into the output stream. IncludeTagIncludes an another JSP page, making sure that we actually pass the WikiContext correctly. InsertDiffTagWrites difference between two pages using a HTML table. InsertPageTagRenders WikiPage content. IteratorTagIterates through tags. LinkTagProvides a generic link tag for all kinds of linking purposes. LinkToParentTagWrites a link to a parent of a Wiki page. LinkToTagWrites a link to a Wiki page. MessagesTagReturns or clears the current messages associated with the user's wiki session. NextVersionTagWrites the version number of the next version of the page. NoSuchPageTagIncludes the body in case there is no such page available. PageDateTagWrites the modification date of the page, formatted as specified in the attribute "format". PageExistsTagIncludes the body in case the set page does exist. PageInfoLinkTagWrites a link to the Wiki PageInfo. PageNameTagReturns the currently requested page name. PageSizeTagReturns the currently requested page or attachment size. PageTypeTagIncludes the body, if the current page is of proper type. PageVersionTagWrites the version of the current page. ParamTagParamTag submits name-value pairs to the first enclosing ParamHandler instance. ParentPageNameTagReturns the parent of the currently requested page. PermissionTagTells whether the user in the current wiki context possesses a particular permission. PluginTagInserts any Wiki plugin. PreviousVersionTagOutputs the version number of the previous version of this page. RequestResourceTagProvides easy access to TemplateManager.addResourceRequest(). RSSImageLinkTagWrites an image link to a JSPWiki RSS file. SearchResultIteratorInfoJust provides the TEI data for IteratorTag. SearchResultIteratorTagIterates through Search result results. SearchResultsSizeTagOutputs the size of the search results list, if it contains any items. SearchResultsTagIncludes the body content, if there are any search results. SetPaginationTagCalculate pagination string. SpamFilterInputsTagProvides hidden input fields which are checked by the
TabbedSectionTagGenerates tabbed page section: container for the Tab tag. TabTagGenerates single tabbed page layout. TemplateDirTagReturns the currently used template. TranslateTagConverts the body text into HTML content. UploadLinkTagWrites a link to the upload page. UserCheckTagIncludes the content if an user check validates. UserNameTagReturns the current user name, or empty, if the user has not been validated. UserProfileTagReturns user profile attributes, or empty strings if the user has not been validated. VariableTagReturns the value of an Wiki variable. WikiBodyTagThis is a class that provides the same services as the WikiTagBase, but this time it works for the BodyTagSupport base class. WikiLinkTagRoot class for different internal wiki links. WikiTagBaseBase class for JSPWiki tags.