webserver & tomcat

32
WebServer & Tomcat By B. Venkateswarlu M.Tech Assoc Prof IT(Dept) Newton’s Institute of Engineering

Upload: linus-levy

Post on 03-Jan-2016

103 views

Category:

Documents


3 download

DESCRIPTION

WebServer & Tomcat. By B. Venkateswarlu M.Tech Assoc Prof IT(Dept) Newton’s Institute of Engineering. Web Servers. Webserver is an application that provides the implementation for http - PowerPoint PPT Presentation

TRANSCRIPT

Slide 1

WebServer & TomcatByB. Venkateswarlu M.TechAssoc Prof IT(Dept)Newtons Institute of EngineeringWeb ServersWebserver is an application that provides the implementation for httpWeb server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that can be accessed through the InternetThe most common use of web servers is to host web sites but there are other uses such as data storage or running enterprise applications

The primary function of a web server is to deliver web pages on the request to Clients

Why we need webserver?

In an Web or Enterprise Application perspective, we need a webserver as a first entry point since all the requests have to be originated from a single place. Ex: login page to the application.Web Server is preferred to serve any static files and to produce dyanamic response To regulate all our traffic of requests, we need a single point of control, which is webserver. 4Architecture of Web ServerWeb Servers1s2s3Jsp1Jsp2Jsp3Servlet ContainerJSP ContainerSecurity, Connection pooling, Cache, TransactionsIt maintains Servlet applicationsIt maintains JSP applications

Below is the most recent statistics of the market share of the top web servers on the internet by Netcraft survey in January 2012.ProductVendorWeb Sites HostedPercentApacheApache378,267,39964.91%IISMicrosoft84,288,98514.46%nginxIgor Sysoev56,087,7769.63%GWSGoogle18,936,3813.25%lighttpdlighttpdN/AN/ASun Java System Web ServerOracleN/AN/A6Apache Tomcat:

The Apache HTTP Server, commonly referred to as Apache is web server software notable for playing a key role in the initial growth of the World Wide Web. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation the initial growth of the World Wide Web. Apache is open-source softwareApache provides a variety of MultiProcessing Modules Apache Tomcat type: Web Server Software vendor: Apache Software Foundation

version:6.0/7.0 (latest version-7.0.25) /21-01-2012 compatible with java 1.5/1.6 open source download: http://tomcat.apache.org Download and Install Tomcat 6 In this section we will learn the process to downloading and installing Tomcat 6 on our computer system. set JAVA_HOME=C:\Program Files\Java\jdk1.6Step 1: Installation of JDK:Before beginning the process of installing Tomcat on your system, ensure first the availability of JDK on your system program directory. Install it on your system if not already installed and then set the class path (environment variable) of JDK. To set theJAVA_HOME Variable: you need to specify the location of the java run time environment to support the Tomcat else Tomcat server can not run..Start menu->Control Panel->System->Advanced tab->Environment Variables->New->Set PATH="C:\Program Files\Java\jdk1.6\bin"; %PATH%Step 2:For setting the class path variable for JDK, do like this:Step 3: The process of installing Tomcat 6.0 begins here from now. It takes various steps for installing and configuring the Tomcat 6.0.For Windows OS, Tomcat comes in two forms: .zip file and .exe file (the Windows installer file). Here we are exploring the installation process by using the .exe file. First unpack the zipped file and simply execute the '.exe' file.

Just click on the 'Next' button to proceed the installation process.

Steps 4: A screen of License Agreement displays. Click on the 'I Agree' button.Step 5:A screen shot appears asking for the 'installing location'

Choose the default components and click on he'Next'button. Step 6: A screen shot of 'Configuration Options' displays on the screen. Choose the location for the Tomcat files as per your convenience. You can also opt the default Location

The port number will be your choice on which you want to run the tomcat server. The port number 8080 is the default port value for tomcat server to proceed the HTTP requests. The user can also change the 'port number' after completing the process of installation; for this, users have to follow the following tips. Go to the specified location as " Tomcat 6.0 \conf \server.xml ". Within the server.xml file choose "Connector" tag and change the port number. Now, click on the 'Next' button to further proceed the installation process. Step 7: A Window of Java Virtual Machine displays on the screen

This window asks for the location of the installed Java Virtual Machine. Browse the location of the JRE folder and click on the Install button. This will install the Apache tomcat at the specified location.Step 8: A processing window of installing displays on the screen.

To get the information about installer click on the "Show details" buttonStep 9: A screen shot of 'Tomcat Completion' displays on the screen.

Click on the 'Finish' button.Step 10:A window of Apache Service Manager appears with displaying the running process.

Let the running process goes on.

Configuring Tomcat Manager To Configure the Tomcat Manager, there are two ways; either user can configure Tomcat directly from the toolbar panel or can configure it from Control Panel Section. Step 11:After completing the installation process, the Apache Tomcat Manager appears on the toolbar panel like shown in the below picture.i-) Configuring from toolbar Panel To Configure Apache Tomcat web server from the toolbar panel, you have to press 'double click' on the appeared icon.

A configured window appears on the desktop. Now, just click on the Startup button. The installation process will be completed.

ii-) Configuration from the Control Panel To configure the Apache Tomcat Manager, Users will have to follow the follwing steps: Click on the Start up button -- select Control Panel -- Administrator Tool -- Services -- select Apache Tomcat.

Now, Click on the start up button. The Apache Tomcat is now ready to function. To operate it, follow the below steps of processingTo Start the Tomcat Server:

1.Start the tomcat server from the bin folder of Tomcat 6.0 directory by double clicking the "tomcat6.exe" file.

OR create a shortcut of this .exe file at your desktop.2. Now Open web browser and type URL http://localhost:8080 in the address bar to test the serverTo Stop the Tomcat Server: Stop the server by pressing the "Ctrl + c" keys.

The screen of Apache Tomcat software looks like this:

Startup/shutdown scripts and other useful files.Configuration files, including modules.xml, server.xmlJar files that are used for starting and stopping TomcatThis is where Tomcat places its log files by defaultTemporary folderSample web applications. Any .war files placed here will be automatically expandedWhere Tomcat places intermediate files (such as compiled JSP files) during its work.Change Apache Tomcat default Port 8080 to other Port number

Tomcat will run by default on TCP/IP port number 8080But there can be situations where there are some other servers running on this same port forcing you to change the port of one of the serversThen how to change the port number from 8080 to some other port number?

Changing Apache Tomcat default Port 8080 to other Port number i.e 4040Steps:1.Goto location C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf 2. Open server.xml file