View RSS Feed

My Java Tips

JSP Tags

Rate this Entry
by , 05-25-2011 at 10:32 AM (1334 Views)
JSP tags are like HTML tags and they do not use <%. Instead they use < character.

JSP tags can have a "start tag", a "tag body" and an "end tag". As you may have guessed, the start and end tag both use the tag name, enclosed in < and > characters. Just has HTNL tags, the ending JSP tag starts with a / character after the < character. The tag names have an embedded colon character : in them, the part before the colon describes the type of the tag.

For example:

XML Code:

You may experience a scenario, where the tag does not require a body. In such case, the start and end can be conveniently merged together. For example:

XML Code:
Tag is closed by a /> instead of > character. Here the tag is ended immediately, and without a body.

Submit "JSP Tags" to Facebook Submit "JSP Tags" to Digg Submit "JSP Tags" to Submit "JSP Tags" to StumbleUpon Submit "JSP Tags" to Google

Tags: jsp tags Add / Edit Tags