Java EE

J2EE is a Java enterprise level development specification, is a group of technical specification guide, the specific implementation is decided by the software manufacturer, such as Tomcat, Jboss, Weblogic, Tomcat is J2EE JSP and Servlet two modules of the standard implementer. Note that Tomcat is not a complete J2EE implementation.

J2SE is the foundation of J2EE. Running Tomcat is inseparable from J2SE, also known as JRE,JDK, etc. Tomcat is essentially a server software, and running corresponding programs still needs the help of servlets. In other words, Tomcat provides the hardware foundation. Servlet provides the implementation of software. Tomcat is the container of servlets, and servlets run in the Tomcat container.Standard Java Web engineering architecture

Servlet program development

1, create a Servlet class, inheritance HttpServlet class 2, rewrite the service method, write the program code 3, configuration web. XML, binding url can refer to: www.cnblogs.com/alsf/p/9180…

JSP

JSP, whose full name is Java Server Pages, is fundamentally a simplified Servlet design. JSP technology is a bit similar to ASP technology, it is in the traditional HTML web page to insert Java program segments and JSP tags, thus forming JSP files, suffix named (*.jsp). Web applications developed with JSP are cross-platform and can run on Linux as well as other operating systems.

It implements Java extensions in Html syntax (in the form of <%, %>). JSPS, like servlets, are executed on the server side. It is usually returned to the client as plain HTML text, so the client can browse it as long as it has a browser.

JSP inserts JAVA code into HTML, and the JAVA code is inserted in the <% %> tag

Example: the index. The JSP

<html>
    <head>
           <title>The first JSP program</title>
    </head>
    <body><% out.println("Hello World!" ); % ></body>
</html>
Copy the code

JSP page execution process

<% %> all embedded code segments are processed by the server side. 3. <% %> Is JAVA code