Online Shopping
2.3 Web Browser A servlet accepts a request from a client via the webserver performs some task and returns as shown in the following figure: HTTP Request
Web Browser
Web server
Servlets
HTTP Response Fig: Communication between web browser and web server Steps illustrating the basic flow while using servlets: The client (web browser) makes a request via an HTTP. The Web server receives the request and sends it to the servlet. If the servlets has not yet been loaded, the web server will load into the Java Virtual machine and execute it. The servlet will return receive the HTTP request and perform tasks. The servlet will return a response to the web server. The web server will forward the response to the client. Since the servlet executes on the server, the security issues usually associated with applets do not apply. The web browser also does not communicate directly with a servlet, the servlet is loaded and executed by the web server. This implies that if the web server is secure, then the servlet is also secure.
28 Dept of CSE,Narayana Enguneering College,Nellore