top of page

JAVA SERVLET ARCHITECTURE

The architecture, here, discusses the communication interface, protocol used, requirements of client and server, the programming with the languages and software involved.


java servlet architecture
java servlet architecture


Ø In the communication through the Web, the client and the server use the Web (Internet) as an interface (medium) of communication. That is, both the client and the server must connect to the Web (in spite of an Internet service provider) to communicate, that is, they cannot communicate. When connected, the simple client system can be called "Web client" and the server can be called "Web server". Another way of saying simply, any client and server connected to the Web are known as "Web Client" and "Web Server".


Ø The standard protocol used in the Web, nowadays, is the HTTP protocol (HyperText Transfer Protocol). For this reason, the container and the server can also be called "HTTP client" and "HTTP server".


Ø When connected, the client sends a request and answers from the server. In the Web terminology, use only the request and response words (do not use as client and server responses). It is known as a request / response paradigm (style).


Ø To send a request, the software to be loaded in the Web cleint is "Browser"

(the same browser that is used to connect to the Internet). In the same way, the necessary software in the Web server is "Web server software". To obtain the Web server software (or servlet container), the most commonly used server is Tomcat (from Apache), Weblogic (from BEA, now acquired by Oracle) and WebSphere (from IBM), etc.


Ø Responsibilities of the Web Client


• Must be able to receive requests from the client showing some GUI environment (such as username and password as in the login screen).

• Extract the data entered by the user and send them to the Web server as an application.

• Must be able to receive what the server responds to and show the user.


Ø Now, choose a software of this type in the client that can meet the above requirements. Obviously, it is the browser. The browser represents the client's system. When I say the client, that means that I am talking about the browser in the client. The client sends a request medium, the browser in the client sends. Write a program that can meet the above requirements in a language so you understand the browser. The easiet language programmer prefers HTML. For GUI, HTML comes with the <FORM> tag. Then, the client program is written in HTML (alternatively, you can use a Java Applet as well).


Ø Web server responsibilities


• You must receive the request sent by the Web client.

• According to the order, load an appropriate servlet, execute it and send the output of the execution in response to the client.

• When the answer is delivered, close the connection.


On the web server side, I prefer to use the popular Tomcat. Tomcat understands Servlets and JSPaparten other structures such as Struts. Servlets are written in Java according to the specifications of the Servlet API (rules) stipulated by Sun Microsystems. Now, with that knowledge, we are going to write a small program of Login validations in which the client sends (as request) the username and password, the server validates and the valid or invalid answers.



 
 
 

Recent Posts

See All
From Java 8 to Java 11

Switching from Java 8 to Java 11 is more complicated than most updates. Here are some of my notes on the process. Modules Java 9...

 
 
 

Comments


SUBSCRIBE
  • Facebook Social Icon
  • Google+ Social Icon
  • Twitter Social Icon
  • LinkedIn Social Icon
LOCATION

Besant Technologies - Velachery Branch
Plot No. 119, No.8, 11th Main road, Vijaya nagar,
Velachery, Chennai - 600 042
Tamil Nadu, India
Landmark - Reliance Digital Opposite Street

+91-996 252 8293 / 996 252 8294

OPENING HOURS

© 2023 by Prickles & Co. Proudly created with Wix.com

bottom of page