Dynamic Web page Technology--cgi:asp:jsp:php (3)

Source: Internet
Author: User
Tags odbc linux
3. JSP Technology
Let's look at a small program hellojsp.jsp:
<title>jsp Small Program </title>
<body>
<%
String Str = "jsp applet";
Out.print ("Hello jsp!");
%>
</body>
Is it like an ASP program? However, it is another technology that has become popular---JSP. The above procedure is the most basic, the simplest example. JSP (Java Server Pages) is a new technology launched by Sun Microsystem Corporation in 1999/6 and is a Web development technology based on the Java servlet and the entire Java system. This technology can be used to build advanced, secure and Cross-platform Dynamic Web sites.
Overall, Java Sever pages (JSP) and Microsoft's Active Sever pages (ASP) have many similarities in technology. Both are technical environment support for dynamic Interactive Web page making based on Web application. To the same extent, both can provide program developers with the technology of implementing application programming and designing Web pages with self-contained components. And both can replace CGI to make Web site construction and development of more simple and fast. However, the two are derived from different technical specifications of the Organization, the basis for implementation: the Web server platform requirements are not the same. ASP is typically applied only to Windows nt/2000 platforms, while JSPs can be run on more than 85% Web servers, including NT systems, with "Write Once,run Anywhere" ("Write, multi-platform") Java standards to achieve platform and server independence, and JSP based applications are easier to maintain and manage than ASP based applications.
JSP technology has the following advantages:
(1). Separating the generation and display of content
Using JSP technology, Web page developers can use HTML or XML identities to design and format final pages. Use a JSP logo or a little script to generate dynamic content on the page (content varies according to request, such as requesting account information or the price of a particular bottle of wine). The logic for generating content is encapsulated in identity and JavaBeans components, and bundled in small scripts, all scripts run on the server side. If the core logic is encapsulated in logos and beans, then others, such as 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 JSP IDs and small scripts to generate the requested content (for example, by accessing the JavaBeans component, accessing the database using JDBCTM technology, or including files), and sending the results back to the browser as an HTML (or XML) page. This helps authors protect their own code while ensuring the full availability of any html-based Web browser.
(2) Emphasis on reusable components
Most JSP pages rely on reusable, cross-platform components (JavaBeans or Enterprise Javabeanstm) components to perform the more complex processing required by the application. Developers can share and Exchange components that perform common operations or make these components available to more users or 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 to simplify page development
Web page developers are not all programmers who are familiar with scripting languages. The JavaServer page technology encapsulates a number of features that are needed to make dynamic content generation in an easy-to-use, JSP-related XML identity. 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) JSP adaptation platform is more extensive
This is a JSP than the ASP's superior place. Almost all platforms support Java,jsp+javabean can be unimpeded across all platforms. NT under IIS can support JSP through a plug-in such as JRun (http://www3.allaire.com/products/jrun/) or Servletexec (http://www.newatlanta.com/). The famous Web server Apache has been able to support JSP. Because Apache is widely used on NT, UNIX, and Linux, JSP has a wider operating platform. Although the NT operating system now occupies a large market share, but the advantages of UNIX in the server is still very large, and the new rise of Linux is not small. Porting from one platform to another, JSP and JavaBean don't even have to recompile because Java bytecode is standard and platform-independent.
The technology for connecting to a database in Java is JDBC (Java Database connectivity). Many database systems have JDBC drivers, and Java programs connect to the database through the JDBC driver, executing queries, fetching 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.


Related Article

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.