21/12/20151 T h i s p r e s e n t a t i o n w i l l p r o b a b l y i n v o l v e a u d i e n c e d i s c u s s i o n, w h i c h w i l l c r e a t e a.

Slides:



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

Lecture plan Information retrieval (from week 11)
Internet Security Protocols
DT228/3 Web Development WWW and Client server model.
Technology Overview JAVA Servlets CS-611 S. Witherspoon.
Servlets and a little bit of Web Services Russell Beale.
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 34 Servlets.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
INTERNET DATABASE. Internet and E-commerce Internet – a worldwide collection of interconnected computer network Internet – a worldwide collection of interconnected.
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.
Server Side Programming Web Information Systems 2012.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
Applets & Servlets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Server-side Scripting Powering the webs favourite services.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Java support for WWW Babak Esfandiari (sources: Qusay Mahmoud, Roger Impey, textbook)
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
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 & Java Server Pages Lecture July 2013.
Chapter 6 Server-side Programming: Java Servlets
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
@2008 Huynh Ngoc Tin Chapter #2 JAVA SERVLET PRGRAMMING.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Copyright © 2002 ProsoftTraining. All rights reserved. Java Servlets.
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.
Introduction to Servlets Allen Day. Notes This is a training NOT a presentation Please ask questions Prerequisites.
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.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
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
Chapter 4 Request and Response. Servlets are controlled by the container.
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.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
Web Page Design The Basics. The Web Page A document (file) created using the HTML scripting language. A document (file) created using the HTML scripting.
National College of Science & Information Technology.
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.
CS122B: Projects in Databases and Web Applications Spring 2017
CS122B: Projects in Databases and Web Applications Winter 2017
Servlets.
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
PHP / MySQL Introduction
Chapter 26 Servlets.
CS122B: Projects in Databases and Web Applications Winter 2018
CS122B: Projects in Databases and Web Applications Spring 2018
Objectives In this lesson you will learn about: Need for servlets
CS122B: Projects in Databases and Web Applications Winter 2019
Presentation transcript:

21/12/20151 T h i s p r e s e n t a t i o n w i l l p r o b a b l y i n v o l v e a u d i e n c e d i s c u s s i o n, w h i c h w i l l c r e a t e a c t i o n i t e m s. U s e P o w e r P o i n t t o k e e p t r a c k o f t h e s e a c t i o n i t e m s d u r i n g y o u r p r e s e n t a t i o n I n S l i d e S h o w, c l i c k o n t h e r i g h t m o u s e b u t t o n S e l e c t “ M e e t i n g M i n d e r ” S e l e c t t h e “ A c t i o n I t e m s ” t a b T y p e i n a c t i o n i t e m s a s t h e y c o m e u p C l i c k O K t o d i s m i s s t h i s b o x T h i s w i l l a u t o m a t i c a l l y c r e a t e a n A c t i o n I t e m s l i d e a t t h e e n d o f y o u r p r e s e n t a t i o n w i t h y o u r p o i n t s e n t e r e d. SSS By, Kshirsagar Harshada Mangesh. Third Year Computer Government Polytechnic, Pune.

21/12/20152 What are Servlets? What are Servlets? Why are Servlets? Why are Servlets? How are Servlets? Why not CGI? When are Servlets? When are Servlets? Where are Servlets? Where are Servlets? Some Questions In your Mind …. Servlets Kshirsagar Harshada Mangesh

21/12/20153 Concepts Internet : network of networks WWW (World Wide Web) also referred to as web : - One of the largest Internet services - Consists of millions of websites

21/12/20154 How web works Web Browser Web Server URL Browser requests A web page WebServer sends back the requested page Uniform Resource Locator which specifies the location of the webpage on the webserver Stores the WebPages & sends them to the browser upon a request

21/12/20155 Serving static HTML page Web Server Browser requests A web page WebServer sends back the requested page Initially web servers were designed to provide the static WebPages HTML page WebPages On Hard Disk

21/12/20156 Servlets Kshirsagar Harshada Mangesh

21/12/20157 Servlets Kshirsagar Harshada Mangesh

21/12/20158 Servlets Kshirsagar Harshada Mangesh

21/12/20159 Servlets Kshirsagar Harshada Mangesh

21/12/201510

21/12/201511

21/12/201512

21/12/201513

21/12/ a soultion for dynamically generating HTML Servlets are small platform-independent server- side programs that extend the functionality of a webserver It is a java class which run on the webserver and communicate with the web browser using HTML & HTTP A no of servlets can form a website. Servlets Kshirsagar Harshada Mangesh

21/12/  But web consists of millions of websites( comprising of billions of webpages linked together using hyperlinks) So there require someone to host these websites & map web applications to servlets. This task of hosting servlets & web applications is done by Servlets Kshirsagar Harshada Mangesh

21/12/ Architecture of a Servlet (Request-Response Flow) Web Browser Web Server HTTP Request HTTP Response Mapping information Web Application Web Container Static resources Servlets Static resources

21/12/ init() destroy() Servlet 3 distinct phases Birth Life Death service()

21/12/ init() method called before the servlet handles its first request The container passes ServletConfig Object contaning the initialization parameters to this method If overridden must call super.init() first public void init(ServletConfig config)throws SerletException { }

21/12/ service() method Each time the server receives a request for a servlet,it spawns a new thread & calls the service method It is the entry point for executing application logic in a servlet Web Server Browser service() Single Instance Of the servlet public void service(ServletRequest request,ServletResponse response) { }

21/12/ destroy() method - is called at servlet unloading - all cleanup activities can be done here (closing db/socket connections,updating log files) public void destroy() { }

21/12/ There are 2 steps in order to build & deploy a servlet-based application (A) Development Phase : - Write the servlet class with the required application logic - Compile the servlet class (B) Deployment Phase : - Deploy the servlet in the webserver

21/12/ Redirection At times outdated/old URLs need to be redirected to new ones so that the user does not see an error when the URL is accessed In such situations,URL redirection option allow us to forward the request to new location Several situations in which the URL needs to be changed - when the document moves to new URL - when the application is enhanced to include more pages - when the user goes to final order page w/o filling the requisite order details URL redirection can be achieved by using (A) sendRedirect method of HttpServletResponse interface (B) forward method of RequestDispatcher interface “ redirect ” means sending response from servlet to the browser telling it to go to another URL

21/12/ Conclusion

21/12/201524

21/12/ Question & Answers ? ?

21/12/ Java on Server-side Robust Scalable Open Fast Portable Well integrated Extensible & flexible

21/12/ Advantages over other techniques Generally much faster than CGI scripts A different process model is used. Standard API Supported by many web servers. All the advantages of the Java --Ease of development --Large API

21/12/ Session Tracking

21/12/ Why are Servlets? Static Webpages Dynamic Webpages