600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > 计算机java相关英文文献 计算机专业 Java外文翻译 外文文献 英文文献.docx

计算机java相关英文文献 计算机专业 Java外文翻译 外文文献 英文文献.docx

时间:2019-12-05 15:15:42

相关推荐

计算机java相关英文文献 计算机专业 Java外文翻译 外文文献 英文文献.docx

中定义的Bean的id,它的property属性指定的是目标属性的名字。事实证明,JavaServlet是一种开发Web应用的理想构架。JSP以Servlet技术为基础,又在许多方面作了改进。JSP页面看起来象普通HTML页面,但它允许嵌入执行代码,在这一点上,它和ASP技术非常相似。利用跨平台运行的JavaBean组件,JSP为分离处理逻辑与显示样式提供了卓越的解决方案。JSP必将成为ASP技术的有力竞争者。TheJSPbasiclearningmaterial1.JSPtechnologyoverviewInfromtheofficiallaunchJSP(JavaServerWeb),thenthenewWebapplicationdevelopmentskillsquicklytocausetheattentionofpeople.TheJSPforcreatinghighlydynamicWebapplicationprovidesauniquedevelopmentenvironment.Accordingtothestatementfromcanadapttothemarket,theJSPWebServer,includingIcanwithApacheIIS4.0,85%ofserverproducts.EvenifyoutheASP"madly",webelieve,payingattentiontothedevelopmentofJSParestillverybenecessary.(1)JSPsimplecomparedwithASPTheJSPandMicrosoftofASPtechnologyareverysimilar.BothofferinHTMLcodemixedsomecode,bythelanguageengineinterpretiveexecutioncodesability.InASPandJSPenvironment,HTMLcodeismainlyresponsiblefordescribeinformationdisplay,andprogramcodeisusedtodescribehandlinglogic.NormalHTMLpageonlydependsontheWebserverandtheASPandJSPpageneedadditionallanguageengineanalysisandimplementationprogramcode.TheprogramcodetobeexecutingembeddedintoHTMLcode,thenthemessagetoallbrowsers.ASPandJSParefacingtheWebservertechnology,theclientbrowserdoesnotneedanyadditionalsoftwaresupport.ASPprogramminglanguageisVBScriptsuchscriptinglanguage,JSPuseisJava,thisisbothoneofthemostsignificantdifferences.Inaddition,ASPandJSPmoreessentialdifference:twolanguagesinatotallydifferentwayenginehandlingpageembeddedprogramcode.IntheASP,VBScriptcodeisASPenginesinterpretexecution;IntheJSP,codehasbeencompiledintoJavavirtualmachinebyServletandexecution,thecompileroperationisonlyontheJSPpagefirstrequesthappen.(2)DimensionofrunningenvironmentFromtheJSPpagein/products/jsp/index.html,fromherecanalsodownloadtheJSPspecification,thesestandarddefinesthesupplierincreatingJSPenginewhenmustcomplytosomerules.ExecuteJSPcodeneededontheserverinstallationJSPengine.HereweuseisfromtheDevelopmentKit(JavaServerWebJSWDK).Tofacilitatelearning,thispackageoffersalotformodificationexamples.JSWDKafterinstallation,justneedtoperformstartservercommandcanserver.Thedefaultconfigurationserverintheport8080surveillance,usehttp://localhost:8080canopendefaultpage.InrunningtheJSPsamplepagebeforeinstallation,pleasepayattentiontotheJSWDKdirectory,especially"schools"subdirectoriesofcontent.Executethesamplepages,herecanseehowtheJSPpageareconvertedintoJavasourcefile,thencompiledintoscale-upfile(i.e.Servlet).JSWDKpackagesexamplesinthepageisdividedintotwocategories,theyorJSPfiles,orisincludedinaformofHTMLfiles,theseformsallbyJSPcodeprocessing.AndastheJava,JSPASPcodeareexecutedontheserver.Therefore,inthebrowseruse"theviewsource"menuisunabletoseetheJSPcode,canseetheresultsHTMLcode.Allthesourcecodeexamplesarebyasingle"provideexamples"page.Eclipseisanopensource,basedonaJavaextensibledevelopmentplatform.Eclipseitjustaframeworkandasetofservice,usedtoconstructtheDevelopmentenvironmentthroughplug-inscomponents,thekeyisEclipsecomesinastandardpluginsets,includingJavaDevelopmentTools(JavaDevelopmentTools,JDT).TheEclipseisdevelopedbyIBMalternativecommercialsoftwareforthenextgenerationofJavaVisualage-relatedIDEdevelopmentenvironment,November2001contributiontotheopensourcecommunity,nowbyanon-profitsoftwarevendorsallianceEclipseFoundation(EclipseFoundation)management.(3)JSPpageexamplesBelowweanalyzeasimpleJSPpage.YoucanJSWDKexamplesinthedirectorycreateanotherdirectorystorethisfile,thefilenamecanbearbitrary,butextensionsmustserve.JSP.Fromthecodebelowthelistcansee,excepttheJSPpagethanordinaryHTMLpagemoreJavacodeoutside,bothhasthesamebasicstructure.JavacodeisthroughsymbolstojoininthemiddleoftheHTMLcode,itsmainfunctionistogenerateanddisplayafrom0to9string.InthestringinthefrontandrearoftheHTMLcodethatsomearethroughthetextoutput.JSPPAGEJSPBeforeout。

JSPAfterout。TheJSPpagecanbedividedintoseveralpartsforanalysis.FirstistheJSPinstructions.Itdescribesthebasicinformationofthepage,suchastheuseoflanguage,whethertomaintainconversationstatus,whethertousecushionetc.TheJSPinstructionsbyover.Inthisexample,directive""simplydefinesthisexampleisusingJavalanguage(atpresent,intheJSPspecificationinJavaistheonlysupportlanguage).NextcametheJSPstatement.TheJSPstatementmayberegardedasthedefinitionofthislevelofvariablesandmethodofplace.TheJSPstatementbyover.Ifthecasesof""definesaStringvariable.Ineverystatementbehindmusthaveasemicolon,justlikeinordinaryJavaclassdeclarationinthesamemembervariables.LocatedinbetweenthecodeblockistodescribetheJSPpagehandlinglogicofJavacode,suchastheexampleshowntheseascycle.Finally,locatedinbetweencodeiscalledtheJSPexpression,suchastheexampleof""below.TheJSPexpressionprovidesawillJSPgeneratednumericalembeddedHTMLpagesofsimplemethod.2.ThesessionstatemanagementThesessionstatemaintainistheWebapplicationdevelopersmustfacetheproblem.Therearevariouswayscanbeusedtosolvethisproblem,ifuseCookies,hiddenforminputdomain,ordirectlytotheURLinadditionalstatusinformation.JavaServletprovidesacontinuouseffectivelyinmultiplerequeststheconversationbetweenobjects,theobjectallowsuserstostoreandretrievethesessionstateinformation.TheJSPalsosupportServletofthisconcept.IntheJSPfromguidelinescanseemanyrelevantimpliedobjectinstructions(implicitmeaningisthattheseobjectscandirectlyreferenced,donotneedexplicitstatement,alsodonotneedspecialcodetocreateactuallycases).Forexamplethatobject,itistheHttpServletRequestaderivedclass.Theobjectcontainsalltherelatedcurrentbrowserrequestsinformation,includingCookies,HTMLformvariables,etc.Sessionobjectisalsosuchahiddenobjects.ThisobjectinthefirstJSPpageisloaded,andautomaticallycreatedbyrelatedtothatobjects.TheconversationwithASPobjectofsimilar,JSPsessionobjectforthosewhohopethatthroughmultiplepagestocompleteaaffairsapplicationisveryuseful.Toillustratethesessionobjectconcreteapplication,nextweusethreepagesmorethanapageofsimulationWebapplication.Thefirstpage(q1.HTML)containonlyarequirementtoenteryourusernameHTMLforms,theHTMLcodeisasfollows:Pleasewriteyourname:ThesecondpageisaJSPpage(q2.JSP),itthroughthatobjectextractioninq1.HTMLformthenamevalue,itwillbestoredfornamevariable,thenwillthenamevaluesavedtothesessionobjects.Sessionobjectisaname/valuepairsset,here,name/valuepairsofthenameis"thename",namelyfornamevaluesofthevalueofthevariable.Dueinsessionduringthesessionobjectiseffectiveuntil,soherepreservedvariablesonsubsequentpageaswell.Q2.JSPanothertaskistoaskthesecondquestion.Belowisitscode:Whatisyourname:

Whatdoyouwanttoeat?ThethirdpageisaJSPpage(percentile.JSP),maintaskistoshowtheq&aresults.Itfromthevalueofthethenamesessionobjectextractionanddisplayit,provethevalueinthefirstthoughpageinput,butthroughsessionobjectismaintained.Percentile.JSPanothertaskistoextracttheuserinputatthesecondpageanddisplaysit:Yournameis:

Yourfavoritefoodis:3.CitingJavaBeancomponentsBasedonaJavaJavaBeanisakindofsoftwarecomponent.InWebapplicationsfortheJSPintegratedJavaBeancomponentprovidestheperfectsupport.Thissupportcannotonlyshortentime(canusedirectlybytestandtrustworthyofexistingcomponents,toavoidtherepeateddevelopment),butalsofortheJSPapplicationhasbroughtmorescalability.JavaBeancomponentscanbeusedtoexecutecomplexcomputingtasks,orresponsibleanddatabaseofinteractionanddataextraction,etc.IfwehavethreeJavaBean,theyrespectivelydisplaynews,stockprice,weatherconditionsfunction,theycreatecontainallthesethreefunctionsofWebpageonlyneedtoinstantiatethethreeBean,usingHTMLformswillbetheyinturnpositioningisok.ToillustratetheJSPJava

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。