Danh mục

Session 2: Using JSP Tags

Số trang: 41      Loại file: ppt      Dung lượng: 293.00 KB      Lượt xem: 13      Lượt tải: 0    
Jamona

Phí tải xuống: 6,000 VND Tải xuống file đầy đủ (41 trang) 0
Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Session Objectives Describe the various elements of aJavaServer Page Describe the various JSP Tags in brief
Nội dung trích xuất từ tài liệu:
Session 2: Using JSP Tags Session2 UsingJSPTags SessionObjectives Describethevariouselementsofa JavaServerPage DescribethevariousJSPTagsinbrief eACCP2003/DynamicPagesUsingJSP/Session2/2of45 WhatdoesaJSPlooklike? ThreemainJSPconstructs:  Directives  Allowsonetocontrolstructureoftheservlet  ScriptingElements  UsedtoincludeJavacode  Actions  Specifictagsthataffecttheruntimebehaviorofthe JSPs eACCP2003/DynamicPagesUsingJSP/Session2/3of45 FixedTemplate AnExample dataMyFirstProgram.jsp JSP Directive JSP Scriptlet JSP Expression eACCP2003/DynamicPagesUsingJSP/Session2/4of45 Whathappensunderthehood? User WebServer/Request ServletEngine No JSPHandlerServlet Newor(PageCompilationServlet) modifiedfile? Yes Compileinto Execute Servlet Servlet eACCP2003/DynamicPagesUsingJSP/Session2/5of45 VariousElementsinaJSP Directives  page  Definesinformationthatwillbegloballyavailablefora JSP  include  UsedtoinserttextandcodeatJSPtranslationtime  taglib  Definesamechanismforextendingthecurrentsetof JSPtags eACCP2003/DynamicPagesUsingJSP/Session2/6of45 DifferentAttributesofthe PageDirective Attribute Definitionlanguage= This attribute tells the server about the language to be”” usedtocompletetheJSPfile.Atpresent,Javaistheonly languagethatcanbeused. extends= This attribute defines the parent class that the generated” servletwillextend. import= This attribute defines the list of packages that will be” available to this JSP. However, a comma must separate eachpackage.session=true|false Thisattributedetermineswhetherthesessiondatawillbe availabletothispage.Thedefaultistrue. buffer=none| buffered.Thedefaultvalueis8kb. eACCP2003/DynamicPagesUsingJSP/Session2/7of45 DifferentAttributesofthe PageDirective–(1) Attribute DefinitionautoFlush=true| Determines whether the output buffer will be flushedfalse automatically, or whether it will raise an exception whenthebufferisfull.Thedefaultistrue. isThreadSafe=true Specifies whether page can service more than one|false requestatatime.Thedefaultistrue.info=” Specifies information about the JSP, can be accessedbyServlet.getServletInfo(). errorPage= ThisattributerepresentstherelativeURLtotheJSP” thatwillhandleexceptions. isErrorPage=true| This attribute states whether or not the JSP is anfalse errorPage.Thedefaultisfalse. contentType= This attribute represents the MIME type and” charactersetoftheresponse. eACCP2003/DynamicPagesUsingJSP/Session2/8of45 UsingpageAttributesAn example JSP Elements JSP Elements eACCP2003/DynamicPagesUsingJSP/Session2/9of45 MoreonDirectives includedirective  Syntax  taglibdirective  Syntax eACCP2003/DynamicPagesUsingJSP/Ses ...

Tài liệu được xem nhiều:

Gợi ý tài liệu liên quan: