Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (10.2k points)

I read many articles to understand java servlet but I did not succeed.

Can you please give brief introduction of java servlets (in easy language). Like what is servlet? What are the advantges? And all that.

I can't understand the difference between server-side programming languages (PHP, ASP) and servlets.

1 Answer

0 votes
by (46k points)

A servlet is solely a class which response to a distinct type of network request - most generally an HTTP request. Servlets are usually used to perform web applications - but various frameworks serve on top of servlets (e.g. Struts) to give a higher-level concept than the "here's an HTTP request, write to this HTTP reply" level which servlets provide.

Servlets run in a servlet container that controls the networking side (e.g. parsing an HTTP request, connection handling, etc). One of the best-known open-source servlet packages is Tomcat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Nov 20, 2020 in Java by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...