Google News
logo
JSP - Interview Questions
Explain JSTL core tags.
<c:out> tag : It is used to display the content on client after escaping XML and HTML markup tags. Main attributes are default and escapeXML.
<c:set> tag : This tag is used to set up a variable value in a specified scope. It sets the result for a given expression in the given variable.
<c: remove> tag : It is used to remove an attribute from a specified scope, By default removes it from all scopes.
<c: if> tag : This JSTL core tag is used for testing conditions. There are two other optional attributes for this tag, var, and scope.
<c:choose> tag : It is used as a switch case.
<c:when> tag : It’s like a case statement in Java.
<c:otherwise> tag : It is used as the default attribute in switch-case statements.
<c:catch> tag : This tag is used in exception handling.
<c:import> tag : This is a core JSTL tag. It is used for importing the content from another file or page to the current JSP page. Attributes required are var, URL, and scope.
<c:forEach> tag : This tag in JSTL works as for look from java 
<c:forTokens> tag : It is used for iteration but it only works with the delimiter.
<c:param> tag : This JSTL tag is mostly used with <c:url> and <c:redirect> tags. It adds parameters and their values to the output of these tags.
<c:url> tag : It is used for URL formatting or URL encoding. It converts a relative URL into an application context’s URL.
<c:redirect> tag : It is used, to redirect the current page to another URL, provide the relative address in the URL attribute of this tag and the page will be redirected to the URL.
Advertisement