With the development of web technology and the advent of e-commerce era, people are no longer satisfied with the establishment of a variety of static sites to publish information, more times need to be able to interact with users, and provide background database management and control services such as Dynamic Web site.
Dynamic Web Development Technology
The early Dynamic Web development technology uses the Cgi-bin interface. Developers write separate programs and web-based applications that are related to interfaces, which are invoked by the Web server to invoke the former. There are serious scalability issues with this development technology--each new CGI program requires the addition of a process on the server. If multiple users access the program concurrently, these processes deplete all of the available resources for the Web server until it crashes.
To overcome this disadvantage, Microsoft has presented active Server Pages (ASP) technology that simplifies the development of Web applications using Plug-ins and APIs. ASP, compared with CGI, has the advantage of being able to include HTML tags, direct access to the database and the use of unlimited extensions of ActiveX controls, and therefore more flexible programming. But the technology is basically limited to Microsoft's operating system platform, the main work environment is Microsoft's IIS application structure, so the ASP technology can not easily implement Cross-platform Web server program development.
Hypertext Preprocessor (hypertext preprocessor), the PHP Dynamic Web development technology is similar to ASP, is also a kind of embedded HTML document server-side scripting language. Most of its syntax is similar to the languages of C, Java, and Perl, and forms its own unique style, using the language web programmer to quickly develop dynamic Web pages. PHP can be run on most Unix platforms, Gun/linux, and Microsoft Windows platforms. The advantages of PHP are: Easy to install, learning process simple, convenient database connection, strong compatibility, scalability, and can be object-oriented programming. But PHP also has some weaknesses, mainly PHP is an interpreted language, does not support multithreaded structure, support platform and connection of the database are limited, especially in the support of the standard is congenitally deficient, for some e-commerce applications, PHP is not suitable.
There are also technologies, such as the Java Servlets technology, that make it easy to write interactive server-side code in the Java language. A Java servlets is a Java-technology-based program that runs on the server side (unlike applets, which run on the browser side). Developers write such Java Servlets to receive HTTP requests from Web browsers, dynamically generate responses (which may require querying the database to complete such requests), and then send a response to the browser that contains HTML or XML documents. This technique is difficult for ordinary page designers to master easily. With this approach, the entire Web page must be made in the Java Servlets. If a developer or Web administrator wants to adjust the page display, they will have to edit and recompile the Java Servlets.
Solar Microsystems Inc. (Sun Microsystems Inc.) With broad support and collaboration among Web servers, application servers, trading systems, and development tool vendors, consolidation balances existing technologies and tools that support Java programming environments such as Java Servlets and JavaBeans, creating a new Develop a web-based application approach--javaserver pages Technology (JSP). This dynamic Web development technology mainly has the following characteristics:
Be able to run on any web or application server;
Separation of the Application logic and page display;
Capable of rapid development and testing;
Simplifies the process of developing web-based interactive applications.
The technical method of JSP
In order to quickly and easily carry out the development of Dynamic Web site, JSP in the following areas have made improvements to make it a fast platform to establish a dynamic Web site of choice.
1. Separation of content generation and display
With JSP technology, Web page developers can use HTML or XML tags to design and format final pages, and use JSP logos or little feet to generate dynamic content on a page (content varies according to request, such as requesting account information or the price of a particular bottle of wine). The logic of the generated content is encapsulated in the identity and JavaBeans components, and bundled in the script, all scripts run on the server side. Because core logic is encapsulated in logos and JavaBeans, web managers and page designers can edit and use JSP pages without affecting the generation of content.
On the server side, the JSP engine interprets the JSP IDs and scripts, generates the requested content (for example, by accessing the JavaBeans component, accesses the database with JDBC technology, or includes files), and sends the results back to the browser as an HTML (or XML) page. This helps authors protect their own code and ensure the full availability of any html-based Web browser.
2. Reusable components
Most JSP pages rely on reusable, cross-platform components (JavaBeans or Enterprise JavaBeans components) to perform the complex processing required by the application. Developers can share and Exchange components that perform common operations or make these components available to more users and customer groups. The component-based approach accelerates the overall development process and enables organizations to balance their existing skills and the development efforts of optimized results.
3. Using logo
Web page developers are not all programmers who are familiar with scripting languages. JSP technology encapsulates a number of features that are required for dynamic content generation in Easy-to-use, JSP-related XML identities. The standard JSP identity is able to access and instantiate JavaBeans components, set or retrieve component properties, download applets, and perform features that are more difficult to encode and time consuming in other ways.
4. Adaptation platform
Almost all platforms support Java,jsp+javabeans with virtually all of the platform's unimpeded reach. Porting from one platform to another, JSP and JavaBeans don't even have to recompile because Java bytecode is standard and platform-independent.
5. Database connection
The technology of connecting the database in Java is that the Jdbc,java program connects with the database through the JDBC driver, executes the query, extracts the data and so on. Sun also developed JDBC-ODBC Bridge, which uses Java programs to access databases with ODBC drivers, and most database systems now have ODBC drivers, so Java programs can access Oracle, Sybase, MS SQL Databases such as server and MS Access.
In addition, through the development of identity libraries, JSP technology can be further expanded. Third-party developers and other people can create their own identity libraries for common functions. This enables Web page developers to work with familiar tools and artifacts that perform specific functions like identities.
JSP technology is easily integrated into a variety of application architectures to leverage existing tools and techniques and can be extended to support enterprise-class distributed applications. As part of the Java technology family and as part of the Java 2 (Enterprise Architecture), JSP technology can support highly complex web-based applications.
Because the built-in scripting language for JSP pages is java-based, and all JSP pages are compiled into Java servlets, JSP pages have all the benefits of Java technology, including robust storage management and security. As part of the Java platform, JSP has the Java programming language "once written, run everywhere" features.
Application Model of JSP
Using JSP technology, dynamic information is represented by JSP pages, and JSP pages are executed by a JSP engine installed on a Web server or using a JSP application server. The JSP engine accepts client requests for JSP pages and generates JSP pages as a response to the client.
JSP pages are usually compiled into Java servlets, which is a standard Java extension. Page developers have access to all of the Java application environments to take advantage of the extensibility and portability of Java technology. When the JSP page is invoked for the first time, if it does not exist, it is compiled into a Java servlets class and stored in the server's memory. This allows the server to respond very quickly in subsequent calls to the page (this avoids the problem of Cgi-bin generating a new process for each HTTP request).
JSP pages can be included in a number of different application architectures or models and can be used in a consortium of different protocols, components, and formats. The dynamic information publishing technology based on JSP is an open and extensible standard to establish dynamic Web pages. No matter what creation tool is used, developers can use JSP pages to create portable Web applications that run on different Web application servers.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.