Runs application logic (Java EE, .NET apps), manages business logic
Database Server
Stores and manages databases (PostgreSQL, MySQL, Oracle)
File Server
Shares files over a network
Mail Server
Sends, receives, stores email
Proxy Server
Acts as a gateway between client and server
DNS Server
Resolves domain names to IP addresses
Game Server
Hosts multiplayer games, synchronizes player data
🧠 How a Web Server Works (HTTP-based)
Client (Browser) sends an HTTP request to the server.
Server processes the request.
Returns an HTTP response (HTML, JSON, etc.) to the client.
The browser renders the response.
🔧 Web Server vs Application Server
Feature
Web Server (e.g., Apache HTTPD, Nginx)
Application Server (e.g., Tomcat, WildFly)
Serves Static Content
✅ Yes
❌ No (usually not efficient for static)
Business Logic
❌ No
✅ Yes
Protocols
HTTP, HTTPS
HTTP, RMI, JMS, SOAP, etc.
Example Use Case
Hosting static websites
Running dynamic Java-based web apps
⚙️ Common Java-Based Servers
🔹 Apache Tomcat (Web + Servlet Container)
Lightweight
Supports Servlets, JSP
Default in Spring Boot
🔹 GlassFish / Payara (Full Java EE)
Supports EJB, JPA, JTA, JMS
Suitable for enterprise systems
🔹 WildFly (formerly JBoss)
Robust, full-featured Java EE app server
Modular and fast
🔹 Jetty
Lightweight, embeddable in applications
Used in Maven, Eclipse
🔹 WebLogic (Oracle) & WebSphere (IBM)
Full-featured, enterprise-grade
Expensive, used in big organizations
🔌 Embedded vs Standalone Servers
Type
Description
Standalone
Installed separately (Tomcat, WildFly). Deploy WAR files manually.
Embedded
Comes bundled with your app (like Spring Boot + embedded Tomcat). Run via main().
🌐 Server Deployment Models
1. On-Premise
You manage the hardware and install server software
Total control but high maintenance
2. Cloud Servers
Hosted on cloud platforms (AWS, Azure, GCP)
Scalable, flexible, pay-as-you-go
3. Containerized Servers
Run in Docker containers (e.g., docker run tomcat)
Easily portable and isolated
4. Serverless (for specific cases)
No need to manage infrastructure (e.g., AWS Lambda)
Not used for full Java EE applications
📂 Java Server Architecture (Typical Web App)
Client (Browser/Mobile)
↓
Web Server (e.g., Apache HTTPD or Nginx)
↓
Application Server (e.g., Tomcat or WildFly)
↓
Business Logic (Java EE / Spring)
↓
Database Server (e.g., PostgreSQL, MySQL)
🔐 Servers and Security
Use HTTPS instead of HTTP
Enable firewalls and reverse proxies
Secure APIs with OAuth/JWT
Keep servers updated with patches
📦 Summary Table
Server
Type
Java EE Support
Use Case
Tomcat
Servlet Container
❌ Limited
Spring Boot, simple Java web apps
Jetty
Servlet Container
❌ Limited
Lightweight, embeddable
GlassFish
App Server
✅ Full
Java EE apps, learning
WildFly
App Server
✅ Full
Enterprise Java apps
Payara
App Server
✅ Full
Stable fork of GlassFish
WebLogic
App Server
✅ Full
Banking, government, enterprise
Nginx/Apache
Web Server
❌ No
Front-end static content, load balancing
Would you like help with setting up a Java app on a specific server like Tomcat, or comparing Docker-based deployments?
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (0)