77范文网 - 专业文章范例文档资料分享平台

jsp快速参考手册

来源:网络收集 时间:2021-04-05 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

scriptlet

DirectivespageDefines page-wide attributes.<%@ page attribute="value" ...%> attributes, with default values, are:

Contains a block of scripting code. A JSP page can contain multiple blocks of scripting code.<% script code%>

Example:<% String greeting= request.getParameter("Greeting"); out.println(greeting);%>

JSP Quick Reference CardBasic SyntaxDefault scripting languageThe scripting language of a JSP page defaults to Java. Insert the following line in a JSP page to configure the page to use JavaScript:<%@ page language="javascript"%>

attribute= language="java"| session="true"| contentType=text/html;charset="ISO-8859-1"| import="package(s)"| buffer="8kb"| autoflush="true"| isThreadSafe="true"| info="text_string"| errorPage="relativeURL"| isErrorpage="true"| extends="class_name" value= a string literal in single or double quotes.

expressionDefines statements evaluated on the server before sending the page output to the client.<%= expression%>

Example:<%= myVar1%>

includeInserts text into a JSP page.<%@ include file="path" ...%>

Actionsjsp:includeCall one JSP page from another. Upon completion, the destination page returns control to the calling page.<jsp:include page="path" flush="true"/><jsp:include page="path" flush="true"><jsp:param name="paramName" value="paramValue"/> ...</jsp:include>

Using white spaceWhite space contained within the template code is returned to the client as it was entered in the JSP.

taglibDefines a custom tag library used by a JSP page.<%@ taglib uri="tagLibraryURI" prefix="tagPrefix"%>

Quoting attribute valuesQuote attribute values, using either single or double quotes, to all JSP elements. For example:<%@ page contentType="text/plain"%>

After the taglib directive, reference the custom tags using the syntax:<tagPrefix:tagName> ...</tagPrefix:tagName>

Writing comments for the JSPA JSP comment is not output to the client as part of the JSP page’s output.<%-- Comment string... --%>

jsp:forward

Scripting ElementsdeclarationCreates page-wide definitions such as variables.<%! declaration%>

Calls one JSP page from another. Execution of the calling page is terminated by the call.<jsp:forward page="path"/><jsp:forward page="path"><jsp:param name="paramName" value="paramValue"/> ...</jsp:forward>

Outputting comments to the clientHTML comments are output to the client.<!-- comments -->

Example:<%! private String foo= null; public String getFoo(){return this.foo;}%>

jsp:pluginEnables you to invoke an applet on a client browser.<jsp:plugin type="bean|applet" code="objectCode" codebase="objectCodebase"{ align="alignment"}{ archive="archiveList"}{ height="height"}{ hspace="hspace"}{ jreversion="jreversion"}{ name="componentName"}{ vspace="vspace"}{ width="width"}{ nspluginurl="url"}{ iepluginurl="url"}>{<jsp:params>{<jsp:param name=" paramName" value="paramValue"/>}+</jsp:params>}{<jsp:fallback> arb

itrary_text</jsp:fallback>}></jsp:plugin>

jsp:setPropertySets the value of one or more properties in a bean.<jsp:setProperty name="beanName" prop_expr/>

pageContextThe page context for the JSP. Java type: javax.servlet.jsp.PageContext

prop_expr has one of the following forms: property="*"| property="propertyName"| property="propertyName" param="parameterName"| property="propertyName" value="propertyValue"

requestThe client request. Java type: javax.servlet.HttpServletRequest

jsp:getPropertyWrites the value of a bean property as a string to the out object.<jsp:getProperty name="name" property="propertyName"/>

responseThe response to the client. Java type: javax.servlet.HttpServletResponse

sessionThe session object created for the requesting client. Java type: javax.servlet.http.HttpSession

JSP ObjectsSee the corresponding Java object type for the available methods for these objects.

Allaire Contact InformationAllaire Web sitesMain Allaire Web site:

The elements in brackets ({}) are optional.

applicationThe servlet context obtained from the servlet configuration object. Java type: javax.servlet.ServletContext

jsp:useBeanDefines an instance of a Java bean.<jsp:useBean id="name" scope="page|request|session|application" typeSpec/><jsp:useBean id="name" scope="page|request|session|application" typeSpec> body</jsp:useBean>

configThe ServletConfig object for the JSP page. Java type: javax.servlet.ServletConfig

JRun Development Center:/developer/jrunreferencedesk/

JRun Developer Forum:/jrunconf

exceptionThe uncaught exception that resulted in the error page being invoked. Java type: ng.Throwable

Allaire technical supportAllaire offers a range of telephone and Web-based support options. Go to /support for a complete description of technical support services. You can make postings to the JRun Support Forum () at any time.JRun is a trademark of Allaire Corporation. All other trademarks are property of their respective holder(s.)© 2001 Allaire Corporation. All rights reserved. Part number: AA-JRQRF-RK

typespec is any one of the following:class="className"| class="className" type="typeName"| beanName="beanName" type=" typeName"| type="typeName"

outAn object that writes into a JSP page’s output stream. Java type: javax.servlet.jsp.JspWriter

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库jsp快速参考手册在线全文阅读。

jsp快速参考手册.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/jiaoyu/1207278.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: