This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13590|Reply: 0

[JavaEE] Why is JSP more efficient than ASP PHP?

[Copy link]
Posted on 4/8/2015 2:35:23 PM | | |

When a JSP page on the server is executed for the first time, the JSP engine on the server first translates the JSP page file into a java (java servlet) file, compiles the java file to generate a bytecode file, and then responds to the customer's request by executing the bytecode file. The task of this bytecode file is:
1. Give the ordinary HTML markup symbols in the JSP page to the customer's browser for display.
2. JSP tags, data and method declarations, and Java programs are executed by the server and sent to the customer's browser to display the results.
3. The Java expression is calculated by the server, converts the result into a string, and then hands it over to the customer's browser for display.
So, in fact, all the execution that requires logical judgment has been completed on the server side, and all that is passed to the browser is a series of printed statements. The browser is only responsible for collecting and displaying data. If the user visits again, the JSP engine will directly find the compiled servlet file to run, which is why the JSP page will run faster than the page written in other languages (such as asp). Of course, we must realize that the first execution of JSP will be very slow, so the first run is usually handed over to the system administrator.




Previous:asp.net study the shopping cart item instructions you need to make
Next:SQL Server 2008 key, SQL Server 2008 R2 serial number key
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com