欢迎来到天天文库
浏览记录
ID:46553912
大小:150.00 KB
页数:21页
时间:2019-11-25
《计算机专业英文翻译》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、UsingScriptingElementsImplicitJSPScriptingObjectsScriptingelementscanusepredefinedvariablesthatthecontainerassignsasreferencestoimplicitobjects(Table16-1)toaccessrequestandapplicationdata.TheseobjectsareinstancesofclassesdefinedbytheservletandJSPspecifications.AppendixDcont
2、ainscompletedescriptionsofallmethodsforeachclass,andtheyarebrieflyintroducedhereandusedinanumberofexamplesinthischapter.Table16-1.ImplicitJSPobjectsVariablenameJavatypeapplicationjavax.servlet.ServletContextconfigjavax.servlet.ServletConfigexceptionjava.lang.Throwableoutjav
3、ax.servlet.jsp.JspWriterpagejava•lang•ObjectpageContextjavax.servlet.jsp.PageContextrequestjavax•servlet•http-HttpServletRequestresponsejavax•servlet.http.HttpServletResponsesessionjavax.servlet.http.HttpSessionTheseobjectsprovideaccesstothesameinformation(andmore)astheimpl
4、icitvariablesyoucanuseinELexpressions,butit'snotaone-to-onematch:pageContextThepageContextvariablecontainsareferencetoaninstanceoftheclassnamedjavax.servlet.jsp.PageContext.Itprovidesmethodsforaccessingreferencestoalltheotherobjectsandattributesforholdingdatathatissharedbet
5、weencomponentsinthesamepage.It'sthesameobjectthatyoucanaccesswiththe${pageContext}ELexpression.Attributevaluesforthisobjectrepresentthepagescope;theyarethesameobjectsasareavailabletotheELworldasaMaprepresentedbythe${pageScope}expression.requestTherequestvariablecontainsaref
6、erencetoaninstanceofaclassthatimplementsaninterfacenamedjavax.servlet.http.HttpServletRequest.Itprovidesmethodsforaccessingalltheinformationthat*savailableaboutthecurrentrequest,suchasrequestparameters,attributes,headers,andcookies.It'sthesameobjectthatyoucanaccesswiththe${
7、pageContext.request}ELexpression.Attributevaluesforthisobjectrepresenttherequestscope;theyarethesameobjectsasareavailabletotheELworldasaMaprepresentedbythe${requestScope}expression.responseTheresponsevariablecontainsareferencetoanobjectrepresentingthecurrentresponsemessage.
8、Itsaninstanceofaclassthatimplementsthejavax.servlet.http.HttpServletResponseinterf
此文档下载收益归作者所有