com.ecyrd.jspwiki.tags |
Provides standard JSP tags for JSPWiki.
Package specification
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
in 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 {@link javax.servlet.jsp.tagext.TryCatchFinally}
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 {@link com.ecyrd.jspwiki.tags.IteratorTag} and {@link com.ecyrd.jspwiki.tags.WikiTagBase}
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!
Related documentation
TBD.
|
Java Source File Name | Type | Comment |
AdminBeanIteratorInfo.java | Class | |
AdminBeanIteratorTag.java | Class | |
AttachmentsIteratorInfo.java | Class | Just provides the TEI data for AttachmentsIteratorTag. |
AttachmentsIteratorTag.java | Class | Iterates through the list of attachments one has.
Attributes
- page - Page name to refer to.
|
AuthorTag.java | Class | Writes the author name of the current page, including a link to that page,
if that page exists. |
BaseURLTag.java | Class | Writes the jspwiki.baseURL property. |
BreadcrumbsTag.java | Class | Implement a "breadcrumb" (most recently visited) trail. |
CalendarTag.java | Class | Provides a nice calendar. |
CheckLockInfo.java | Class | |
CheckLockTag.java | Class | |
CheckRequestContextTag.java | Class | Includes body, if the request context matches. |
CheckVersionTag.java | Class | Does a version check on the page. |
CommentLinkTag.java | Class | Writes a comment link. |
ContentEncodingTag.java | Class | Returns the app name. |
ContentTag.java | Class | Is used as a "super include" tag, which can include the proper context
based on the wikicontext. |
CookieTag.java | Class | Sets or gets Cookie values. |
DiffLinkTag.java | Class | Writes a diff link. |
EditLinkTag.java | Class | Writes an edit link. |
EditorIteratorInfo.java | Class | Just provides the TEI data for EditorIteratorTag. |
EditorIteratorTag.java | Class | Iterates through editors. |
EditorTag.java | Class | Creates an editor component with all the necessary parts
to get it working. |
FeedDiscoveryTag.java | Class | Outputs links to all the site feeds and APIs this Wiki/blog supports. |
HasAttachmentsTag.java | Class | Includes body if page has attachments. |
HistoryIteratorInfo.java | Class | Just provides the TEI data for HistoryIteratorTag. |
HistoryIteratorTag.java | Class | Iterates through tags.
Attributes
- page - Page name to refer to.
|
IfNoSearchResultsTag.java | Class | If there have been no search results, then outputs the body text. |
IncludeResourcesTag.java | Class | This tag is used to include any programmatic includes into the
output stream. |
IncludeTag.java | Class | Includes an another JSP page, making sure that we actually pass
the WikiContext correctly. |
InsertDiffTag.java | Class | Writes difference between two pages using a HTML table. |
InsertPageTag.java | Class | Renders WikiPage content. |
IteratorTag.java | Class | Iterates through tags. |
LinkTag.java | Class | Provides a generic link tag for all kinds of linking
purposes. |
LinkToParentTag.java | Class | Writes a link to a parent of a Wiki page.
Attributes
- page - Page name to refer to.
|
LinkToTag.java | Class | Writes a link to a Wiki page. |
MessagesTag.java | Class | Returns or clears the current messages associated with the user's wiki
session. |
NextVersionTag.java | Class | Writes the version number of the next version of the page. |
NoSuchPageTag.java | Class | Includes the body in case there is no such page available. |
PageDateTag.java | Class | Writes the modification date of the page, formatted
as specified in the attribute "format". |
PageExistsTag.java | Class | Includes the body in case the set page does exist. |
PageInfoLinkTag.java | Class | Writes a link to the Wiki PageInfo. |
PageNameTag.java | Class | Returns the currently requested page name. |
PageSizeTag.java | Class | Returns the currently requested page or attachment size. |
PageTypeTag.java | Class | Includes the body, if the current page is of proper type. |
PageVersionTag.java | Class | Writes the version of the current page. |
ParamHandler.java | Interface | Interface to be implemented by any tag that wishes to contain
a wiki:param tag for passing dynamic name-value pairs. |
ParamTag.java | Class | ParamTag submits name-value pairs to the first enclosing
ParamHandler instance. |
ParentPageNameTag.java | Class | Returns the parent of the currently requested page. |
PermissionTag.java | Class | Tells whether the user in the current wiki context possesses a particular
permission. |
PluginTag.java | Class | Inserts any Wiki plugin. |
PreviousVersionTag.java | Class | Outputs the version number of the previous version of this page. |
RequestResourceTag.java | Class | Provides easy access to TemplateManager.addResourceRequest(). |
RSSCoffeeCupLinkTag.java | Class | Writes an image link to the RSS file with the Coffee Cup
for Userland aggregation. |
RSSImageLinkTag.java | Class | Writes an image link to the RSS file. |
RSSLinkTag.java | Class | Writes a link to the RSS file (using the "link" attribute). |
SearchResultIteratorInfo.java | Class | Just provides the TEI data for IteratorTag. |
SearchResultIteratorTag.java | Class | Iterates through Search result results. |
SearchResultsSizeTag.java | Class | Outputs the size of the search results list, if it contains any items. |
SearchResultsTag.java | Class | Includes the body content, if there are any search results. |
SetPaginationTag.java | Class | Calculate pagination string. |
TabbedSectionTag.java | Class | Generates tabbed page section: container for the Tab tag.
Works together with the tabbedSection javacript.
Attributes
- defaultTab - Page name to refer to.
|
TabTag.java | Class | Generates single tabbed page layout.
Works together with the tabbedSection javascript. |
TemplateDirTag.java | Class | Returns the currently used template. |
TranslateTag.java | Class | Converts the body text into HTML content. |
UploadLinkTag.java | Class | Writes a link to the upload page. |
UserCheckTag.java | Class | Includes the content if an user check validates. |
UserNameTag.java | Class | Returns the current user name, or empty, if the user has not been
validated. |
UserProfileTag.java | Class |
Returns user profile attributes, or empty strings if the user has not been
validated. |
VariableTag.java | Class | Returns the value of an Wiki variable.
Attributes
- var - Name of the variable.
|
WikiBodyTag.java | Class | This is a class that provides the same services as the WikiTagBase, but this time it
works for the BodyTagSupport base class. |
WikiLinkTag.java | Class | Root class for different internal wiki links. |
WikiTagBase.java | Class | Base class for JSPWiki tags. |