JSP Overview of Beginners Beginner's introductory tutorial

Source: Internet
Author: User
Tags define
The js| tutorial JSP (IAVA SERVER pages) is a dynamic Web page production technology developed by Sun in the Java language that allows you to separate dynamic parts of a Web page from static HTML. You can use tools that are usually handy and write HTML statements in the usual way. The dynamic parts are then embedded with special tags, which often start with "<%" and End With "%>". For example, here is a JSP page:
  
  
  
<body>
  
<I> <%out.println ("Hello World");%> </I>
  
</body>   
It will output "Hello World".
  
Typically, you want to extend the file to ". JSP" and place it under any path that you can place on a normal web page. Although the JSP file looks more like an HTML file than a servlet file, it is actually converted to a servlet file, where static HTML is used only to output information returned by the Servlet service method. If the JSP pages have been converted to a servlet and the servlet is compiled and then loaded (when asked for the first time), when you request this JSP page again, you will not notice a delay. Also note this phenomenon, some Web servers allow you to define aliases for it, as if a URL is pointing to an HTML, but in fact it points to a servlet or JSP pages.
  
Constructs a JSP page, in addition to the embedded rules of HTML, there are three main types of JSP elements: Scripting elements,directives, and Actions. Using scripting Elements you can define the part that is eventually converted to a servlet, directives allows you to control the overall structure of the servlet, and the actions allow you to specify reusable components that can be reused, as well as control the running of the JSP engine. To simplify scripting elements, you can use some predefined variables, such as request, on a section.
  
This tutorial is explained in the JSP1.1 version. Its syntax is summarized in the following table, and its detailed use is explained in detail in subsequent courses.
  

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.