In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to understand Java Web technology". In daily operation, I believe many people have doubts about how to understand Java Web technology. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to understand Java Web technology". Next, please follow the editor to study!
1. Web container
All programs need to have a necessary environment to run. This environment can be software, hardware, or a combination of software and hardware. For example, the Windows operating system needs to run on hardware; Office software needs to run on the operating system. And there will be a certain data exchange between the program and the running environment, for example, the operating system will transfer the running instructions to the hardware, and the hardware will also pass the results of the instructions to the operating system. Java Web programs also need a running environment to execute. The environment in which Java Web programs are run is called Web containers, and there is data interaction between Java Web programs and Web containers. At present, there are mainly two types of Java Web containers: one is an independent Java Web container, in which only Web programs can be run, which is also called a Web server, such as Tomcat, etc.; the other is a Web container mixed with other Java EE containers, in which Web containers are responsible for running Web programs, and other containers are responsible for running EJB and other programs, such as WebLogic.
When the user sends a request to the server through the browser and other Web client software, the first person to receive the request is the Web container. The Web container will encapsulate the request information into a HttpServletRequest type Java object and pass the object to the Java Web program. For each request, the Web container also creates an HttpServletResponse type object that is used to hold content that needs to be returned to a client, such as a browser. The Java Web program can extract the request information sent by the user from HttpServletRequest, after proper processing, place the processing result into HttpServletResponse, or the Web container parses the content of the HttpServletResponse object, and returns the parsing result to the browser and other clients in HTML and other formats that the browser can recognize. In this process, HttpServletRequest and HttpServletResponse are like two ferries, responsible for passing information between the Web container and the Java Web program. It is important to note that these two objects exist only in Web containers and Java Web programs and have nothing to do with browsers.
2. Web application
The Web application can be thought of as another name for the Web program. The missing definition is a fully functional application that runs in a Web container. Java Web application consists of a series of compiled Java classes, static pictures, static HTML files, configuration files and so on. Through the Java Web application, we can receive the user's input and request, process the request information, access the database, and respond to the user's request. The development of Java Web application processing needs to comply with some special specification requirements of Web application, which is not essentially different from other types of application development. At present, there are two main types of Web applications: one is display-oriented Web applications, which request the returned content with marked text such as HTML or media formats recognized by browsers. Users can operate such applications through clients such as browsers. The other is service-oriented Web applications, which do not provide a graphical operation interface, but only provide method invocation structures, such as Web services, which can only be called and accessed by other applications.
3. Web element
Web components are the basic units that make up Web applications and can respond to requests from clients such as browsers. In Java Web applications, the Web components provided are Servlet, JavaServer Pages (JSP), JavaServer Faces (JSF) and so on. You can also use other types of content that Web applications also use, such as HTML files, still images, and so on. In fact, Java Web only provides one kind of Web component, that is, Servlet,JSP, JSF and so on are all derivative technologies based on Servlet. Servlet is essentially a Java class with special inheritance requirements. Understanding Servlet is basically a complete understanding of Java Web technology.
At this point, the study on "how to understand Java Web technology" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.