Tag library reference for the following tag libraries:
JSTL-compatible tag library to handle common security tasks.
Namespace definition: xmlns:security="http://randomcoder.org/tags-security"
Tags
Required attributes are marked with a*
Processes the body if and only if the current user has the given role.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| role* | Role name required to display body content. | String |
Processes the body if a valid user is logged in.
Can contain:JSP
This tag has no attributes.
Processes the body if and only if the current user does not have the given role.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| role* | Role name not allowed to display body content. | String |
Processes the body if a valid user is not logged in.
Can contain:JSP
This tag has no attributes.
EL formatting functions.
Namespace definition: xmlns:rcfmt="http://randomcoder.org/tags-format"
EL Functions
Required attributes are marked with a*
Function class: org.randomcoder.taglibs.functions.FormatElFunctions
Function signature: java.lang.String shorten(java.lang.String,int)
Shorten a name to a maximum length and add ellipses if necessary
JSP 2.0 implementation of common UI components.
Namespace definition: xmlns:ui="http://randomcoder.org/tags-ui"
Tags
Required attributes are marked with a*
Renders an XHTML Calendar control.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| capitalizeDays | If true, day captions will be capitalized. | boolean |
| maxWeekdayLength | Sets the maximum length of the weekday captions. | int |
| selectedClass | Sets the CSS class name to apply to the selected date's cell. | String |
| selectedDate | Date to display as selected. | java.util.Date |
| showDate | Date to display calendar for (defaults to today). | java.util.Date |
| tableClass | Sets the CSS class name to apply to the calendar table. | String |
| tableId | Sets the CSS ID to apply to the calendar table. | String |
| todayClass | Sets the CSS class name to apply to the today's date cell. | String |
| weekendClass | Sets the CSS class name to apply to the weekend date cells. | String |
Sets parameters for one or all calendar days.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| day | Day of month (1-31), not specified means set defaults. | int |
| dayClass | Sets the CSS class name to apply to this day cell. | String |
| dayId | Sets the CSS id to apply to this day cell. | String |
| dayParam | Sets the name of the parameter to encode day into. | String |
| encodeLink | Sets whether to encode month, day, year into URL (defaults to true). | String |
| link | Sets the URL to display for this day. | String |
| monthParam | Sets the name of the parameter to encode month into. | String |
| showLink | Sets whether to show links or not (defaults to true). | boolean |
| title | Sets the title to add to this link. | String |
| yearParam | Sets the name of the parameter to encode year into. | String |
Renders an XHTML Calendar heading.
Can contain:EMPTY
| Name | Description | Type |
|---|---|---|
| capitalizeMonths | If true, month captions will be capitalized. | boolean |
| captionFormat | Sets the DateFormat to show above the calendar. | String |
| encodeNextLink | Sets whether to encode month and year into next URL (defaults to true). | boolean |
| encodePrevLink | Sets whether to encode month and year into previous URL (defaults to true). | boolean |
| monthParam | Sets the name of the parameter to encode month into prev/next nav links. | String |
| nextClass | Sets the CSS class name to apply to the next month link. | String |
| nextContent | Sets the content to display for the next month link. | String |
| nextId | Sets the CSS id to apply to the next month link. | String |
| nextLink | Sets the URL to use for the next month link. | String |
| nextTitle | Sets the title to add to the next month link. | String |
| prevClass | Sets the CSS class name to apply to the previous month link. | String |
| prevContent | Sets the content to display for the previous month link. | String |
| prevId | Sets the CSS id to apply to the previous month link. | String |
| prevLink | Sets the URL to use for the previous month link. | String |
| prevTitle | Sets the title to add to the previous month link. | String |
| showDate | Date to display calendar for (defaults to today). | java.util.Date |
| showNextLink | Sets whether to show next link (defaults to true). | boolean |
| showPrevLink | Sets whether to show previous link (defaults to true). | boolean |
| yearParam | Sets the name of the parameter to encode year into prev/next nav links. | String |
Renders an XHTML Pager control.
Can contain:EMPTY
| Name | Description | Type |
|---|---|---|
| count* | Total number of items. | int |
| limit* | Number of items per page. | int |
| limitParam | Parameter name to use for limit (defaults to 'limit'). | String |
| link | URL to use when generating pager links (defaults to current page). | String |
| maxLinks | Number of links (in either direction) to display. Defaults to 10. | int |
| nextContent | HTML content to use for the next link (defaults to a right angle quote). | String |
| prevContent | HTML content to use for the previous link (defaults to a left angle quote). | String |
| start* | Starting element number | int |
| startParam | Parameter name to use for start (defaults to 'start'). | String |
URL-manipulation tag library.
Namespace definition: xmlns:url="http://randomcoder.org/tags-url"
Tags
Required attributes are marked with a*
Cooperates with url:modify to add a parameter.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| name* | Name of the parameter to add. | String |
| value | Value of the parameter to add. | String |
Cooperates with url:modify to remove all parameters.
Can contain:EMPTY
This tag has no attributes.
Renders the current page's URL, optionally to a variable.
Can contain:EMPTY
| Name | Description | Type |
|---|---|---|
| scope | Scope for var. | String |
| var | Name of the exported scoped variable for the processed url. The type of the scoped variable is String. | String |
Modifies a passed-in URL, optionally adding / removing parameters.
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| scope | Scope for var. | String |
| value | URL to modify (defaults to current page). | String |
| var | Name of the exported scoped variable for the processed url. The type of the scoped variable is String. | String |
Cooperates with url:modify to remove a parameter.
Can contain:EMPTY
| Name | Description | Type |
|---|---|---|
| name* | Name of the parameter to remove. | String |
Cooperates with url:modify to set a parameter (equivalent to removing, then adding).
Can contain:JSP
| Name | Description | Type |
|---|---|---|
| name* | Name of the parameter to set. | String |
| value | Value of the parameter to set. | String |
JSTL-compatible tag library to handle XHTML form input.
Namespace definition: xmlns:input="http://randomcoder.org/tags-input"
Tags
Required attributes are marked with a*
JSP equivalent of XHTML <input type="button" /> tag.
Can contain:empty
<input:button name="button" id="button" onclick="doSomething()" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="checkbox" /> tag.
Can contain:empty
<input:checkbox name="checkbox" id="checkbox" checked="${checkbox == 'value1'}" value="value1" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| checked | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="file" /> tag.
Can contain:empty
<input:file name="file" id="file" />
| Name | Description | Type |
|---|---|---|
| accept | XHTML attribute | String |
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
JSP equivalent of XHTML <input type="hidden" /> tag.
Can contain:empty
<input:hidden name="hidden" id="hidden" value="${hidden}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="image" /> tag.
Can contain:empty
<input:image name="image" id="image" src="image.jpg" value="${image}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| align | XHTML attribute | String |
| alt | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| src | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "style" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| usemap | XHTML attribute | String |
JSP equivalent of XHTML <option /> tag.
Can contain:empty
<input:option text="Option 1" value="option1" id="option1" />
| Name | Description | Type |
|---|---|---|
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| label | XHTML attribute | String |
| lang | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| text* | Text to display in select box. | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="password" /> tag.
Can contain:empty
<input:password name="password" id="password" value="${password}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| maxlength | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| size | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="radio" /> tag.
Can contain:empty
<input:radio name="radio" id="radio" checked="${radio == 'value1'}" value="value1" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| checked | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="reset" /> tag.
Can contain:empty
<input:reset name="reset" id="reset" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <select /> tag.
Can contain:JSP
<input:select name="select" id="select" value="${select}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| multiple | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| size | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
Alternative way to mark select tag's values.
Can contain:empty
| Name | Description | Type |
|---|---|---|
| value* | Selected value. | String |
JSP equivalent of XHTML <input type="submit" /> tag.
Can contain:empty
<input:submit name="submit" id="submit" value="Submit" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <input type="text" /> tag.
Can contain:empty
<input:text name="text" id="text" value="${text}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| maxlength | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| size | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | XHTML attribute | String |
JSP equivalent of XHTML <textarea /> tag.
Can contain:empty
<input:textarea name="textarea" styleId="textarea" value="${textarea}" />
| Name | Description | Type |
|---|---|---|
| accesskey | XHTML attribute | String |
| cols | XHTML attribute | String |
| dir | XHTML attribute | String |
| disabled | XHTML attribute | String |
| lang | XHTML attribute | String |
| name* | XHTML attribute | String |
| onblur | XHTML attribute | String |
| onchange | XHTML attribute | String |
| onclick | XHTML attribute | String |
| ondblclick | XHTML attribute | String |
| onfocus | XHTML attribute | String |
| onkeydown | XHTML attribute | String |
| onkeypress | XHTML attribute | String |
| onkeyup | XHTML attribute | String |
| onmousedown | XHTML attribute | String |
| onmousemove | XHTML attribute | String |
| onmouseout | XHTML attribute | String |
| onmouseover | XHTML attribute | String |
| onmouseup | XHTML attribute | String |
| onselect | XHTML attribute | String |
| readonly | XHTML attribute | String |
| rows | XHTML attribute | String |
| style | XHTML attribute | String |
| styleClass | XHTML "class" attribute, renamed to avoid collisions | String |
| styleId | XHTML "id" attribute, renamed to avoid collisions | String |
| tabindex | XHTML attribute | String |
| title | XHTML attribute | String |
| value | Field value of text area | String |
EL escape functions.
Namespace definition: xmlns:rcesc="http://randomcoder.org/tags-escape"
EL Functions
Required attributes are marked with a*
Function class: org.randomcoder.taglibs.functions.EscapeElFunctions
Function signature: java.lang.String attribute(java.lang.String)
Attribute escape
Function class: org.randomcoder.taglibs.functions.EscapeElFunctions
Function signature: java.lang.String jsDouble(java.lang.String)
JavaScript double-quote escape
Function class: org.randomcoder.taglibs.functions.EscapeElFunctions
Function signature: java.lang.String jsSingle(java.lang.String)
JavaScript single-quote escape
Function class: org.randomcoder.taglibs.functions.EscapeElFunctions
Function signature: java.lang.String urlencode(java.lang.String)
URL encode