Field Trip #24 Setting Up a Web Server. Apache Apache is one of the most successful open source web servers In 1995 the most popular web server was the.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Java Server Pages (JSP)
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
J.Sant Servlets Joseph Sant Sheridan Institute of Technology.
MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
MC365 Application Servers: Java Server Pages (JSP’s) and Session Management.
How to Configure Tomcat with Intellij By: Navjot S.Sandhu SW410 Enterprise Java Prof. Lyon.
Chapter 4 Servlets Concept of Servlets (What, Why, and How) Servlet API Third-party tools to run servlets Examples of Using Servlets HTML tag with GET.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
ECE356 – Database Systems Lab 1 – Building a Web Project with NetBeans Tiuley Alguindigue Lab Instructor – University of Waterloo, E & CE Dept. Fall 2013.
Java web development Servlet & Java server pages.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Java Servlets and JSP.
SERVLETS.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Chapter 1 Web Server Setup and Configuration. Contents A.What is web server B.Installing and Configuring Web Server C.Testing the Installation.
Configuring Apache tomcat Specifying the server port NOTE: Edit the install_dir/conf/server.xml and change the port attribute of the connector element.
WebServer & Tomcat By B. Venkateswarlu M.Tech Assoc Prof IT(Dept) Newton’s Institute of Engineering.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
Intro to Servlets Lec 26. Web-Based Enterprise Applications in Java Figure shows a simplified view of one application and its layers.
PHP and SQL Server: Queries IST2101. Project Report 4 SQL Queries Due Sunday, 4/5 at 11:59pm Instructions on how to access team webspace and SQL database.
Linux Operations and Administration
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Using Opal to deploy a real scientific application as a Web service Sriram Krishnan
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 29.1 Multi-Tier Architecture 29.2 Web Servers.
Apache Server The Apache Server Apache is a WWW server that implements the HTTP protocol. Apache runs as a daemon. This means that it is a resident.
Web Servers1-1 Web Servers Xingquan (Hill) Zhu
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
Movie Manager by Patrick Wesley and Chris Grey Internet Database Project for CS 8630 – Summer 2004 Dr. Guimaraes.
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
AN OVERVIEW OF SERVLET TECHNOLOGY SERVER SETUP AND CONFIGURATION WEB APPLICATION STRUCTURE BASIC SERVLET EXAMPLE Java Servlets - Compiled By Nitin Pai.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
Standalone Java Application vs. Java Web Application
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Java Servlets example using NetBeans 6. Pre-requirements: Install Java JDK 1.6 Install NetBeans IDE 6 (we will use version NetBeans IDE update 16)
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
Chapter 6 Server-side Programming: Java Servlets
Apache, MySQL and PHP Installation and Configuration Chapter 1 Apache Installation and Configuration.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
LinuxChix Apache. Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is.
The HTTP is a standard that all Web browsers and Web servers must speak in order for the Web portion of the Internet to work.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Web Server Apache PHP HTTP Request User types URL into browser Address resolved if nec. We use directly Most browsers request.
Chapter 3 Servlet Basics. Contents A.Installing Eclipse WTP and configuring Tomcat B.Prime Number Problem C.Multiplication Table Problem.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
CITA 310 Section 4 Apache Configuration (Selected Topics from Textbook Chapter 6)
Java Servlets References: Karen Anewalt, Mary Washington College.
Apache Tomcat & Quick Tutorial
Tomcat Celsina Bignoli
Course Outcomes of Advanced Java Programming AJP (17625, C603)
Apache Tomcat Web Server
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
COP 4610L: Applications in the Enterprise Spring 2005
Java Servlets and JSP.
Getting Started With Solr
Presentation transcript:

Field Trip #24 Setting Up a Web Server

Apache Apache is one of the most successful open source web servers In 1995 the most popular web server was the HTTP daemon Many webmasters had modified it and add fixes to it (patches) However, there was no way maintain a single distribution that contained them all A small group of webmasters were contacted

Apache, cont'd They came up with a scheme to provide a way that all of them could share their patches That is why the server is name Apache It is today the most popular web server

Tomcat Tomcat is an open source implementation of the Java Servlet technologies and JPS technologies A “servlet” is a small Java program that runs on a server It receives information through requests and outputs information to the user When you download Tomcat, it will come with the jar files you will need in order to create servlets

Connecting Apache to Tomcat In order to connection Apache to Tomcat, we will use a connector When a request for a servlet is received, Apache will forward that request to Tomcat We must configure Apache so that it can forward requests

This is the structure found in c:\Program Files (x86)\Apache Software Foundation\Apache2.2 c:\Program

The main configuration file for Apache is httpd.conf

These are the extra files containing optional configuration

The de facto port Apache uses is 80

All documents to be served out should be placed in DocumentRoot

The default file that will be served out is the DirectoryIndex

The error log is important

The Directory tags lets us specify if users can access files

Apache seperates some configuration files into the extra directory and we can choose if we want to include them

Tomcat To install Tomcat, we unzip the file containing Tomcat We will extract this into c:\Users\Public\tomcat C:\Users\Public is open to everyone We also create a directory called connector under tomcat, and there we place the file mod_jk.so

These are the configuration files found in tomcat\conf

This is found in tomcat-users

This is an important file. It creates a worker that will be used to executes the servlets we request

We have to modify the server configuration file so that it uses the same port specified in worker.properties

This file allows us to connect Apache to Tomcat. We load the connector, specify the workers file, specify the log files, and mount directories on the worker. This means that requests for servlets in those locations is passed to the worker

Creating a Basic HTML Page We can use an editor like notepad to create a basic html document A simple document can start with an tag In the section, we can specify the title In the section, we specify the content

Creating a Form A form begins with the tag We can include text fields for the user to input information with the tag We need to include at least one submit button We finish the form with

Creating a Servlet A Servlet is created by creating a subclass of javax.servlet.HttpServlet In this class, if we want to support the GET method, we implement the doGet method If we want to support the POST method, we implement the doPost method

CLASSPATH In order to compile the servlet, you need to make sure that servlet-api.jar is in your CLASSPATH CLASSPATH is a list of directories that are searched for classes In order to include a jar in the CLASSPATH, you list the absolute path including the jar file name

A Simple Servlet

The GET and POST Methods The GET method allows you to access the servlet with requests that look like The POST method allows you to access the servlet as the request of a post and the information is not visible In order to access the query, you can use the method getParameter that you call on an HttpServletRequest object