MC365 Application Servers, Servlets, and Java Server Pages (JSP’s): Tomcat.

Slides:



Advertisements
Similar presentations
CGI vs Servlets Raghu Havaldar Dept of Computer Science Iowa State University.
Advertisements

An architecture for webb applications, J2EE
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Server-Side vs. Client-Side Scripting Languages
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.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
MC365 Application Servers: Tomcat. Today We Will: Discuss what application servers are Introduce Tomcat Download and install Tomcat Break up into teams.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Lecture 4B: Server-Side Scripting IT 202—Internet Applications Based on notes developed by Morgan Benton.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
MC365 Application Servers: Java Server Pages (JSP’s) and Session Management.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Website Development with PHP and MySQL Introduction.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Comp2513 Java Servlet Basics Daniel L. Silver, Ph.D.
Comp2513 Java Server Pages Daniel L. Silver, Ph.D.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.
Session-01. What is a Servlet? Servlet can be described in many ways, depending on the context: 1.Servlet is a technology i.e. used to create web application.
Java web development Servlet & Java server pages.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
8 Server Side Scripting.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Understanding and Managing WebSphere V5
Server-side Technologies
Introduction Servlets and JSP Celsina Bignoli
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Applets & Servlets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CIS 285 ROBINSON WINTER 2005 CIS 285 Web Application Development with Java CIS 285 Sinclair Community College Instructor: Mary Robinson.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Java Beserkers Group 4. Start of Java Development began on June of 1991 by a group of computer scientist at the Sun Mircrosystems Company Development.
Introduction to Internet Programming (Web Based Application)
Application Servers: Tomcat. What is an application server? Servlets are Java’s answer to server-side programming. Servlets are a special type of Java.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Putting What We Learned Into Context – WSGI and Web Frameworks A290/A590, Fall /16/2014.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
J2EE Structure & Definitions Catie Welsh CSE 432
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
Introduction to JavaServer Pages February 23, 2000 Chris Hagner Noblestar Systems Corporation
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Java for networking Module Introduction Data Communications Communication architecture Application.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
Java Servlets and Java Server Pages
XAMPP.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Java Server Pages Can web pages be created specially for each user?
CS122B: Projects in Databases and Web Applications Spring 2017
CS122B: Projects in Databases and Web Applications Winter 2017
Introduction to JSP Liu Haibin 12/09/2018.
MSIS 655 Advanced Business Applications Programming
CS122B: Projects in Databases and Web Applications Winter 2018
CS122B: Projects in Databases and Web Applications Spring 2018
CS122B: Projects in Databases and Web Applications Winter 2019
Presentation transcript:

MC365 Application Servers, Servlets, and Java Server Pages (JSP’s): Tomcat

Today We Will Cover: What is an application server? How do servlets and jsp’s work with an application server? Introduce the Tomcat application server.

What is an application server? It is easier to answer this question by looking at the history of dynamic web pages and the factors that led to the development of the application server. Years ago dynamic web pages were generated using a technology called CGI (Common Gateway Interface). –This was usually a program written in C, Perl or some other similar language. –The web server was configured to recognize certain http requests and execute that program. –This worked well for a while.

Disadvantages of CGI As the web became more and more popular, the load placed on these web servers and CGI programs increased. One of the major inefficiencies of CGI programming is that every time a request is made for that program, a new instance is kicked off by the web server. For popular websites, this can quickly use up all of the resources on that server causing delays or even crashes. In the late 1990s, the popularity of the Internet was increasing at a remarkable rate. At the same time a new language was also become more and more popular…Java.

Benefits of Java Servlets The creators of Java came up with an interesting solution to the CGI problem – Java servlets. Servlets are a type of Java program similar to applications and applets. –We will go over servlets in more detail in the next class. They are Java’s answer to server-side programming.

Benefits of Java Servlets So, what makes servlets better than CGI? –Servlets are multi-threaded First and foremost, servlets take advantage of Java’s concept of threads. This is a major advantage. When a request is made to the web server calling for it to execute the java program, the Java program can just kick off a new thread instead of instantiating a new instance of the program. This saves a tremendous amount of server resources. –Portable As with all other java programs, servlets can run on multiple platforms. Remember Sun’s promise of write once, run anywhere philosophy. –Industry standard Java is pretty well established as the language of choice for server-side programming for the web.

So, again what is an application server? Ok, getting back to the original question. –Unlike CGI programs, Java servlets can not be called directly by the web server. They need a container as defined by the J2EE standard. –This container is called an application server. –The application server, or app server as it is often called, works in concert with the web server. Actually, most of today’s app servers have built-in web servers. –This is the way it works:

How the Process Works The user submits an http request via a web browser (like Netscape or IE). The http request is received by the web server, which has been configured to send certain requests to the application server. The application server receives these special requests. It knows which servlet to execute based on the http request (the app server has its own configuration). The servlet is executed, does its thing, and generates a response to the user in html format.

How do JSP’s fit in? –The Java servlet can produce the HTML response directly or it can call a Java Server Page (JSP) to generate the HTML. –Why would you want to use a JSP? –The main reason for using JSP’s is to separate the presentation from the business logic. –Servlets are generally responsible for performing the business logic. –JSP’s are generally responsible for presentation. –If you generate the HTML directly in the servlet, any changes to design need a programmer. –If you use a JSP, many design changes can be done by the UI team directly. –We will cover JSP’s in a lot more detail in a week.

The Tomcat Application Server –Application servers are basically programs (just as web servers are). –Different companies have developed a variety of application servers. Here are the industry leaders: –WebLogic –IBM’s WebSphere –Tomcat –WebLogic and WebSphere are marketed for large-scale enterprises. –They are industrial strength packages but they are very expensive. –Together they own most of the app server market share.

The Tomcat Application Server –Tomcat is an app server produced by the Jakarta project. –It is free and open source. –It is a very good app server and is a favorite among many smaller organizations that don’t need many of the bells and whistles of the other two and/or can’t afford them. –It is a great tool to learn on. Once you become familiar with one app server, it is much easier to learn the others. –Tomcat is much easier to manage than many of the other application servers.

So how do you set up Tomcat? –Tomcat can run on many different platforms. In this class we will go over how to install Tomcat on the Windows operating system. –You are free to install it on another operating system if you want. Once installed, management of the app server is relatively the same regardless of the OS. –However, because most students here run Windows, that is the OS we will use in class.

Installing Tomcat? –Go to Click on the tomcat exe download link and save it to your system. Execute the executable.

Verify that your installation is running successfully –Open a web browser. –Go to –Click on the Servlet Examples link. –Execute the Hello World example. –You should see Hello World!