计算机相关外文翻译3.docx

上传人:b****4 文档编号:13897909 上传时间:2023-06-19 格式:DOCX 页数:13 大小:26.30KB
下载 相关 举报
计算机相关外文翻译3.docx_第1页
第1页 / 共13页
计算机相关外文翻译3.docx_第2页
第2页 / 共13页
计算机相关外文翻译3.docx_第3页
第3页 / 共13页
计算机相关外文翻译3.docx_第4页
第4页 / 共13页
计算机相关外文翻译3.docx_第5页
第5页 / 共13页
计算机相关外文翻译3.docx_第6页
第6页 / 共13页
计算机相关外文翻译3.docx_第7页
第7页 / 共13页
计算机相关外文翻译3.docx_第8页
第8页 / 共13页
计算机相关外文翻译3.docx_第9页
第9页 / 共13页
计算机相关外文翻译3.docx_第10页
第10页 / 共13页
计算机相关外文翻译3.docx_第11页
第11页 / 共13页
计算机相关外文翻译3.docx_第12页
第12页 / 共13页
计算机相关外文翻译3.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

计算机相关外文翻译3.docx

《计算机相关外文翻译3.docx》由会员分享,可在线阅读,更多相关《计算机相关外文翻译3.docx(13页珍藏版)》请在冰点文库上搜索。

计算机相关外文翻译3.docx

计算机相关外文翻译3

With thepopularity of theInter NET applications, avarietyofWeb InformationSystem

Hasbecome a pressing issue. Establish the essence of Web informationsystems

Developmentofa Web repository (database asthecoreof avarietyof Web letter

Informationstorage) asthecore Web applications. Currently,theWeb repositorydevelopment technology

Operation of awiderangeof differentcharacteristics. Variousperiods atalllevels, avarietyofpurposes

Technology co-exist, dizzying mirror chaos,itisdifficultto choose. More popular

Java ofSer vet Web repository development program amorepractical

Of choice.

Servlet is running the applet ontheWebserver, canbecompleted Xu

Multi-client Applet cannotcomplete thework,whichruns ontheserver and clients

No end,donot download donot by the client securityrestrictions, the running speed

Greatlyincreased

AndApplet running in a browser and extend the browser's ability similar

Like, Serv thelet run in theWeb server to enable Java Serv thelet engine

Andexpand the capacity of the server. Therefore,wecansay Serv thelet is run in

Applet onaWebserver, Serv thelet JavaServletAPI

And Jav a program of classes andpackages.

1Servlet access model

2Serv thelet,therearethree accessmodels:

(1) anaccess model 

1 browserto Webserver to issue a retrieval request.

2 theWeb server after receiptoftherequest, the request forwardedtothe  Servletengine.

3Serlet engine toperformtherequested the Servlet and directly throughJDBC

4Servlet throughJDBC toretrieve searchresults to generate the html pageand

Page backto the Webserver.

5 theWeb server thepage is sent backtothebrowser.

(2)Thesecond access model 

1 browserto Webserver to issue a retrieval request.

2 theWeb serverreceivestherequest afterthe request forwardedto the ofSer v theletengine.

3Servlet engine toperformthe request the the Servlet and retrieve sent

Ja, vabean access to the data.

4data access the Javabean searchabledatabase throughJDBC information

And fromthesearchresults stored in itself.

5Servlet remove searchresults from the data access Javabean generate

Html pageand Ht mlof page backtothe w eb server.

6 theWeb server thepage is sent backtothebrowser.

(3) Thethird accessmodel

1A browser issue a retrieval request totheWebserver.

2 Web serverreceivestherequest afterthe request forwardedto the ofSer v thelet engine.

OfSer vlet engine toperformtherequested Servlet directly throughJDBC inspection

3The cable databaseand searchresults arestoredinthe resultisstored the Javabean into.Javabean,

 4. Ser v thelet from the resultsarestored to remove the searchresults and

JSPfiles to format the output page.

2 Servlet functionalityand lifecycle

2.1Servlet functions

(1) Create andreturn dynamicWebpages based on customerrequests.

(2) create canbeembeddedinto existing HTMLpages aspartof HTML

Page(HT fragment) of theML.

(3) and other serverresources (includingdatabases and applications based on the Jav a

Program) tocommunicate.

(4) to handle multiple client connections,receiving the input of more than one client,and

Theresults broadcastto multipleclients. For example,Ser vlet isamulti-participant

Gameserver.

(5) ofMIM E type filter information on the specialhandling,suchas image

Conversionand server-side include (SSI).

(6) custom processing available to allserversin thestandard routine.

2.2Servletlifecycle

Servlet lifecycle begins with itinto the Webserver'smemory

And end in the terminationor re-loaded Serv thelet.

(1)load.

Load the servlet atthefollowing times:

1.Ifyouhaveconfigured automatic load option,and then start the Webserver automaticallyloaded

2.After the start of the Webserver, the client Serv thelet issued for the first time,please

Demand.

3.Reload Serv thelet.

Loaded Servlet,Webservers tocreatea servletinstance, and

Servlet's init()method is called. Servlet initialization parameters in the initializationphase,

The number ispassed totheServlet configurationobject.

(2)terminate

When the Webserver nolonger needs the servlet, or reload Servlet

Anewinstanceof the server calls Serv thelet's destroy()method, removeitfromthe

Memory deleted.

3Howto call Servlet

Method ofSer vlet is called Total fivekinds:

 call intheURL in the form

Tag call, call, in HT theML page in the JSPfiles

Call, call inanASPfile. Thefollowing itemized tobeintroduced.

(1)callthe servlet intheURL.

Simply inputformat inthebrowser as http:

∥yourwebserver

thesame the ser vlet name name /servlet path/ servlet theURL to

The site canbe. Ofwhich:

yourwebservername is to referto the Servlet wheretheWebserver name, theservlet pathisthe path referstothe Servlet, theservletThe name refersto the Servlet realname or analias.

(2)calltheServlet tags

Call ofSer thelet the the  tag allowsusersto inputdata ontheWebpage, andinputdata submittedtothe vlet ofSer.Serv thelet will be submitted toreceivedata indifferentways.Forexample:

 {placethe textinputarea tags, buttonsand otherlogos}

(3)intheHTMLpage to call the servlet.

Use  mark tags, noneedtocreate acomplete HTMLpage.Instead,the servlet output isonly part of the HTMLpage (HTML fragment) and dynamicallyembeddedintothe statictext in the original HTMLpage.Allthishappened ontheserver andsent totheuser only theresultingHTMLpage.

  tag contained in the originalHTML page.Servletwill beinvoked in thesetwomarkers and the Servlet response will cover thesetwomarkersbetween all things and mark itself,forexample:

〈S

ERVLETNAME=“myservlet”CODE=“myservlet.

class”CODEBASE=“url”initparam=“value”〉

〈PARAMNAME=“parm1”VALUE=“value1”〉

〈PARAMNAME=“parm2”VALUE=“value2”〉

⋯⋯

〈/

SERVLET〉

(4)callthe servlet in the JSPfiles.

Call in the JSP file format used by the Servlet and HTML page tocall exactlythesame.Andthe principles areidentical. Only reconcile its dynamic JSP fileisnota staticHTML page.

(5)inanASPfile calls the servlet.

Ifyou Micr oso ft I nt ernet Informatio n-Ser ver (II S) onthe legacy oftheASPfile, and cannotbe ASPfiles transplanted into a JSPfile, youcanuse the ASPfile to ofSer vlet iscalled.Butitmustbe through a special ActiveX control, anASPfile isonlythrough itcan callthe servlet.

4Servlet Howto use ConnectionManager toefficientlymanage thedatabaseconnection

(1)thefunctionality of the ConnectionManager.

For non-Webapplications, Web-based application accesstothedatabase willleadtohigher and unpredictable overhead,whichis dueto morefrequent Webusers connectanddisconnect.Normallyconnected to theresourcesused and disconnectfromthedatabasewillfarexceed the resources used in the retrieval.ConnectionManager functionis tominimize the additional occupancy of the usersof the database resources toachieve thebestperformance of databaseaccess.

ConnectionManager sharing overhead throughtheestablishmentof the connectionpoolwillconnect users Servlet available tomultipleusers request.In other words,eachuserrequest onlythe connect/ disconnect with asmallportion of the overhead costs.Initialresources toestablish the connection of the buffer pool, the rest of the connect/ disconnectoverhead isnotbig,because thisisonly reuse the existing connection.

Serv thelet inthefollowingmanner usingthe connectionpool:

 When a user through

Request Web Serv thelet thelet Serv use anexisting connection fromthebufferpool

Next, thismeansthat the userrequests donotcause the connectiontothedatabasesystem overhead. In

After the termination of serv thelet it connect toreturn to the pool forits ConnectionManager

The Servlet. Thus, the user request doesnotcause thedatabase isdisconnected

Ofsystemoverhead.

ConnectionManager alsoallowsusers to beabletocontrol the concurrency of thedatabaseproducts even

Then thenumber. When the database licenseagreement limit the numberofusers, thisfeature is

Veryuseful. Create abuffer pool forthedatabase,and connectionmanagement

Buffering pool "maximum numberofconnections" parameter setto the database productlicense limit

Given maximumnumberofusers. Ifyouuse otherprograms without ConnectionManagerconnections

Database,youcannot guaranteethatthemethod is effective.

(2)thestructureof theConnectionManager.

(3)ConnectionManagerconnectionpooltomaintainaconnectiontoaspecificdatabaseisopen. Step1:

WhenthefirstServthelettryingtoConnectionManagercommunicationsisloadedbytheJavaApplicationServerConnectionManager. AslongastheJavaapplicationserverrunningtheConnectionManagerhasbeenloaded.Step2:

TheJavaapplicationserverpassestherequesttoaservlet. Step3:

ServletConnectionManagerrequestsaconnectionfromthepool. Stepfour:

thebufferpooltoServletallocatedapoolofexistingidleconnection. Step5:

servlettousetoconnectadirectdialoguewiththedatabase,thisprocessisthestandardAPIforaparticulardatabase. Step6:

thedatabasethroughServlettheconnectionreturnsdata. Step7:

WhentheServletendtocommunicatewiththedatabase,servletconnectionsreturnedtotheconnectionmanagerpoolforotherservletuses.Step8:

ServletJavaapplicationservertotheusersendsbackresponse.Servletrequestsaconnection,ifthebufferpool,thereisnoidleconnection,thentheconnectionmanagerdirectlycommunicatewiththedatabase. ConnectionManagerwill:

Step9:

tothedatabaserequestsanewconnection. Step10:

Addconnectionstothebufferpoo

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

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2