7/11/07

JSP TAGS

JSP is the html page that add java code[called JSP tags] into it.
JSP tags can be devided into 6 different types. These are:
Comment tag use to add comment.

<% --comment here-- %> or <! --comment here-- >

Declarations tag use to define the variables,methods or classes to use in the JSP page.
<%!
Declaration1;
Declaration2;
%>

Scriplets tag use to insert java statements.
<%
Statement 1;
Statement 2;
Statement n;
%>

Expressions tag use to print out any data on the page. These data are automatically converted to string.
<%=[Value] or [Expression]%>

Directives tag is used for many purposes depend on directive and attribute in tag. there are three directives page, include and taglib.
<%@ directive attribute="value" %>

Action tag is use to transfer control to other server objects[ex. pages] or perform operations on other objects.
<jsp:action attributes />

action tag has three types e.g. include,forward and usebean.

0 comments: