Comment out the basic commands of JSP syntax

Source: Internet
Author: User
Tags html comment

1. HTML comment

<! -- Comment [<% = expression %>] -->

2. Hide comments

<% -- Comment content -- %>

3. JSP Declaration

<%! Declare 1 declaration; [declare 2 Declaration;]... %>

4. Include command

<% @ Include file = "url. jsp" %>

5. Page command (all are optional)

<% @ Page

Language = "Java"

Extends = "package. Class"

Import = "package. Class | package .*"

Session = "True | false"

Buffer = "None | 8kb | sizekb"

Autoflish = "True | false"

Isthreadsafe = "True | false"

Info = "text"

Errorpage = "errorpageurl"

Iserrorpage = "True | false"

Contenttype = "text/html; charset = GBK"

%>

6. <JSP: usebean

Id = "beaninstancename"

Scope = "Page | request | session | application"

Class = "package. Class"

Type = "package. Class"

Beanname = "package. Class | <% = Exception %>"

/>

7. <JSP: getproperty name = "bean name" property = "bean property name"/>

8. <JSP: setproperty name = "bean name" property = "bean property name"/>

9. You can use scriptlet to declare the variables and methods to be used, expressions, use any implicit objects, and use any <JSP: usebean>

Declared object

<%CodeBody %>

10. taglib command

<% @ Taglib uri = "unique name" prefix = "relative or absolute path" %>

11. <JSP: plugin> command

<JSP: plugin

Type = "bean | applet"

Code = "classfilename"

[Name = "instancename"]

[Archive = "urltoarchive"]

[Align = "bottom | top | Middle | left | right"]

[Height = "PX"]

[Width = "PX"]

[Hspace = "PX"]

[Vspace = "PX"]

[Jreversion = ""]

[Nspluginurl = ""]

[Iepluginurl = ""]

>

[<JSP: Params

[<JSP: paramname = "name" value = "value"/>] +

</Jsp: Params>]

</Jsp: plugin>

12. <JSP: Forward page = "url"> directs an HTML file, JSP file, orProgramFragment

13.

Related Article

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.