The difference between java, javascript, js, jsp

Original http://blog.csdn.net/wenruo95/article/details/46805751


javascript==js

js is a scripting language. In html, css manages the position, html is in charge of content, and js is in charge of actions to reduce background operations, which can easily verify the input data. For example, when registering, use ajax in js to the background to verify in real time whether the user name has been registered, whether the verification code is correct or used to achieve asynchronous update, to bring users a better experience. Use jquery to verify the legality of the password, enter the password and confirm the password is the same, so as to feed back to the html page, you can confirm whether the input content is wrong by manipulating the content of the css or html page. But ajax and jquery are both a library of js.

js!=jsp

js (javascript) jsp (java server pages) 
I saw a pretty classic answer in Zhihu before. The relationship between js and jsp is the relationship between Lei Feng and Lei Feng Tower. From this sentence, it can be seen that the two of them have no connection, but in fact it is the same. JSP can actually be seen as a scripting language, which needs to be compiled with servlets. However, as a scripting language, it is quite powerful, in which java code can be embedded, and almost all java classes can be used in jsp. In fact, it is possible to display jsp as html as a web page, and it can also be nested in java language or other languages. Of course, the preamble is compiled with servlet. JSP can be run directly after being executed as a bytecode file. It does not have to be compiled every time, and it is fast. I may still have a problem, but most of jsp and js are used in the preparation of web pages. Jsp can be seen as a combination of html and java. Of course, js can implement some actions, special effects, verification functions on jsp The effect achieved in html is the same. Because jsp is interpreted and executed on the server side, and the server executes the converted .class program, the client receives only the html code sent by the server, and the jsp code cannot be seen. The js can be displayed on the client by viewing the source code.

java、jsp

java is a programming language, jsp is just equivalent to the servlet part in java

Afterword

I remember when I started to develop a website, one of my seniors asked me to watch jsp, and then I spent a week watching js. I thought js was jsp, and then jj, and javascript and jsp were not much different So I did a lot of useless work and took more detours, but then both things were used, and they were very useful. The important thing is said three times, js! = jsp, js! = jsp, js! = jsp. 
js == javascript 
jsp == java server pages

Published 33 original articles · praised 37 · 110,000 views

Guess you like

Origin blog.csdn.net/hagle_wang/article/details/78823613