JSTL <c:import>标签

<c:import>标签提供所有的<include>动作的功能,但也允许包含的绝对URL。

例如,使用导入import标签允许列入的内容从不同的Web站点或FTP服务器。 

属性:

<c:import>标签具有以下属性:

属性 描述 必须 默认
url URL to retrieve and import into the page Yes None
context / followed by the name of a local web application No Current application
charEncoding Character set to use for imported data No ISO-8859-1
var Name of the variable to store imported text No Print to page
scope Scope of the variable used to store imported text No Page
varReader Name of an alternate variable to expose java.io.Reader No None

例子: