Web Application Development

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Web Application Development

Java Web Application Development


• Java is one of the most used programming languages for
developing dynamic web applications.
• Java provides some technologies like Servlet and Java Server
Pages (JSP) that allow us to develop and deploy a web
application on a server easily.

A Java web application generates interactive web pages containing


various types of markup language (HTML, XML, and so on) and
dynamic content. It is typically comprised of web components such
as JavaServer Pages (JSP), servlets and JavaBeans to modify and
temporarily store data, interact with databases and web services,
and render content in response to client requests. Because many of
the tasks involved in web application development can be repetitive
or require a surplus of boilerplate code, web frameworks can be
applied to alleviate the overhead associated with common activities.

• Java also provides some frameworks such as Spring, Spring


Boot that simplify the work and provide an efficient way to
develop a web application. They reduce the effort of the
developer.
• We can create a website using static HTML pages and style
them using CSS, but we need server-side technology when we
want to create a dynamic website.
Servlet
• A small Java program that runs within the Web Server
• Receives and responds to requests from Web clients, usually
across HTTP (HyperText Transfer Protocol)
• Servlets are used to collect data from the users, for example,
forms, and also to create web pages dynamically and present
the results.

Servlets are the core classes in any web application, the only classes
are either perform the work of responding to requests or delegate
that work to some other part of the . Unless some filter pre-maturely
terminates a request, every request to your application goes through
some servlet. The web container in which you run your application
will have 1 or more built-in servlets. These servlets handle serving
JSPs.

Difference between FRAMEWORK and PLATFORM?


- Platform – provides everything you need to run the web app
(programming language, code, management) without it the
program will have no sense. No means for you to create the
program.
- Framework -

Servlet Example

We should use Servlet as server side controller and to communicate


with model classes
Java Server Pages

• A Java standard server side technology used to create dynamic


web applications just like Servlet technology.
• is built on top of the Java Servlet specification
• consists of HTML code and provide option to include java code
for dynamic content.

JSPs should be used for presentation layer.


The two technologies typically work together, especially in older Java
web applications. From a coding perspective, the most obvious
difference between them is that with servlets you write Java code
and then embed client-side markup (like HTML) into that code,
whereas with JSP you start with the client-side script or markup, then
embed JSP tags to connect your page to the Java backend.

You might also like