Professional Documents
Culture Documents
A client is whatever you’re using to interact with the internet. It’s the web browser you’re using to read
this page. The web browser on your computer is one client, the web browser on your phone is another
client. There are other types of clients (like the Netflix app on your phone, or the Spotify application on
your computer), but we’ll focus on web browsers for now.
Servlets are mainly used in Dynamic web applications which provide dynamic
responses to client requests. In most cases, Dynamic web applications access
a database to provide the client requested data. We can use Java standard
database connection – JDBC in Servlets to perform database operations.
JSP is also closely related to JSF (JavaServer Faces), a Java specification for building MVC
(model-view-controller) web applications. JSP is a relatively simpler and older technology
than JSF, which is the standard for Java web frameworks like Eclipse Mojarra, MyFaces, and
PrimeFaces. While it is not uncommon to see JSP used as the frontend for older JSF
applications, Facelets is the preferred view technology for modern JSF implementations.
JSP is a server side technology that does all the processing at server. It is used for
creating dynamic web applications, using java as programming language.
Basically, any html file can be converted to JSP file by just changing the file extension
from “.html” to “.jsp”, it would run just fine. What differentiates JSP from HTML is the
ability to use java code inside HTML. In JSP, you can embed Java code in HTML using
JSP tags. for e.g. run the code below, every time you run this, it would display the
current time. That is what makes this code dynamic.