Tomcat Tutorial Home
- Introduction to Servers
- Releases and Download Instruction
- Installation Steps
- Folder Structure of Tomcat
- Deploying War Files
- Creating and Executing Servlet
- Creating and Executing JSP
- Understanding Server xml
- Changing Default Settings
- Defining DataSource
- Using Datasource In Application
- Introduction To Web Security
- Tomcat Security
- Using Container Security in Application
- Configuring Log4j in Tomcat
- Configuring SSL in Tomcat
- Enabling CGI in Tomcat
- Members (19563)
- Member Articles ( 11 )
- Discussion (77)
- Q & A ( 97 )
- - Ask Question
- - Questions
- - Unanswered Questions
- Source Code (172)
- Articles (34)
- Blogs (338)
- Jobs (40)
- Components (10)
- Books (10)
- Websites (13)
- News (12)
Introduction to Servers
A web server is a computer program that is responsible for accepting HTTP requests from clients, which are known as web browsers, and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images, etc.). Although web server programs differ in detail, they all share some basic common features:
- Dynamic Content: :-Once upon a time, the World Wide Web was a relatively static place. The Web server's sole function was to simply deliver a requested Web page, written in HTML, to a client browser. Over time, developers started looking for ways to interact with users by providing dynamic content -- that is, content that displayed a form or executed a script based on user input. Thus Server Side Includes (SSI) and the Common Gateway Interface (CGI) were born. Webservers provide environment for users to interact with applications and view dynamic content over network.
- Security: Web servers provide multiple mechanisms to prevent unauthorized access to the applications deployed in its container. The basic security mechanism is Authentication & optional authorization request (request of user name and password) before allowing access to some or all kind of resources. Another mechanism is SSL – The Secure Sockets Layer (SSL) is a commonly-used protocol for managing the security of a message transmission on the Internet. SSL has recently been succeeded by Transport Layer Security (TLS), which is based on SSL. SSL uses a program layer located between the Internet's Hypertext Transfer Protocol (HTTP) and Transport Control Protocol (TCP) layers.
- Logging: Usually web servers have also the capability of logging some detailed information, about client requests and server responses, to log files; this allows the administrator to collect statistics by running log analyzers on log files.
- Fault tolerance & scalability features.
- Virtual hosting to serve many web sites using one IP address.
- Bandwidth throttling to limit the speed of responses in order to not saturate the network and to be able to serve more clients.
Difference Between Web server and Application Server:
The Web server
A Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call. A little more precisely, you can say that:
A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols.
Understand that a Web server's delegation model is fairly simple. When a request comes into the Web server, the Web server simply passes the request to the program best able to handle it. The Web server doesn't provide any functionality beyond simply providing an environment in which the server-side program can execute and pass back the generated responses. The server-side program usually provides for itself such functions as transaction processing, database connectivity, and messaging.
While a Web server may not itself support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering—features oftentimes erroneously assigned as features reserved only for application servers.
The Application server
As for the application server, according to our definition, an application server exposes business logic to client applications through various protocols, possibly including HTTP. While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on an object (or a function in the procedural world).
Such application server clients can include GUIs (graphical user interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information is program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic however it wants.
In most cases, the server exposes this business logic through a component API, such as the EJB (Enterprise JavaBean) component model found on J2EE (Java 2 Platform, Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, resource pooling, and messaging. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques.
- - Two forms in one JSP
- - PASS VARIABLES BETWEEN 2
- - Table data
- - Unable to laod the image
- - The Ultimate Web UI Frame