Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

L.U.

1: PREPARE PROGRAMMING
ENVIRONMENT
• Introduction
• What is a Java Web Application?
✓ A web-based application developed using Java technologies.
✓ Runs on a server and is accessed via a web browser.
Web Clients and Web Servers
✓ Web clients and web servers are fundamental components of web architecture.
✓ They work together to deliver web content and services to users.
✓ A web client is a device and software (usually a web browser) that accesses and
interacts with web servers.
▪ Examples: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari
✓ Sends HTTP requests to web servers.
✓ Displays content received from web servers.
✓ Allows user interaction with web applications.
What is a Web Server?
✓ A web server is a computer system that hosts websites and web applications,
handling requests from web clients.
▪ Examples: Apache, Nginx, Microsoft IIS.
✓ Receives HTTP requests from web clients.
✓ Processes requests using server-side logic.
✓ Sends back HTTP responses containing web content.
Key Components
▪ Technologies Used
✓ Java Servlet
✓ JSP (JavaServer Pages)
✓ JDBC (Java Database Connectivity)
✓ Spring Framework (optional)
✓ HTML, CSS, JavaScript for front-end
Key Components
• Java Servlets: Java classes that handle HTTP requests and responses.
• JSP (JavaServer Pages): Allows embedding of Java code in HTML pages.
• JDBC (Java Database Connectivity): Interface for connecting and
executing queries on a database.
• Frameworks: Spring, Hibernate for simplifying development.
Development Environment
• Tools Required
✓ JDK (Java Development Kit)
✓ IDE (Integrated Development Environment) like IntelliJ IDEA or Eclipse
✓ Apache Tomcat (or another servlet container)
✓ Database (MySQL, PostgreSQL, etc.)
✓ Maven or Gradle for build automation
HTTP Protocol Basics
✓ HTTP (Hypertext Transfer Protocol): The foundation of data
communication on the World Wide Web.
✓ Used for transmitting hypertext requests and information between web
clients (browsers) and servers.
✓ A protocol used for transmitting hypertext over the internet.
✓ Each request from a client to server is independent; the server does not
retain session information between requests.
Basic Structure of HTTP
• Request-Response Model:
✓ Client: Sends an HTTP request.
✓ Server: Receives the request and sends an HTTP response.
• HTTP Methods: Define actions to be performed on the resource.
HTTP Methods
• GET: Retrieve data from the server.
• POST: Submit data to the server
• .PUT: Update existing data on the server.
• DELETE: Remove data from the server.
• HEAD: Retrieve headers only (without the body).
• OPTIONS: Describe communication options for the target resource.
• PATCH: Apply partial modifications to a resource.
What is a Web Container?
✓ A web container (or servlet container) is part of a web server or application
server that provides the runtime environment for Java servlets, JSPs
(JavaServer Pages), and other web components.
✓ Manages the execution of servlets, handles requests, responses, and
facilitates communication between web clients and server-side components.

You might also like