From the point of view of operation and maintenance JAVA technology

1. JAVA technology

1.1. Composition JAVA technology

JavaIs an object-oriented programming language developed by sunthe research and development company, is one of the world's most widely used programming language

Java Technical composition:

  • JVM: JavaVirtual machine, providing Javathe runtime environment
  • JAVA 编程语言: Available to the programmer to write code
  • JAVA Class: Java class file format, decided to Javacompile a bytecode should follow the specifications for compatibility of differentJVM
  • JAVA API: Provides Javathe APIinterface to shorten the development cycle of the application

1.2. JVM

JVMIs Javathe core and the foundation, is Javainterpreter and OSvirtual processors (intermediate layer) between the platform, which is based on computer operating systems and hardware platforms using software methods abstracted
introduced into Javathe virtual machine, such Javalanguages on different platforms do not need to re-compiled runtime; so that Javaprogrammers in the development of Javathe program only to face JVMwriting code, do not care about the underlying operating system and hardware platform
Javalanguage Javavirtual machine shield the information related to a specific platform, so that the Javalanguage compiler only must generate the Javatarget byte code running on the virtual machine can run without modification on multiple platforms

1.3. JDK

JDKIt is the Javalanguage of the software development kit, the whole Javacore, which contains the Javaoperating environment and Javatools
it simply JDK = JAVA 编程语言 + JAVA API + 编译器 + JVM
classify the JDK

  • Java SE: Standard Edition, a version we usually use
  • Java EE: Enterprise Edition, using this JDKto develop J2EEapplications
  • Java ME: mainly used on mobile devices, embedded devices Javaapplications

2. JAVA WEB program realization

2.1. Applet class

appletIt is the use of Javaprogramming language, after compiled appletprogram can be embedded to HTMLgo, and then appletsend the program to the client, the client's browser as long as the installed JDKplug-ins will be able to perform this appletprocedure, and the results displayed on the client browser this client is a dynamic site

A client's site Disadvantages:

  1. Client need to install JDKplug-ins
  2. If appleta virus program if the client is running on the client host may have caused great harm

Because of these drawbacks it later emerged that the concept of server-side dynamic

2.2. Servlet class

ServletIs Javaa server-side programming, and its main function is to interactively view and modify data, generate dynamic WEB resources
Servletcan make Javathe language according to CGIthe dynamic server-side technology developed to run WEBthe program, but in heavy traffic server Java Servletadvantage lies in their faster execution in CGIthe program
Servleteach user request is activated into a single-threaded program, without having to create a separate process, which means that overhead server processes the request will be significantly reduced

Servlet Processing the request:

  1. Client sends a request to the server
  2. Request information to the server Servlet
  3. Servlet Generating a response to the content server and pass it
  4. The server will respond back to the client

2.3. JSP

JSPIs Javathe server page, it is Servleta special class, is fundamentally a simplified Servletdesign
JSPin the traditional HTMLinsert the file in Javathe block, thus forming a JSPdocument
developed JSPa well-known framework program it is to SSH(Structs, Spring, Hebernate)
JSPachieve a HTMLsyntax Javaextension, through on the server side Javacode is then embedded in the results HTMLreturned to the client
Servletis mainly achieved using Javalanguage developed to run at serverthe end of WEBthe dynamic resources
which are based on Javalanguage development of WEBmost of the resources are dynamic .jspresources

2.4. servlet container 和 web container

Servlet ContainerContained JDKand JDKdo not have a feature that allows a Servletrun up, there is a corresponding Servletprocess
Servletprocess is responsible for receiving front-end CGIrequest is passed over, and the local JVMprocessing on
Servletis also responsible for monitoring the local .javaprogram modification is occurring, modify the event of the let the compiler to re- .classfile

Web ContainerIs a containing Jasperand Servletrelated technical framework, which Jasperis responsible for monitoring the local .jspprogram is modified occurred upon modification according to the needs to replace .javathe source code, and .javait is to Servletbe processed

Web ContainerCommercial implementations: websphere, weblogic
Web Containerthe open source implementation: tomcat,jetty

Guess you like

Origin blog.51cto.com/hongchen99/2435821