DOC

resource

By Cindy Howard,2014-10-09 10:23
8 views 0
resource

WEB资源的内容(当前WEB应用内部的文件)放在局部变量中.

    <bean:resource id="page1" name="/page1.jsp"/>

    <bean:write name="page1"/>

    <bean:resource id="page1" name="/page1.jsp" input="true"/>

    <%

     byte[] buf = new byte[page1.available()];

     page1.read(buf);

     String s = new String(buf);

     out.print(s);

    %>

    Retrieve the value of the specified web application resource, and make it available as either a InputStream

    or a String, depending on the value of the input

    attribute.

    If a problem occurs while retrieving the specified resource, a request time exception will be thrown.

    Attribute Description Name

    Specifies the name of the scripting variable (and

    associated page scope attribute) that will be made

    available with the value of the specified web id application resource.

    (REQUIRED) (RT EXPR)

    If any arbitrary value for this attribute is

    specified, the resource will be made available as

    an InputStream. If this attribute is not specified, input the resource will be made available as a String.

    (RT EXPR)

    Application-relative name (starting with a '/') of

    the web application resource to be loaded and made

    name available.

    (REQUIRED) (RT EXPR)

Report this document

For any questions or suggestions please email
cust-service@docsford.com