Preface

Comment

Declaration

Expression

Scriptlet

EL Expression

Directives

Attribute Directive

Include Directive

Page Directive

Tag Directive

Taglib Directive

Variable Directive

Standard Actions

<jsp:attribute>

<jsp:body>

<jsp:element>

<jsp:doBody>

<jsp:forward>

<jsp:getProperty>

<jsp:include>

<jsp:invoke>

<jsp:output>

<jsp:plugin>

<jsp:root>

<jsp:setProperty>

<jsp:text>

<jsp:useBean>

<jsp:text>

Encloses template data.

JSP Syntax

<jsp:text>	
   template data	
</jsp:text>

XML Syntax

<jsp:text>	
   template data	
</jsp:text>

Example

<hello><jsp:scriptlet>i=3;</jsp:scriptlet>	
<hi>	
<jsp:text> hi you all	
</jsp:text><jsp:expression>i</jsp:expression>	
</hi>	
</hello>

The output is:

<hello> <hi> hi you all	
</hi></hello>

Description

A jsp:text element is used to enclose template data in the XML representation. A jsp:text element has no attributes and can appear anywhere that template data can. The interpretation of a jsp:text element is to pass its content through to the current value of out.

XML syntax allows an XML element that does not represent a standard or custom action to appear anywhere a jsp:text can appear. Such an element is passed to the current out.



宏飞网络是你学习web开发、测试web程序实例、和培养职业技能的首选网站。我们提供例子也许有些简单,但对理解基本概念有帮助。

我们尽量避免在教程、参考及例子中出现错误,但不能保证所有的内容都是正确的。

你使用本网站时,我们默认你已经阅读并接受了我们的隐私政策。

Copyright 2003-2011宏飞网络 版权所有