JSP技术外文文献.docx
- 文档编号:28867021
- 上传时间:2023-07-20
- 格式:DOCX
- 页数:15
- 大小:248.58KB
JSP技术外文文献.docx
《JSP技术外文文献.docx》由会员分享,可在线阅读,更多相关《JSP技术外文文献.docx(15页珍藏版)》请在冰豆网上搜索。
JSP技术外文文献
外文文献
JSPTechnologyandServlets
JSPprofile
JSP(JavaServerPages)isinitiatedbySunMicrosystems
Inc.,
with
manycompaniestoparticipateinth(
eestabli
shment
ofa
dynamicwebpagetechnicalstandards.
JSP
tec
hnology
somewhatsimilartoASPtechnology,itis
in
the
traditional
HTML
webpagedocument(*.htm,*
html)
to
insert
the
Java
programmingparagraph(Scriptlet)
and
JSP
tag
(tag),
thus
JSPdocuments(*.jsp).Using
JSPdevel
opment
ofthe
Web
applicationiscrossthatcan
run
on
Linux,
isalsoavailable
forother
operatingsystems.
JSP
technologytouse
theJava
programmingIanguage
pr
epared
bythecategoryof
XMLtags
andscriptlets,
to
pr
oducedynamicpagespackageprocessing
Ilogic.Page
also
vi
sitby
tagsandscriptlets
existin
theservices
side
of
theresourcesoflogic.
JSPpage
logicandweb
page
de
signanddisplayseparation,
supportreusable
component-base
rttheJavaprogrammingoperationofthedatabasecanbe
reorientedwebsites,inordertoachievetheestablishmentofdynamicpagesneededtofunction.JSPandJavaServle
t,isintheimplementationoftheserver,usuallyreturn
edtotheclientisanHTMLtext,aslongastheclientbrowserwillbeabletovisit.
JSP1.0specificationofthefinalversionislaunched
inSeptember1999,Decemberhasintroduced1.1specifications.AtpresentrelativelynewisJSP1.2norms,JSP2.0normsofthedrafthasalsobeenintroduced.JSPpagesfrom
HTMLcodeandJavacodeembeddedinoneofthecomponents.
JSscriptIanguagesynopsis
JSisjavascrip,JavascriptisonekindthescriptlanguagewhichcomesbytheNetscapeLiveScriptdevelopment,themainpurposeistosolvetheserverterminalIangua
ge,forinstaneePerl,carry-overspeedquestion.Atthat
timeservedtheendtoneedtocarryontheconfirmati
ontothedata,becausethenetworkspeedwasquiteslow,onlythen28.8kbps,theconfirmationstepwaste'stime
weretoomany.ThereforeNetscapebrowserNavigatorhasjoinedJavascript,hasprovidedthedataconfirmationbasic
function.
TheJavaScriptofficialnameis“ECMAScript”.ThisstandardbyECMAorganizationdevelopmentandmaintenance.EC
MA262istheofficialJavaScriptstandard.Thisstandardb
asedonJavaScript(Netscape)andJScript(Microsoft).Nets
cape(Navigator2.0)BrendanEichhasinventedthisIangua
ge,startedfrom1996,alreadyappearedinallNetscapea
ndintheMicrosoftbrowser.TheECMA262developmentbegan
in1996,in1997July,theECMAgeneralmeetinghasac
cepteditsfirstedition.
ThescriptusesonespecificdescriptiveIanguage,rest
soncertainformcompilationtobepossibletheexecutio
ndocument,isalsocalledasgreatorthebatchrundo
cument.Thescriptusuallymaytransfertemporarilybythe
applicationprocedureandcarryout.Eachkindofscript
presentwidelyisappliedinthehomepagedesign,becaus
ethescriptnotonlymayreducethehomepagethescaleandraisesthehomepagebrowsingspeed,moreovermayenr
ichthehomepageperformanee,likeanimation,soundandso
on.Citesamostcommonexample,whenweclickinthe
homepagetheEmailaddresscantransferOutlookExpress
ortheFoxmailthiskindofmailsoftwareautomatically,isrealizesthroughthescriptfunction.Alsobecauseof
scriptthesecharacteristics,thehumanwhoharborsulteriormotivesbysomeareoftenusing.Forexamplejoinssom
edestructioncomputersystem'sorderinthescript,like
thisworksastheuserbrowsinghomepage,oncetransfersthiskindofscript,willthencausetheuserthesyst
emtocomeundertheattack.Thereforetheusershouldactaccordingtovisitshomepagethetrustdegreeselective
securityrank,speciallyregardingtheseitselfcontento
n
theillegal
homepage,
donot
permit
the
usescripteas
ily.
Through
“thesafe
establishment”
the
dialogbox,th
e
choice“
thescript”
under
option
each
kindofestabli
shmentmaywitheaserealizetoscriptbeingforbidandbeginsusing.
JSPandServlets
ThetechnologyofJSPandServletisthemostimporta
nttechnologywhichuseJava
technologytoexploitrequestofserver,anditisal
sothestandardwhichexploitbusinessapplication.Javad
evelopersprefer
to
use
itfora
variety
of
reasons,
one
ofwhichisalreadyfamiliarwith
the
Java
Ianguage
for
thedevelopment
of
this
technology
are
easy
tolearn
Ja
vatotheother
is
"a
preparation,
run
everywhere"to
br
ingtheconcept
of
Web
applications,
To
achievea"one-pr
eparedeverywhererealized."Andmoreimportantly,iffollo
wedsomeoftheprinciplesofgooddesign,itcanbesa
idofseparatingandcontenttocreatehigh-quality,reusa
ble,easytomaintainandmodifytheapplication.Forexa
mple,ifthedocumentinHTMLembeddedJavacodetoomuc
serverpresentedtherequestServlet,
forhandlingrequestsandgeneratearesponse,andthen
gavetheserver,andthenfromtheserversenttothe
customer.AndtheCGIisdifferent,Servletnotgenerate
anewprocess,butwithHTTPServeratthesameproces
s.It
threads
throughtheuseof
technology,
reduce
the
server
costs.
Servlethandling
oftherequest
process
is
this:
Whenreceivedfrom
the
client's
request,
calling
ser
vice
methods,
themethod
of
Servlet
arrival
ofthe
first
judgementis
whattype
of
request
(GET/
POST/
HEAD-
),thencallstheappropriatetreatment(DoGet/doPost/doHead…)andgeneratearesponse.
Althoughsuchacomplex,infact,simplysaidtoServ
letisaJavaclass.Andthegeneralcategoryofthedi
fferenceisthatthistypeoperatinginaServletcontain
er,whichcanprovidesessionmanagementandtargetedlifecyclemanagement.SothatwhenyouusetheServlet,you
cangetallthebenefitsoftheJavaplatform,including
thesafetyofthemanagement,useJDBCaccessthedatabaseandcrossplatformcapability.Moreover,Servletusingthread,andcandevelopmoreefficientWebapplications.
JSPtechnologyisakeyJ2EEtechnology,itatahig
herlevelofabstractionofaServlet.Itallowsconventi
onalstaticanddynamicHTMLcontentgeneratedbycombinin
ganHTMLpagelookslike,butasaServlettorun.Th
erearemanycommercialapplicationserversupportJSPtechnology,suchasBEAWebLogic,IBMWebSphere,JRun,andsoon.JSPandServletusemorethansimple.Ifyouhave
aJSPsupportforWebservers,andaJSPdocument,you
canputitFangdaoanystaticHTMLfilescanbeplaced
donothavetocompile,donothavetopack,donothavetoClassPathsettings,youcanvisitasordinaryW
ebItdidvisit,theserverwillautomaticallyhelpyoutodootherwork.
JSPdocumentlookslikeanordinarystaticHTMLdocume
nt,butinsidecontainsanumberofJavacode.Ituses.
Jspthesuffix,usedtotelltheserverthisdocument
inneedofspecialtreatment.WhenwevisitaJSPpage,
thedocumentwillfirstbetranslatedintoaJSPengine
Javasourcefiles,isactuallyaServlet,andcompiler,andthen,likeotherServlet,fromServletenginetohandle.Servletengineofthistypeloading,handlingreques
ts
from
customers,and
the
results
returned
tothecustom
er.
After
anothervisit
this
page
tothecustomer,as
Ion
g
asthe
paperthere
have
been
nochanges,
JSPengine
h
as
been
loadeddirectly
call
the
Servlet.If
youhave
al
readybeenmodified,it
will
be
onceagain
theimplementa
tionoftheaboveprocess,translate,compileandload.I
nfact,thisistheso-called"firstpersontopunishment
."Becausewhenthefirstvisittotheimplementationof
aseriesoftheaboveprocess,sowillspendsometime
aftersuchavisitwouldnot.
JavaservletsofferapowerfulAPIthatprovidesaccesstoalltheinformationabouttherequest,thesession,
andtheapplication.combiningJSPwithservletsletsyo
uclearlyseparatetheapplicationlogicfromthepresentationoftheapplication;inotherwords,itletsyouuse
themostappropriatecomponenttypefortherolesofModel,ViewandController.
Servlets,Filters,andListeners
AservletisaJavaclassthatextendsaserverwith
functionalityforprocessingarequestandproducingar
esponse.It'simplementedusingtheclassesandinterfaces
definedbytheServletAPI.TheAPIconsistsoftwopa
ckages:
thejavax.servletpackagecontainsclassesandinte
rfacesthatareprotocolindependent,whilethejavax.servlet
.httppackageprovidesHTTP-specificextensionsandutilityclasses.
Whatmakesaservletaservletisthattheclassimplementsaninterfacenamedjavax.servlet.Servlet,eitherdir
ectlyorbyextendingoneofthesupportclasses.Thisi
nterfacedefinesthemethodsusedbythewebcontainerto
manageandinteractwiththe
servlet.AservletforprocessingHTTPrequeststypically
extendsthe
javax.servlet.http.HttpServletclass.Thisclassimplements
theServletinterfaceandprovidesadditionalmethodssuita
bleforHTTPprocessing.
ServletLifecycle
Thewebcontainermanagesallaspectsoftheservlet'sl
ifecycle.Itcreatesaninstaneeoftheservletclasswhe
nneeded,passesrequeststotheinstaneeforprocessing,
andeventuallyremovestheinstanee.ForanHttpServlet,
thecontainercallsthefollowingmethodsattheappropr
iatetimesintheservletlifecycle.
BesidesthedoGet()anddoPost()methods,therearemethodscorrespondingtotheotherHTTPmethods:
doDelete(
),doHead(),doOption
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JSP 技术 外文 文献
![提示](https://static.bdocx.com/images/bang_tan.gif)