Simple JSP syntax

Source: Internet
Author: User

Assumerver Pages (jsp (preferred for SUN Enterprise Applications) syntax table

 

Element Description Jsp (preferred for SUN Enterprise Applications) syntax
HTML comment Create a visible comment on the client
Hide comments Jsp (preferred for SUN Enterprise Applications) file documentation, invisible to clients <% --Note-- %>
Statement Declare variables and methods in script language <%!Statement;[Statement] + ...... %>
Expression Add expressions to the script language <% =Expression %>
Script Add a script segment to the script language <%Script code%>
Contain instructions Add a file to describe the basic elements of jsp (preferred for SUN Enterprise applications) <% @ Include file ="Related Links"%>
Page instructions Define attributes of the entire jsp (preferred for SUN Enterprise Applications) Page <% @ Page [language ="Java"]
[Extends ="Package. class"]
[Import = "{Package. class|Package.*},...... "]
[Session ="True| False "]
[Info ="Text"]
[ErrorPage ="Related Links"]
[ContentType = "{mimeType [; charset = characterSet]
| Text/html; charset = ISO-8859-1} "]
[IsErrorPage = "true |False"]
%>
Label indication Define the tag library and custom tag prefix on the jsp (preferred for SUN Enterprise Applications) Page <% @ Taglib url ="Link to the tag Library"Prefix ="Tag prefix"%>
Custom tags
<TagPrefix. name attribute = "value" + ....../>
<TagPrefix. name attirbute = "value" + ......> Other labels TagPrefix. name>
Note: normal body = requiredSimhei =DefaultItalics= User defined | = or [] = optional {} = select ...... = Project list + = repeated

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.