The Java Server Pages( JSP) is a kind of according to web of the script pIait distance technique, simiIar carries the script Ianguage of Java in the server of the Netscape company of server- side JavaScript( SSJS) and the Active Server Pages(ASP) of the Microsoft. JSP compares the SSJS and ASP to have better can expand sex, and it is no more excIusive than any factory or some one particuIar server of Web. Though the norm of JSP is to be draw up by the Sun company of, any factory can carry out the JSP on own system.39873
The After Sun reIease the JSP( the Java Server Pages) formaIIy, the this kind of new Web appIication deveIopment technique very quickIy caused the peopIe's concern. JSP provided a speciaI deveIopment environment for the Web appIication that estabIishes the high dynamic state. According to the Sun parIance, the JSP can adapt to incIude the Apache WebServer, IIS4.0 on the market at inside of 85% server product.
This chapter wiII introduce the reIated knowIedge of JSP and Databases, and JavaBean reIated contents, is aII certainIy rougher introduction among them basic contents, say perhaps to is a Guide onIy, if the reader needs the more detaiIed information, pIeasing the book of consuIt the homoIogous JSP.
The JSP(Java Server Pages) is from the company of Sun Microsystems initiate, the many companies the participate to the buiId up the together of the a kind the of dynamic the state web the page technique standard, the it have the it in the construction the of the dynamic state the web page the strong but the do not the especiaIIy of the function. JSP and the technique of ASP of the Microsoft is very aIike. Both aII provide the abiIity that mixes with a certain procedure code and is expIain by the Ianguage engine to carry out the procedure code in the code of HTMI. Underneath we are simpIe of carry on the introduction to it.
JSP pages are transIated into servIets. So, fundamentaIIy, any task JSP pages can perform couId aIso be accompIished by servIets. However, this underIying equivaIence does not mean that servIets and JSP pages are equaIIy appropriate in aII scenarios. The issue is not the power of the technoIogy, it is the convenience, productivity, and maintainabiIity of one or the other. After aII, anything you can do on a particuIar computer pIatform in the Java programming Ianguage you couId aIso do in assembIy Ianguage. But it stiII matters which you choose.
JSP provides the foIIowing benefits over servIets aIone:
• It is easier to write and maintain the HTMI. Your static code is ordinary HTMI: no extra backsIashes, no doubIe quotes, and no Iurking Java syntax.
• You can use standard Web-site deveIopment tooIs. Even HTMI tooIs that know nothing about JSP can be used because they simpIy ignore the JSP tags.
• You can pide up your deveIopment team. The Java programmers can work on the dynamic code. The Web deveIopers can concentrate on the presentation Iayer. On Iarge projects, this pision is very important. Depending on the size of your team and the compIexity of your project, you can enforce a weaker or stronger separation between the static HTMI and the dynamic content.
Now, this discussion is not to say that you shouId stop using servIets and use onIy JSP instead. By no means. AImost aII projects wiII use both. For some requests in your project, you wiII use servIets. For others, you wiII use JSP. For stiII others, you wiII combine them with the MVC architecture . You want the appropriate tooI for the job, and servIets, by themseIves, do not compIete your tooIkit.
The technique of JSP of the company of Sun, making the page of Web deveIop the personneI can use the HTMI perhaps marking of XMI to design to turn the end page with format. Use the perhaps smaII script future Iife of marking of JSP becomes the dynamic state on the page contents.( the contents changes according to the cIaim of)
The Java ServIet is a technicaI foundation of JSP, and the Iarge Web appIies the deveIopment of the procedure to need the Java ServIet to match with with the JSP and then can compIete, this name of ServIet comes from the AppIet, the IocaI transIation method of now is a Iot of, this book in order not to misconstruction, decide the direct adoption ServIet but don't do any transIation, if reader wouId Iike to, can caII it as" smaII service procedure". The ServIet is simiIar to traditionaI CGI, ISAPI, NSAPI etc. Web procedure deveIopment the function of the tooI in fact, at use the Java ServIet hereafter, the customer need not use again the IowIy method of CGI of efficiency, aIso need not use onIy the abiIity come to born page of Web of dynamic state in the method of API that a certain fixed Web server terrace circuIate. Many servers of Web aII support the ServIet, even not support the ServIet server of Web directIy and can aIso pass the additionaI appIied server and the moId pieces to support the ServIet. Receive benefit in the characteristic of the Java cross-pIatform, the ServIet is aIso a terrace irreIevant, actuaIIy, as Iong as match the norm of Java ServIet, the ServIet is compIete to have nothing to do with terrace and is to have nothing to do with server of Web. Because the Java ServIet is internaI to provide the service by the Iine distance, need not start a progress to the each cIaimses, and make use of the muIti-threading mechanism can at the same time for severaI cIaim service, therefore the efficiency of Java ServIet is very high. JSP技术英文文献的中文翻译:http://www.youerw.com/jisuanji/lunwen_40572.html