Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.

Slides:



Advertisements
Similar presentations
Apache Tomcat as a container for Servlets and JSP
Advertisements

Java Servlets Java Server Pages (JSP)
Java Servlet & JSP © copyright 2005 SNU OOPSLA Lab.
Technology Overview JAVA Servlets CS-611 S. Witherspoon.
Introduction to Servlets Based on: Hall, Brown, Core Servlets and JavaServer Pages.
J.Sant Servlets Joseph Sant Sheridan Institute of Technology.
Objectives Ch. D - 1 At the end of this chapter students will: Know the general architecture and purpose of servlets Understand how to create a basic servlet.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
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.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Introduction to Servlet & JSP
Comp2513 Java Servlet Basics Daniel L. Silver, Ph.D.
Server Side Programming Web Information Systems 2012.
Servlets Compiled by Dr. Billy B. L. Lim. Servlets Servlets are Java programs which are invoked to service client requests on a Web server. Servlets extend.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
Java Servlets and JSP.
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.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Server-side Technologies
Introduction Servlets and JSP Celsina Bignoli
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Java Servelets. What Is a Servlet? A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed.
Java Servlets CS-422. Application Mapping Your servlet application will be mapped to a directory structure: –“myapp” maps to some directory C:/docs/apps/myapp.
Servlets. - Java technology for Common Gateway Interface (CGI) programming. - It is a Java class that dynamically extends the function of a web server.
Objectives Java Servlet Web Components
Java support for WWW Babak Esfandiari (sources: Qusay Mahmoud, Roger Impey, textbook)
J2EE training: 1 Course Material Usage Rules PowerPoint slides for use only in full-semester, for-credit courses at degree-granting.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
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.
Java Servlets. Servlets When we run small Java programs within a browser these are referred to as Applets... And when we run small Java programs within.
Java Servlets & Java Server Pages Lecture July 2013.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
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)
Chapter 2 Web app architecture. High-level web app architecture  When a client request coming in and needs servlet to serve dynamic web content, what.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
Java Servlet API CGI / HTTP Concepts Java Servlet API.
@2008 Huynh Ngoc Tin Chapter #2 JAVA SERVLET PRGRAMMING.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development Session II: Introduction to Server-Side Web Development with Servlets.
Java Servlets and Java Server Pages Norman White Stern School of Business.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
CS320 Web and Internet Programming Introduction to Java Servlets Chengyu Sun California State University, Los Angeles.
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.
Java Servlets Java Server Pages (JSP)
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Java Servlets and Java Server Pages
How CGI and Java Servlets are Run By David Stein 14 November 2006.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Distributed Web Systems Java Servlets Lecturer Department University.
CS122B: Projects in Databases and Web Applications Spring 2017
Introduction to Servlets
CS122B: Projects in Databases and Web Applications Winter 2017
Web-based Software Development - An introduction
Introduction Servlets and JSP
Servlet Fudamentals.
Net-centric Computing
Introduction to Java Servlets on Jakarta Tomcat
HTTP Servlet Overview Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet might.
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
Introduction to Servlet
Basic servlet structure
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu

History What is a Java Server/Servlet Architecture Pros and Cons Existing Java Servers Conclusion Java Server and Servlet

History Web has undergone rapid changes E-Commerce  Transition from static to dynamic environment  Birth of Common Gateway Interface (CGI) CGI languages include  Perl  C, C++  Visual Basic Script

CGI Pros and Cons Browser HTTP Web Server CGI bin Process HTML Database Insecure Platform dependent Inefficient

CGI vs. Servlet Servlet is Sun’s solution for CGI Both generate dynamic contents Servlet is light Servlet is secure Servlet is platform independent Servlet has better support for reusable component

Java Server Definition An instance of Java Virtual Machine One Java Server can support multiple concurrent services Java Server can start:  administrative services  HTTP services  web proxy services Services are configured when server process is initiated

Java Servlet Definition Java class that runs in JVM associated with Server Java object that conforms to a specific interface defined by the server architecture Loaded and invoked by services Multithreading Extends the functionality of the server

Server and Servlet Interaction Browser HTTP Web Server Servlet Engine Servlets HTML Database Application Business Log.

Demo and Servlet Life Cycle Application Server Servlet Engine Init() Service () doGet () doPost () Destroy() Do… () link to Utopia HttpResponse HttpRequest PrintWriter link to Laptop

Simple Sample (Hello World) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println(" "); out.println("Hello World! "); out.println(" "); out.println(" Hello World! "); out.println(" "); }}

Servlet Functions Reads data sent by user Looks up information from HTTP request Connects to database Invokes legacy application Executes RMI or CORBA calls Executes algorithm Formats document Sends document back to clients

Servlets Algorithm JDBC PANDA Project Group Assignment Servlets in Action Tomcat HTTP Link to Laptop link to Utopia

Servlet with Synchronization… public class AlgorithmRequest extends HttpServlet { public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ PrintWriter output; response.setContentType("text/html"); output = response.getWriter(); if(getConnection()){ String SemesterCourse = request.getParameter("SEMESTERCOURSE"); synchronized (this) { AlgorithmControl ac = new AlgorithmControl(SemesterCourse); …………………………………………

Servlet Advantanges Convenient Efficient (light weight thread, memory) Inexpensive Keep intellectual properties on the server Portable Powerful Secure

Server Advantanges Efficient  Memory management  Light weight Platform independent Thread-safe

Server Considerations Java is slower than C++ However, Java server uses threads

WebSphere from IBM WebLogic from BEA 9i Application Server from Oracle Jrun from Allaire iPlanet from Sun Tomcat from Apache Java Servers or Engines

Apache and Tomcat Industrial strength Web server Tomcat is a servlet engine that can be plugged in with Apache Apache and Tomcat can be down loaded from FREE!

Servlet vs. PHP PHP also free open source PHP consists of tags in HTML document Servlet is more widely supported Servlet is written in Java with extensive API for:  database access  distributed objects  networking

Servlet vs. ASP ASP is a competing technology from Microsoft Servlet is portable to  other operating systems  web servers Servlet is more powerful for complex applications Better support for reusable components

Conclusion Java server and servlet are  Economical  Portable  Powerful  Secure

Thank You