Java Learning (3) JSP learning-java learning jsp
1. Understand JSP Technology
The full name of JSP is Java Server Pages, and the Chinese name is java Server Page. It is a simplified Servlet design, it is a dynamic web page technical standard that was developed by Sun Microsystems and participated by many companies. JSP technology is a bit similar to ASP technology, it is in the traditional web page HTML (a subset of standard General Markup Language) file (*. htm ,*. insert the Java program segment (Scriptlet) and JSP tag in html to form a JSP file. The suffix is (*. jsp ). Web applications developed using JSP are cross-platform. They can run both on Linux and other operating systems.
Ii. differentiate JSP and html Technologies
HTML pages are static pages, that is, they are written by the user on the server and sent to the client by the web server.
A JSP page is a dynamic page. a jsp Container executes the Java code section of the page and then generates the page in real time.
3. Create a New JSP file in the eclipse Web Project
Iv. Comparison with html statements
5. Export a Web Project
Note: When exporting Web files, you must first disconnect the service.
Export a war package
6. Deploy War to Tomcat Service
Deploy the packaged War file to the Tomcat Service
Run Tomcat and you will see that the War package has been decompressed into a folder.
Then you can run Tomcat to display the effect of JSP files in webapps on a local webpage.
VII. JSP printing the memory curve of ebbinos 1. Understanding the memory curve of ebbinos
In the course of the new day, I learned how to review the memory of the forgetting curve. Let's take a look at the memory curve of ebinhot.
German psychologist H. Ebbinghaus found that forgetting begins immediately after learning, and the process of forgetting is not even. The initial forgetting speed is very fast and will gradually slow down later. He believes that "persistence and forgetting are the functions of time", and draws a curve describing the forgetting process based on his experiment results, that is, the famous ebbinhot memory forgetting curve.
2. Create a JSP file based on yesterday's Web project
1 <% @ page language = "java" contentType = "text/html; charset = UTF-8" 2 pageEncoding = "UTF-8" %> 3 <% @ page import = "java. util. * "%> 4 <! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" http://www.w3.org/TR/html4/loose.dtd "> 5
I am not very satisfied with this code string. I don't feel smooth enough, but I don't know how to optimize it... hope you can give me some advice. Thank you!
3. Running result