You are on page 1of 8

?

=HTML+JAVA
Dynamic
Static
Html + css = static language Html + javascript= dynamic
language
Static in general sense
Dynamic in general sense
Ex= capital of India i.e. Ex= chief minister of delhi i.e.
Delhi Mr Arvind Kejriwal

static= pre made webpage Dynamic = build on the


user request
SERVLETS AND WEB.XML

1. Client sends the reauest to the server and


server returns the web page or html page as a
Response to the client.
2. (

This is in the case when


client requests a static page
)
3 . Server returns the premade webpage.
WHEN THE CLIENT
REQUESTS THE DYNAMIC
PAGE….
2. When a client requests the a dynamic page for
example .i.e abc.html .
Then the server has to build that page since it
doesnot have it already.
For the help of server there comes a Helper
application i.e. Tomcat it is basically a web
container .
It has servlets in it and web.xml file.
SERVLETS=JAVA CODE IT’S
SIMPLE
Servlet is a java file which
can take the request
from the client on the
internet
and it can process the
request and provide u a
response in a html format.
WEB.XML ALIAS
DEPLOYMENT DESCRIPTOR
Web.xml=Mapping the servlets with the
client requests.
There are a lot of servlets in a web
container(tomcat) to uniquely identify them and
map them with user’s request is the main work of
web.xml file.

There is an alternate option for them i.e.


annotations.
PROJECT TO ADD TWO NUMBERS
HOW DOES THE MAPPING WORKS
Java servlet Web.xml file
Arranged Marriage (Dynamic)
What happens now is that chirag has given
ANALOGY her the request since it is a arrange
marriage she is not allowed to take her
decision in that case there will be a helper
application (Tomcat)i.e. her relatives . Then
there is her friend name riya(web.xml) that
Love marriage helps the mapping between two and
(Static ) finally a response is send.
Chirag sends a request to the sara and
she gives him her consent as a response.

Server(sara)
Client(chirag) Server(sara)

You might also like