外文原文
The Jsp status analysis
      ——From webdev.csdn/page/ffb4d8ea-5aba-41bf-933d-1cf6a940c0c7
1.Jsp principle analysis
The JSP (Java Server Pages) is advocated by the Sun Microsystems, many companies joined to establish a dynamic web technology standard. In a traditional techniques JSP page Hypertext Markup Language,HTML files insert Java program and tag labeling,thus forming the JSP files. The JSP is a Java for Web Servlet (developer offers a simple,consistent mechanism,to expand the Web server functions,and the business system has expanded,the interactive) are executed on the server and the client is usually return an HTML text,so the client browser can browse as. It will be a Java script writing part is embedded into the dynamic ordinary HTML or XML a page. A complete Web application by three layers: Web server,Servlet engine and Jsp engine. When Web application server first received the JSP pa
ge,first by the JSP engine pretreatment and change the Servlet Java,and stored in the server's memory (which makes in the next to the call,the server page will have very quick response),after Servlet engine running,along with JSP files. html代码翻译中文
The HTML code returned to customers together. Insert the Java program can operate database,directional pages,in order to realize a dynamic pages required functions.
2.the Jsp language comparative analysis
The dynamic web development early technology is used IN CGI interface - B. The development of technology of serious problems exist - each new CGI programs in a new requirements on the server. If multiple concurrent users access to this procedure,these processes will deplete the Web server of all available resources,until its collapse.
In order to overcome the disadvantages of Microsoft,put forward the Active Server mix (ASP) technology,this technology using "plug-in" and the API simplifies Web applications of development,can produce and the operation of the dynamic interaction,and high-performan
ce Web service applications. Compared with CGI ASP,its advantage is to contain HTML tags,can direct access database and use the ActiveX controls,infinite expansion in the programming of more flexible. But the technology is basically confined to Microsoft operating system platform. Hypertext Preprocessor (Hypertext Preprocessor facilities),namely web development technology and dynamic PHP,ASP similar embedded HTML document is a server-side scripting language. PHP in most Unix/Linux platform,GUN and Microsoft Windows platforms can run. PHP advantages of convenient installation,mainly has: the learning process is simple,Database connection convenient,good compatibility,Extensible,Can undertake object-oriented programming,etc. But there are also some PHP weaknesses,first PHP is an explanation of the language,not supports multi-threading structure. Secondly,the lack of multi-layer structure support. Again,PHP database interfaces provide support,this makes it for some e-commerce applications,PHP is not suitable. Sun Microsystems (from Inc1) on a Web server Microsystems,application server,trading system and development tool widely support and cooperation between suppliers,integration and balance the already existing programming e
nvironment for Java (for example JavaServlets and Jav2aBeans) support techniques and tools after a new and developing method based on Web applications - JavaServer mix technology (JSP). Compared with over several languages,JSP certain advantages: first,the JSP to be efficient and better safety: JSP in before has been compiled into the bytecode (an uploaded file code),from Java virtual machine bytecode VirtualMachine (Java implementation,explain the source of high efficiency than explanation,Server bytecode and the Cache mechanism,can improve the efficiency of the bytecode visit. The first call JSP page may be a bit slow,because it has been compiled into the Cache,then much faster. At the same time,the JSP source program is unlikely to be downloaded,especially JavaBean program can not put the foreign directory. Secondly,the JSP have more extensive operation platform,can be on any Web server or applications from a platform to another platform,JSP and JavaBean even without recompiling the,because the Java bytecode are standard and platform irrelevant,Again,the JSP components (Component) way more convenient,ASP through to expand the COM complex functions,such as file upload,sending email and processing or complex calculation isolated become independent reusable module. The JSP
JavaBean through was the same function expansion. In development,development of COM than JavaBean complex and trival,from this can be seen in the example above JavaBean development is very convenient. In the maintenance,the COM must be registered with the server,if changed the COM program,you must register,even to shutdown and restart. Registration is not needed,JavaBean CLASSPATH on the list contains. Additionally,the OOP JavaBean is completely according to different business processing can be conveniently function established a reusable libraries of objects,such as user access control,automatic reply email,etc.
3.the Jsp technical analysis
(1) the generation and display to separate
Use the JSP technology,Web page developers can use HTML or XML logo design and formatting pages,and eventually use JSP logo or feet was generated page dynamic content. Because the core logic is enclosed in a logo and JavaBeans,so the Web page designers,management and able to edit and use the JSP page without affecting the content.
In the server JSP engines interpret JSP logo and scripts,generating the request,and will result in HTML page (or XML) sent to the browser. It helps to protect their code,the authors also can ensure based on any HTML Web browser fully usability.
(2) reusable components
Most JSP page depends on the reusable component,cross-platform JavaBeans Enterp rise (or JavaBeans components) to execute the application requirements of complicated processing. Developers can exchange and sharing the common operation execution component,or to make these components for more users and customer groups. Component based method,and accelerate the overall development and make various organizations in their existing skills and optimize the development efforts in the balance.
(3) using logo
Web page is not familiar with the developer of the scripting language programmer. The JSP wrapping the many function,these functions are easy,and JSP related XML identification of
dynamic content generation need. Through the development,logo can be further expanded. Technical JSP Third-party developers and other personnel for the common functions create their own logo,Web page which developers can use the tools and familiar with the same as identifier to perform specific functions of components for work.
(4) to the platform
Almost all the platform supports a Java,JSP + JavaBeans can almost in all the workbench came unstuck. From a platform to another platform,JSP and JavaBeans even without recompiling the bytecode Java,because is the standard with the platform.
(5) database connection
Connect to the database technology in Java,Java program is JDBC driver and via JDBC database query,extracting data,etc. Sun microsystem companies have also developed JDBC - use this technology bridge ODBC,Java program can access the database with ODBC driver,most current database system with ODBC driver,so can visit program such as Oracle Java Sybase,MS SQL Server,database and MS Ac2cess etc.
(6) use Java advantage
Because the JSP page built-in scripting language is based on Java,and all the JSP page were compiled Servlets Java,so as the JSP page with Java technologies,including all good storage management and safety of robust and can support the highly complex based on Web applications. As part of the platform of Java,JSP has written a Java programming language ","characteristics of operation. The JSP technology integration to a variety of easy application system structure,in order to take advantage of existing skills and tools,and can be extended to support the distributed applications software.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。