|
|
JSP syntax Comparing to other server side technologies, JSP's own syntax is simple.
We can divide JSP elements in two groups: Scripting elements and Action
elements. Scripting elements use tags like that: <% script %>, and
action elements use XML-like tags: <jsp:action />.
| Scripting |
| Tag |
Syntax |
Description |
| Directives |
<%@ directive %> |
handle pages and define the scripting language. |
| Declarations |
<%! declaration %> |
declares variables or methods. |
| Expressions |
<%= expression %> |
the result will display to browers.. |
| Scriptlet |
<% scriptlet %> |
handle code fragment valid in the page scripting language. |
| Comments |
<%-- comment --%> |
is used to put comments. |
| Action |
| Tag |
Syntax |
Description |
| useBean |
<jsp:useBean .../> |
allows a page to use a Java Bean |
| setProperty |
<jsp:setProperty .../> |
is used set bean properties |
| getProgperty |
<jsp:getProperty .../> |
is used to get bean properties |
| param |
<jsp:param .../> |
is used to provide key/value information |
| forward |
<jsp:forward .../> |
forward a page. |
| include |
<jsp:include .../> |
include a file in the current JSP page |
| plugin |
<jsp:plugin .../> |
enables a JSP page author to generate HTML that contains the appropriate
client browser |
|
 | Online Colleges, Online Universities, E-learning & Distance Education for Your Career! Easy Job Training & Online Courses.
|
|
|
|