JSP technology and benefits.docx

上传人:b****6 文档编号:7416879 上传时间:2023-01-23 格式:DOCX 页数:9 大小:23.59KB
下载 相关 举报
JSP technology and benefits.docx_第1页
第1页 / 共9页
JSP technology and benefits.docx_第2页
第2页 / 共9页
JSP technology and benefits.docx_第3页
第3页 / 共9页
JSP technology and benefits.docx_第4页
第4页 / 共9页
JSP technology and benefits.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

JSP technology and benefits.docx

《JSP technology and benefits.docx》由会员分享,可在线阅读,更多相关《JSP technology and benefits.docx(9页珍藏版)》请在冰豆网上搜索。

JSP technology and benefits.docx

JSPtechnologyandbenefits

JSPtechnologyandbenefits

JSPIntroduction

JSP(JavaServerPages)isaJava-basedscriptingtechnology.IsadvocatedbySunMicrosystemsInc.,togetherwithanumberofcompaniesinvolvedintheestablishmentofadynamicwebpagetechnologystandard.JSPtechnologyissomewhatsimilartoASPtechnology,ItisatraditionalHTMLpagefile(*.htm,*.html)toinsertJavaprogramsegment(Scriptlet)andJSPtag(tag),toformtheJSPfile(*jsp).WebdevelopmentwithJSPisacross-platformapplicationthatcanrununderLinux,butalsoinotheroperatingsystems.IntheJSPofthemanyadvantages,oneofwhichisthatitwillbeHTMLencodedWebpagefromthebusinesslogicseparatedeffectively.JSPaccesswithreusablecomponents,suchasServlet,JavaBeanandJava-basedWebapplications.JSPalsosupportsdirectlyintheWebpageembeddedJavacode.JSPcanbeusedtwowaystoaccessdocuments:

JSPdocumentssentbythebrowserrequest,therequestsenttotheServlet.JSPtechnologyusesJavaprogramminglanguage,XML-typetagsandscriptlets,tohaveapackagedealwiththelogicofdynamicpages.Pagetagsandscriptletscanalsoexistintheserveraccesstotheresourcesoftheapplicationlogic.JSPlogicandWebpagedesignanddisplayisolatedandsupportreusablecomponent-baseddesign,Web-basedapplicationsmorequicklyandeasilydeveloped.

TheWebserverwhenmeetsvisitstheJSPhomepagetherequest,firstcarriesoutsegment,willthencarryouttheresultcodetoreturntogetherwithJSPinthedocumentHTMLforthecustomer.TheinsertionJavasegmentmayoperatethedatabase,againthedirectionalhomepageandsoon,realizesthefunctionwhichtheestablishmentdynamichomepageneeds.JSPandJavaServletarethesame,isintheserverendexecution,usuallyreturnstothisclientsideisaHTMLtext,thereforeclientside,solongashasthebrowsertobeabletoglanceover.

TheJSPpageiscomposedoftheHTMLcodeandtheinsertingJavacode.TheserverinthepagebytheclientsidewasrequestedthatlaterwillcarryonprocessingtotheseJavacode,willthenproducetheHTMLpagewillreturngivestheclientsidethebrowser.JavaServletistheJSPtechnologybase,moreoverthelarge-scaleWebapplicationprocedure'sdevelopmentneedsJavaServletandtheJSPcoordinationcancomplete.JSPhadtheJavatechnologysimplyeasytouse,completeobject-oriented,hadtheplatformindependency,andsafereliable,mainlyfacedInternet'sallcharacteristics.

JSPcomputingtechnique

Tocarryonthedynamicwebsiteconvenientlyfastthedevelopment,JSPhasmadetheimprovementinthefollowingseveralaspects,causesittobecomebuildsthecrossplatformfastthedynamicwebsitefirstchoiceplan.

1.carriesonthecontentproductionandthedemonstrationseparates

WiththeJSPtechnology,theWebpagedevelopmentpersonnelmayuseHTMLortheXMLmarkingdesignandtheformattedfinalpage,andusestheJSPmarkingorthetootsyproducesonpage'sdynamiccontentoriginally.Productioncontent'slogicissealedinmarksandintheJavaBeansmodule,andtiesupinthescript,allscriptsinserverendmovement.BecausecorelogicissealedinmarksandinJavaBeans,thereforetheWebadministrativepersonalsandthepagedesigner,caneditandusetheJSPpage,butdoesnotaffectthecontenttheproduction.Intheserverend,theJSPengineexplainedthattheJSPmarkingandthescript,producethecontentwhichrequested,and(orXML)page'sformtransmitstheresultbyHTMLthebrowser.Thisbotharehelpfulintheauthorprotectsowncode,andcanguaranteeanybasedontheHTMLWebbrowser'scompleteusability.

2.mayentrustwithheavyresponsibilitythemodule

TheoverwhelmingmajorityJSPpagereliesonmayentrustwithheavyresponsibility,thecrossplatformmodule(JavaBeansorEnterprisetheJavaBeansmodule)carriesoutcomplexprocessingwhichtheapplicationprocedurerequests.Thedevelopmentpersonnelcanshareandexchangetheexecutionordinaryoperationthemodule,orcausesthesemodulesusesformoreusersandthecustomerassociation.Hasacceleratedtheoveralldevelopmentprocessbasedonmodule'smethod,andcauseseachkindoforganizationobtainsbalancedintheirexistingskillandintheoptimizedresultdevelopmentendeavor.

3.usesmarking

TheWebpagedevelopmentpersonnelwillnotbethefamiliarscriptlanguageprogrammers.TheJSPtechnologyhassealedmanyfunctions,thesefunctionsareeasytouse,markingtocarryonthedynamiccontentproductionwithJSPintherelatedXMLtoneed.ThestandardJSPmarkingcanvisitandtheinstantiationJavaBeansmodule,theestablishmentortheretrievalmoduleattribute,downloadsApplet,aswellastheexecutiondifficultywithcodesandthetime-consumingfunctionwithothermethods.

4.adaptstheplatform

NearlyallplatformssupportJava,JSP+JavaBeanstobepossibletopassunimpedednearlyunderallplatforms.Transplantsfromaplatformtootherplatform,JSPandJavaBeansdoesnotevenneedtotranslate,becausetheJavabytecodeisstandardhasnothingtodowiththeplatform.

5.databaseconnection

InJavaconnectsthedatabasethetechnologyistheJDBC,JavaprocedureisconnectedthroughtheJDBCdriverandthedatabase,operationsandsoonexecutioninquiry,extractiondata.SunCorporationhasalsodevelopedJDBC-ODBCbridge,usesthistechnicalJavaproceduretobepossibletovisithastheODBCdriverdatabase,atpresentthemajoritydatabasesystemshavetheODBCdriver,thereforetheJavaprocedurecanvisitsuchasOracle,Sybase,MSSQLServeranddatabasesandsoonMSAccess.Inaddition,throughthedevelopmentmarkingstorehouse,theJSPtechnologymayfurtherexpand.Thethirdpartydevelopmentpersonnelandotherpersonnelmayfoundtheirmarkingstorehouseforthecommonlyusedfunction.ThisenablestheWebpagedevelopmentpersonneltobeabletousethefamiliartoolandtobesimilartomarkingsamecarriesoutthespecificfunctioncomponenttocarryonthework.TheJSPtechnologyveryeasyconformitytomanykindsofapplicationarchitecture,tousetheextanttoolandtheskill,andcanexpandtothesupportenterprisedistributionalapplication.

BenefitsofJSP

(1)ItiseasiertowriteandmaintaintheHTML.YourstaticcodeisordinaryHTML:

noextrabackslashes,nodoublequotes,andnolurkingJavasyntax.

(2)YoucanusestandardWeb-sitedevelopmenttools.EvenHTMLtoolsthatknownothingaboutJSPcanbeusedbecausetheysimplyignoretheJSPtags.

(3)Youcandivideupyourdevelopmentteam.TheJavaprogrammerscanworkonthedynamiccode.TheWebdeveloperscanconcentrateonthepresentationlayer.Onlargeprojects,thisdivisionisveryimportant.Dependingonthesizeofyourteamandthecomplexityofyourproject,youcanenforceaweakerorstrongerseparationbetweenthestaticHTMLandthedynamiccontent.

AdvantagesofJSPoverCompetingTechnologies

First,JSPisportabletomultipleoperatingsystemsandWebservers;youaren'tlockedintodeployingonWindowsandIIS.Althoughthecore.NETplatformrunsonafewnon-Windowsplatforms,theASPpartdoesnot.YoucannotexpecttodeployseriousASP.NETapplicationsonmultipleserversandoperatingsystems.Forsomeapplications,thisdifferencedoesnotmatter.Forothers,itmattersgreatly.

Second,forsomeapplicationsthechoiceoftheunderlyinglanguagemattersgreatly.Forexample,although.Net’sC#languageisverywelldesignedandissimilartoJava,fewerprogrammersarefamiliarwitheitherthecoreC#syntaxorthemanyauxiliarylibraries.Inaddition,manydevelopersstillusetheoriginalversionofASP.Withthisversion,JSPhasaclearadvantageforthedynamiccode.WithJSP,thedynamicpartiswritteninJava,notVBScriptoranotherASP-specificlanguage,soJSPismorepowerfulandbettersuitedtocomplexapplicationsthatrequirereusablecomponents.

VersusPHP,PHP(arecursiveacronymfor"PHP:

HypertextPreprocessor")isafree,open-source,HTML-embeddedscriptinglanguagethatissomewhatsimilartobothASPandJSP.OneadvantageofJSPisthatthedynamicpartiswritteninJava,whichalreadyhasanextensiveAPIfornetworking,databaseaccess,distributedobjects,andthelike,whereasPHPrequireslearninganentirelynew,lesswidelyusedlanguage.AsecondadvantageisthatJSPismuchmorewidelysupportedbytoolandservervendorsthanisPHP.

VersusPureServlets,JSPdoesn'tprovideanycapabilitiesthatcouldn't,inprinciple,beaccomplishedwithservlets.Infact,JSPdocumentsareautomaticallytranslatedintoservletsbehindthescenes.Butitismoreconvenienttowrite(andtomodify!

)regularHTMLthantouseazillionprintlnstatementstogeneratetheHTML.Plus,byseparatingthepresentationfromthecontent,youcanputdifferentpeopleondifferenttasks:

yourWebpagedesignexpertscanbuildtheHTMLbyusingfamiliartoolsandeitherleaveplacesforyourservletprogrammerstoinsertthedynamiccontentorinvokethedynamiccontentindirectlybymeansofXMLtags.

SecurityofJSP

JSPandotherPHP,ASPnotthesameworkingmechanism,althoughitisalsoawebprogramminglanguage.ThefirstcalltoaJSPfileiscompiledtoServletimplementationprocess.Wewantedtodothings,sothatbeforetheJSPiscompiledbythebrowserasatextorotherdocumentssenttotheclient,orwhennotloadedintheJSPimplementationofthecompiledJSPServletreadthecontentdirectlysenttothecustomerend.

JSPiscompiledtoServletsavedinthespecifieddirectory,suchas:

lovehacker/index.jspislikelytobestoredinX:

IBMWAServerempdefault_hostdefault_apppagecompile\_lovehacker_index_xjsp.class,whichisalreadycompiledindex.jsp._lovehacker_index_xjsp.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 人力资源管理

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1