JSP Syntax Detailed (ZT) 4

zhaozj2021-02-16  71

contains a static or dynamic file.

JSP syntax

oral

Examples

Description / R

Elements Allows you to include dynamic files and static, which are different from the results of the files. If the file is just a static file, this includes adding the contents of the included file to the JSP file, and if this file is dynamically, then this containing file will be executed by the JSP compiler (this is similar to the ASP )

You can't judge a file from a file name to be dynamic or static, such as aspcn.asp may just contain some information, without having to execute. can handle these two files at the same time, so you don't need to include this file is dynamic or static.

If this included file is dynamic, you can also pass the parameter name and parameter value with .

Attributes

Page = "{relativeURL | <% = expression%>}"

The parameter is a relative path, or represents a relative path expression.

Flush = "True"

Here you must use flush = "true", you can't use false values. The default is false

clause allows you to pass one or more parameters to dynamic files

You can use multiple in a page to deliver multiple parameters,

Execute an applet or bean, there is a possibility to download a Java plugin for execution it.

JSP syntax

TYPE = "bean | applet"

Code = "ClassFileName"

CodeBase = "classfiledirectoryname"

[Name = "instancename"]

[Archive = "uritoarchive, ..."] [align = "bottom | TOP | MIDDLE | LEFT | RIGHT"]

[Height = "displaypixels"]

[Width = "displaypixels"]

[Hspace = "LeftrightPixels"]

[VSpace = "Topbottompixels"]

[Jreversion = "jreversionnumber | 1.1"]

[Nspluginurl = "urltoplugin"]

[IEpluginURL = "URLTOPLUGIN"]>

[

[]

]

[ Text Message for User ]

example

unable to load applet

Description / R

element is used to play or display an object in the browser (typical is applet and bean), and this display requires the Java plugin of the browser.

When the JSP file is compiled, when sending to the browser, the element will replace the "Object> or element according to the version of the browser. Note, is used for HTML 4.0, for HTML 3.2.

In general, the element will specify an object is applet or bean, and the name of the Class is also specified, and there is location, and it will also specify where to download this Java plugin. details as follows:

Attributes

TYPE = "bean | applet"

The type of plug-in object that will be executed, you must specify this bean or applet because this property has no default.

Code = "ClassFileName"

The name of the Java Class will be performed by the Java plug-in, must end with .class. This file must exist in the directory specified by the CodeBase property.

CodeBase = "classfiledirectoryname"

The directory (or path) of the Java Class file will be executed, if you do not provide this property, the directory of the JSP file using the will be used.

Name = "InstanceName" This bean or applet instance name, it will call other places in JSP.

Archive = "uritoarchive, ..."

Some pathnames separated by commas, these path names are used to pre-install some of the Class to use, which increases the performance of the applet.

Align = "bottom | TOP | Middle | Left | RIGHT"

Graphics, objects, and applets, have the following values:

Bottom

TOP

Middle

Left

Right

Height = "DisplayPixels" width = "displaypixels"

Applet or bean will display the long width value, this value is a number, the unit is pixel.

Hspace = "Leftrightpixels" vSpace = "Topbottompixels"

Applet or bean is displayed on the screen, the space you need to leave up and down, the unit is pixel.

Jreversion = "JreversionNumber | 1.1"

Applet or bean runs the version of Java Runtime Environment (JRE) required. The default is 1.1.

nspluginurl = "Urltoplugin"

Netscape Navigator users can use the download address of JRE, this value is a standard URL, such as http://www.aspcn.com/jsp

IEPLUGINURL = "URLTOPLUGIN"

The download address of the JRE that IE can use, this value is a standard URL, such as http://www.aspcn.com/jsp

[]

You need to send parameters or parameter values ​​to Applets or Beans.

Text Message for User

A text is used for the Java plug-in to display to the user when the plugin is booted and the Applet or Bean cannot be, then the browser will have an error message pop-up.

转载请注明原文地址:https://www.9cbs.com/read-16167.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.043, SQL: 9