Understanding of the differences between JavaScript, JSP, Java, and javaee
JavaScript and Java are very similar. I believe that many beginners or those preparing to learn this knowledge will be confused and confused about JavaScript, JSP, Java, and javaee. I used to confuse these concepts. Later, I checked a lot of information and learned JavaScript, JSP, and Java for a while. Let's talk about the differences between them.
JSP(Full name: Java Server Pages) is a kind of application that allows software developers to respond to client requests, proposed by Sun Microsystems and jointly created by many companies, the technical standards of web pages that dynamically generate HTML, XML, or other Format documents. JSP can be nested in HTML. In short, it is a Java Server Page that controls page jumps and data input and output.
JavaScript and Java
Javascript is the client scripting language. Java is equivalent to JSP's server-side scripting language. The difference between the server-side scripting language and the client-side scripting language is that they are executed at different times. Java code on the JSP page is first parsed into the corresponding servlet, then compiled and run, and executed on the server side. The client script language is like JavaScript, when JSP is compiled, like common HTML code, the printed information is stored in servlet. Only when HTML is transmitted to the client browser, in the browser.
Although the Javascript language name contains Java, there is no essential link with Java. The name was used to attract more attention. Javascript is a dynamic, weak type, prototype-based language with a loose structure. Java is an object-oriented programming language, you must perform the encoding, connection, and other operations before execution. The structure is more rigorous. In JavaScript, the definition of a variable is different from that in Java. in Java, you must specify the type of the variable in detail, for example, int A; int B = 10. JavaScript does not have such strict declarative requirements, relatively casual, such as var a; var B = 3; C = 8; and so on. A particularly common mistake for Java users is to write a For Loop in JavaScript and write it as: For (INT I = 0; I <10; I ++) {} cannot be executed. You need to remove the variable declaration int and change it to for (I = 0; I <10; I ++ ){}.
Summary:
Script Language |
Type |
Executed location |
Language Features |
Main Purpose |
Java |
Server scripting language |
Server |
Loose Structure |
Verify the form input format on the client |
Javascript |
Client scripting language |
Browser |
Rigorous Structure |
Verify and control business logic |
Java EE, Also known as J2 EE (Java 2 Platform Enterprise Edition JAVA Platform Enterprise Edition ). J2eej2ee is a platform composed of a series of technical standards. It not only refers to a standard platform, but also expresses a software architecture and design idea. It includes HTML, Java, JSP, JavaScript, and other Web development technologies.