Web Servers: Shashikant S Kulkarni
Web Servers: Shashikant S Kulkarni
Web Servers: Shashikant S Kulkarni
Web Servers
Shashikant S Kulkarni
Introduction
Web server
Web server and client communicate with platformindependent Hypertext Transfer Protocol (HTTP)
GET (default) and POST do basically the same thing: Send data from the client to the server. However, they have some differences: GET
Appends form data directly to the end of the URLvisible to users (not suitable for sending passwords) Limited to 2,048 characters for the entire URL Result page can be bookmarked and cached Sends form data in the HTTP requestinvisible to users Virtually no limit (but check your specific configuration) Results are not cacheable or bookmarkable
POST
System Architecture
Maintains data for the application Stores data in a relational database management system (RDBMS) Implements business logic and presentation logic Control interactions between application clients and application data Applications user interface Users interact directly with the application through the client tier
Middle tier
Client-side scripts
Reduce requests needed to be passed to server Access browser Enhance Web pages with DHTML, ActiveX controls, and applets
Server-side scripts
Executed on server Generate custom response for clients Wide range of programmatic capabilities Access to server-side software that extends server functionality
10
Using domain <localhost> or IP address 127.0.0.1 Necessary for server-side programming development
Register a human-readable domain name Obtain IP address
Global access
Static: Costs more Dynamic: Needs dynamic DNS system, e.g. http://www.dyndns.com/
11
Develop website locally Upload website via FTP for global access
E.g. Filezilla
12
Linux for operating system Apache for web server MySQL for database PHP for server-side scripting
Others:
WAMP: Uses Windows for operating system, with Apache, MySQL, and PHP WISA: Full Microsoft package
Windows Internet Information Server (IIS) SQL Server (enterprise) or Access (small-scale) ASP or ASP.NET
13
Currently the most popular Web server Stability Efficiency Portability Open-source
14
EasyPHP
15
IIS Technologies
Introduction
Designed to deliver high speed and secure information publishing Serves as a platform for developers to extend internet standard communication capabilities Runs as a Windows NT 4.0 (Option Pack) service
IIS Components
Transport Services Client applications Administrative Tools Database Connectivity Encrypted Communication
Purpose
Component
Hypertext Publishing File Transfer ODBC Gateway Encrypted Comm. Server Admn. Hypertext Clients
WWW Server FTP Server Internet D/Base Con. Secure Socket Layer Internet Service Mgr. Browsers
HTML Pages
HTML Code Client Side Scripts HTML Code Client & Server Side Scripts Components
IIS Application
An IIS (Internet Information Server) application is a Visual Basic application that lives on a Web server and responds to requests from the browser
An IIS application uses HTML to present its user interface and uses compiled Visual Basic code to process requests and respond to events in the browser
IIS Application
To the user, an IIS application appears to be made up of a series of HTML pages To the developer, an IIS application is made up of a special type of object called a webclass, that in turn contains a series of resources called webitems
Browser-IIS Interaction
Browser sends an HTTP request to the IIS for a page on the web server The web server gets the requested page and processes the server side scripts, (which are enclosed within delimiters <% and %>). The scripts can assign values to variables or request information from server (interaction with other tiers)
Browser-IIS Interaction
The processed page containing only HTML and client-side scripts, if any, is sent to the browser
WAMP
What is WAMP?
WAMP = Windows+Apache+MySql+PHP
WAMP Installation
After Installation
Application Service Apache wampapache PHP MySQL database wampmysql
WAMPs Menu
WAMPs Menu
WAMPs Menu
Overall
WAMP is easy to install and it is free to use. Migration from IIS/PHP/MsSQL to WAMP is practical. The cost of migration is mainly to review queries and change them based on the SQL extension of MySQL.
Apache Tomcat
35
The Apache Jakarta Project creates and maintains open source solutions on the Java platform for distribution to the public at no charge Apache Jakarta Tomcat--or just Tomcat--is one of those projects Tomcat is a container for Servlets
Tomcat can act as a simple standalone server for Web applications that use HTML, Servlets, and JSP Apache is an industrial-strength, highly optimized server that can be extended with Tomcat
36
Web apps
Knows who you are--it doesnt just give you static pages, it interacts with you Can permanently change data (such as in a database) Static web pages (possibly containing forms) Servlets JSP
Tomcat organizes all these parts into a single directory structure for each web application
37
Apache is the most common HTTP Web Server on the Internet. The Tomcat server is a Java-based Web Application container which is used to run Servlet and Java Server Pages (JSP) Web applications. Tomcat has become the reference implementation for both the Java Servlets and Java Server Pages specifications. Tomcat was chosen to be the official Sun Web Component (JSP/Servlet ) Container Reference Implementation.
38
Apache Tomcat is used to serve Java Servlets and Java Server Pages. It's a complex piece of software and though the documentation is very comprehensive, it helps to have a good reference work to hand. It is an open source Java Servlet application server used to deploy Java applications after they are built with JSP and Servlets. It can be used as a stand-alone product or it can be integrated with the Apache server.
39
Alternatives to Tomcat
Old, no longer being developed, all in Java Official reference implementation Difficult to install and configure Open source Opinions vary on how easy it is to install Comes with built-in database
JBoss
40