0% found this document useful (0 votes)
9 views

JSP Tags Part Two

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

JSP Tags Part Two

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Course: JSP

Title: JSP Tags Part two

Directives can have a number of attributes that you can list down as key-value
pairs and separate by commas.
<%@ ------------- %>
Three kinds of jsp directive tags:
A. Page directive: The page directive defines attributes that apply to an entire
JSP page. Syntax: <%@ page attribute=”values” %>

Attributes of JSP page directive


o Import: The import attribute is used to import class, interface or all the
members of a package. It is similar to import keyword in java class or interface.
o content Type
o extends
o info
o buffer
o language
o isELIgnored
o isThreadSafe
o autoFlush
o session
o pageEncoding
o errorPage
o isErrorPage

Instructor: Ibrahim Yusuf Mohamed (Bulbul) pg. 1


Course: JSP
Title: JSP Tags Part two

B. Include directive: Includes a file during the translation phase.


Syntax: <%@ include file=”url page” %>
C. Taglib directive: The JSP taglib directive is used to define a tag library that
defines many tags.
Syntax: <%@ taglib uri=”--- ” prefix=”---”%>

Action tag: The action tags are used to control the flow between pages and to use
Java Bean. Each JSP action tag is used to perform some specific tasks.

JSP Action Description


Tags

jsp:forward forwards the request and response to another resource.

jsp:include includes another resource.

jsp:useBean creates or locates bean object.

jsp:setProperty sets the value of property in bean object.

jsp:getProperty prints the value of property of the bean.

jsp:plugin embeds another components such as applet.

jsp:param sets the parameter value. It is used in forward and include mostly.

jsp:fallback can be used to print the message if plugin is working. It is used in


jsp:plugin.

jsp:forward: Syntax: <jsp: forward page=”url of the resource”>


jsp:include: Syntax: <jsp include page=”url of the resource”>

Instructor: Ibrahim Yusuf Mohamed (Bulbul) pg. 2

You might also like