JSPTechnologyConspectusAndSpecialtiesBy:KathySierraandBertBatesSource:Servlet&JSPTheJSP(JavaServermix)technologyisusedbytheSunmicrosystemissuedbythecompanytodevelopdynamicWebapplicationtechnology.Withitseasy,cross-platform,inmanydynamicWebapplicationprogramminglanguages,inashortspanofafewyears,hasformedacompletesetofstandards,andwidelyusedinelectroniccommerce,etc.InChina,theJSPnowalsogotmoreextensiveattention,getagooddevelopment,moreandmoredynamicwebsitetoJSPtechnology.TherelatedtechnologiesofJSParebrieflyintroduced.TheJSPasimpletechnologycanquicklyandwiththemethodofgeneratingWebpages.UsetheJSPtechnologyWebpagecanbeeasilydisplaydynamiccontent.TheJSPtechnologyaredesignedtomaketheconstructionbasedonWebapplicationseasierandefficient,andtheseapplicationsandvariousWebserver,applicationserver,thebrowseranddevelopmenttoolsworktogether.TheJSPtechnologyisn'ttheonlydynamicwebtechnology,alsonotthefirstone,intheJSPtechnologyexistedbeforetheemergenceofseveralexcellentdynamicwebtechnology,suchasCGI,ASP,etc.Withtheintroductionofthesetechnologiesunderdynamicwebtechnology,thedevelopmentandtheJSP.TechnicalJSPthedevelopmentbackgroundanddevelopmenthistoryInwebbriefhistory,fromaworldwidewebthatmostofthenetworkinformationstaticonstocktransactionsevolutiontoacquisitionofanoperationandinfrastructure.Inavarietyofapplications,maybeusedforbasedonWebclient,looknorestrictions.Basedonthebrowserclientapplicationsthantraditionalbasedonclient/serverapplicationshasseveraladvantages.Thesebenefitsincludealmostnolimitclientaccessandextremelysimplifiedapplicationdeploymentandmanagement(toupdateanapplication,managementpersonnelonlyneedtochangetheprogramonaserver,notthousandsofinstallationinclientapplications).So,thesoftwareindustryisrapidlytobuildontheclientbrowsermulti-layerapplication.TherapidgrowthofexquisitebasedWebapplicationrequirementsdevelopmentoftechnicalimprovements.StaticHTMLtoshowrelativelystaticcontentisrightchoice,ThenewchallengeistocreatetheinteractionbasedonWebapplications,intheseprocedures,thecontentofaWebpageisbasedontheuser'srequestorthestateofthesystem,andarenotpredefinedcharacters.FortheproblemofanearlysolutionistouseaCGI-BINinterface.DeveloperswritetointerfacewiththerelevantproceduresandseparatebasedonWebapplications,thelatterthroughtheWebservertoinvoketheformer.Thisplanhasseriousproblem--eachnewextensibleCGIrequirementsinanewprocessontheserver.Ifmultipleconcurrentusersaccesstothisprocedure,theseprocesseswillusetheWebserverofallavailableresources,andtheperformanceofthesystemwillbereducedtoextremelylow.SomeWebserverprovidershavetoprovidefortheirserverbypluginsandtheAPItosimplifytheWebapplicationdevelopment.ThesesolutionsareassociatedwithcertainWebserver,cannotsolvethespanmultiplesupplierssolutions.Forexample,Microsoft'sActiveServermix(ASP)technologyintheWebpagetocreatedynamiccontentmoreeasily,butalsocanworkinMicrosoftonPersonalWebServerandIIS.Thereareothersolutions,butcannotmakeanordinarypagedesignerscaneasilymaster.Forexample,suchastheServletJavatechnologiescanuseJavalanguageinteractionapplicationservercodeeasier.DeveloperstowritesuchServlettoreceivesignalsfromtheWebbrowsertogenerateanHTTPrequest,adynamicresponse(maybeinquiresthedatabasetofinishtherequest),thensendcontainHTMLorXMLdocumentstotheresponseofthebrowser.note:oneisbasedonaJavaServletJavatechnicaloperationintheserverprogram(withdifferent,thelatteroperatingintheAppletbrowserend).InthisbooktheServletchapter4.Usingthismethod,theentirepagemusthavemadeinJavaServlet.IfdevelopersorWebmanagerswanttoadjustpage,you'llhavetoeditandrecompiletheServletJava,eveninlogichasbeenabletorun.Usingthismethod,thedynamiccontentwiththeapplicationofthepagestillneedtodevelopskills.Obviously,whatisneededisaindustrytocreatedynamiccontentwithinthescopeofthepagesofthesolution.Thisprogramwillsolvethecurrentschemearelimited.Asfollows:canonanyWebserverorapplications.willapplicationpagedisplaysandseparation.canrapidlydevelopingandtesting.simplifytheinteractivedevelopmentbasedonWebapplicationprocess.TheJSPtechnologyisdesignedtomeetsuchrequirements.TheJSPspecificationisaWebserver,applicationserver,tradingsystemanddevelopextensivecooperationbetweenthetoolsuppliers.FromthisstandardtodeveloptheexistingintegrationandbalanceofJavaprogrammingenvironment(forexample,JavaServletandJavaBeans)supporttechniquesandtools.TheresultisakindofnewanddevelopingmethodbasedonWebapplications,usingcomponent-basedapplicationlogicpagedesignerswithpowerfulfunctions.OverallSemanticsofaJSPPageAJSPpageimplementationclassdefinesa_jspService()methodmappingfromtherequesttotheresponseobject.Somedetailsofthistransformationarespecifictothescriptinglanguageused(seeChapterJSP.9,“Scripting”).Mostdetailsarenotlanguagespecificandaredescribedinthischapter.ThecontentofaJSPpageisdevotedlargelytodescribingthedatathatiswrittenintotheoutputstreamoftheresponse.(TheJSPcontainerusuallysendsthisdatabacktotheclient.)ThedescriptionisbasedonaJspWriterobjectthatisexposedthroughtheimplicitobjectout(seeSectionJSP.1.8.3,“ImplicitObjects”).Itsvaluevaries:Init