Learn about JSP

Source: Internet
Author: User

In the spirit and everyone together to learn the heart of JSP, today talk about JSP.

First, JSP (full name JavaServer Pages) is a technical standard created by Sun Microsystems and many companies to create a Web page that enables software developers to respond to client requests and dynamically generate HTML, XML, or other format documents. JSP technology is in the Java language as a scripting language, JSP Web page for the entire server-side Java Library Unit provides an interface to serve the HTTP application. Web applications developed with JSP are cross-platform and can run on Linux and other operating systems.

1. A JSP page can be divided into the following sections:

(1) static data, such as HTML

(2) JSP directives, such as include directives

(3) JSP script elements and variables

(4) JSP action

(5) User-defined label

Optimization of 2.JSP:

(1). Separating the generation and display of content

(2). Reusable Components

(3). with Identity

(4). Adaptation Platform

(5). Database Connection

3.

Strong technology

(1) Once written, run everywhere. The code does not have to make any changes other than the system.

(2) Multi-platform support for the system. It can be developed in virtually any environment on all platforms, deployed in any environment, and expanded in any environment. The advantages of JSP compared to the limitations of ASP are obvious.

(3) Strong scalability. From only a small jar file can run servlet/jsp, to multiple servers for cluster and load balancing, to multiple application for transaction processing, message processing, a server to countless servers, Java shows a huge vitality.

(4) Diversified and powerful development tools support. This is like ASP, Java has a lot of very good development tools, and many can be free, and many of them have been able to run smoothly under a variety of platforms.

(5) Support server-side components. Web applications require powerful server-side components to support, and developers need to leverage other tools to design components that implement complex functionality for Web page calls to enhance system performance. JSP can use mature Java BEANS components to implement complex business functions.

Technical weaknesses

(1) As with ASP, some of Java's advantages are its deadly problem. It is due to the function of cross-platform, in order to extreme scalability, so greatly increased the complexity of the product.

(2) The speed of Java is done with the class resident memory, so it is in some cases used in memory than the number of users is indeed the "lowest performance price ratio".

Simple small example of 4.jsp:

<title>FirstPage</title>

<body>

<p> This is my first JSP page, please have a lot of care </p>

</H3>

</body>

Note: Place this file with all of your HTML and JSP pages in your JSWDK installation directory. You can download this page from http://localhost:8080/sample.jsp. When you first visit this page, the Web server translates the JSP into the Javaservlet program code, and you will see the date and time.

The moment you have an epiphany is just a growth. ---, Mr. Chic.

Learn about JSP

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.