Detailed explanation of JSP technology methods

Source: Internet
Author: User

Methods of JSP Technology

In order to quickly and conveniently develop dynamic websites, JSP has made improvements in the following aspects, making it the preferred solution to quickly establish a cross-platform dynamic website.

1. Separate content generation and display

With JSP technology, Web page developers can use HTML or XML tags to design and format the final page, the dynamic content on the page is generated by Using JSP identifiers or small scripts based on request changes, such as requesting account information or the price of a specific bottle of wine ). The logic of the generated content is encapsulated in the identifiers and JavaBeans components and bundled in the script. All the scripts run on the server. Because the core logic is encapsulated in the identifiers and JavaBeans, Web administrators and page designers can edit and use JSP pages without affecting content generation.

On the server side, the JSP Engine interprets JSP identifiers and scripts to generate the requested content, for example, accessing the JavaBeans component and accessing the database or containing files using JDBC technology ), and the results are sent back to the browser in the form of HTML or XML) pages. This not only helps the author to protect his own code, but also ensures the full availability of any HTML-based Web browser.

2. reusable components

Most JSP pages depend on reusable, cross-platform components, such as JavaBeans and Enterprise JavaBeans, to execute the complex processing required by applications. Developers can share and exchange components that perform common operations, or make these components used by more users and customer groups. The Component-Based Approach accelerates the overall development process and balances various organizations in their development efforts with their existing skills and optimization results.

3. Identify

Web page developers are not all programmers familiar with the scripting language. JSP technology encapsulates many functions, which are required for dynamic content generation in easy-to-use and JSP-related XML identifiers. The standard JSP mark can access and instantiate the JavaBeans component, set or retrieve component attributes, download the Applet, and execute functions that are more difficult to encode and consume in other ways.

4. Adaptive Platform

Almost all platforms support Java, and JSP + JavaBeans support almost all platforms. Porting from one platform to another, JSP and JavaBeans do not even need to be re-compiled, Because Java bytecode is standard and platform-independent.

5. Database Connection

JDBC is the technology used to connect to the database in Java. Java programs connect to the database through the JDBC driver and perform operations such as querying and extracting data. Sun also developed JDBC-ODBC bridge, using this technology Java program can access the database with ODBC driver, currently most database systems with ODBC driver, therefore, Java programs can Access databases such as Oracle, Sybase, ms SQL Server, and MS Access.

In addition, through the development of the identification library, JSP technology can be further extended. Third-party developers and others can create their own identification libraries for common functions. This allows Web page developers to work with familiar tools and components that execute specific functions like identifiers.

JSP technology can easily be integrated into a variety of application architectures to take advantage of existing tools and techniques, and can be extended to support enterprise-level distributed applications. As part of the Java technology family and the Java 2 Enterprise Edition architecture), JSP technology can support highly complex Web-based applications. The built-in scripting language of JSP pages is based on Java, and all JSP pages are compiled into Java Servlets. Therefore, JSP pages have all the advantages of Java technology, including robust storage management and security. As part of the Java platform, JSP features the Java programming language "one-time writing, running everywhere.

JSP Application Model

Using JSP technology, dynamic information is represented by JSP pages. JSP pages are executed by JSP engines installed on Web servers or JSP application servers. The JSP Engine accepts client requests for JSP pages and generates JSP pages as responses to the client.

JSP pages are usually compiled into Java Servlets, which is a standard Java extension. Page developers can access all Java application environments to utilize the scalability and portability of Java technology. When a JSP page is called for the first time, if it does not exist, it will be 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, which avoids the problem that the CGI-BIN generates a new process for each HTTP request ).

JSP pages can be contained in a variety of application architectures or models and can be used in a consortium composed of different protocols, components, and formats. JSP-based dynamic information publishing technology is an open and scalable standard for establishing dynamic web pages. No matter what creation tool is used, developers can use JSP pages to create portable Web applications and run them on different Web application servers.

  1. Introduction to JSP Technology
  2. Introduction to ASP and JSP pages
  3. Create a message board with JSP program
  4. How to become a good JSP programmer
  5. JSP tag library Introduction

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.