JSP (2)--the first JSP

Source: Internet
Author: User
Tags html page
Js

First JSP

In fact, the JSP simply puts Java in the HTML page. You can change the existing HTML page extension from ". html" to ". JSP", which is the best way to create the first JSP.

We can change its extension from ". html" to ". JSP" by the file in the previous exercise. The new file is then loaded in the browser, which is the file with the extension ". jsp".

At this point, you can see the output, but it takes a longer time. This phenomenon only happens when you load it for the first time. If you reload it, the speed is normal.

What the hell happened? It turns out that your JSP was turned into a Java file and compiled and loaded. The compilation is only carried out once, so the time of the first load is a little longer, the original is spent on the compilation. And in the second load it no longer needs to compile, so the load speed of the device back to normal. The caveat here is that when you convert HTML-formatted files into JSP-formatted files, you need to recompile.

Of course, just writing HTML pages and turning them into. jsp extension files is useless, and in the later tutorials you will learn what you can do to make JSP useful.



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.