AddressBook using Servlets and Intro to JSP Lec - 33.

Slides:



Advertisements
Similar presentations
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
Advertisements

JSP and Servelets.
Java Server Pages Jeffrey Jongko. Introduction Java Server Pages (JSP) technology was created by Sun Microsystems and is built on top of Sun’s Java Servlet.
Apache Struts Technology
JSP1 Java Server Pages (JSP) Introducing JavaServer Pages TM (JSP TM ) JSP scripting elements.
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Servlets and a little bit of Web Services Russell Beale.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Introduction to JavaServer Pages Vijayan Sugumaran Dept. of DIS Oakland University Parts of this presentation was provided by
LYU9901-Travel Net LYU9901-Travel Net Supervisor: Prof. Michael R. Lyu Students: Ho Chi Ho Malcolm Lau Chi Ho Arthur (Presentation on )
Multiple Tiers in Action
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 Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
Apache Struts Technology A MVC Framework for Java Web Applications.
JavaServer Pages TM Introduce by
CS 160: Software Engineering August 27 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
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.
1 Guide to JSP common functions 1.Including the libraries as per a Java class, e.g. not having to refer to java.util.Date 2.Accessing & using external.
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
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.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Java Server Pages CS-422. What are JSPs A logical evolution of java servlets –most servlets dynamically create HTML and integrate it with some computational.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
J2EE training: 1 Course Material Usage Rules PowerPoint slides for use only in full-semester, for-credit courses at degree-granting.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
SKT-SSU IT Training Center Servlet and JSP. Chapter Ten: JSP Intro and Overview.
Introduction to ColdFusion Yu Fu 2003 MEC Candidate.
Case Study + MVC Lec Error Pages By means of the page directive, a JSP can be given the responsibility of an Error page An Error JSP will be called.
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Web Server Programming 3. Server side includes. HTML+ (‘hole’) technologies Uses ‘HTML+”, HTML (or XML) extended with code. Very many different varieties.
Introduction to JavaServer Pages. 2 JSP and Servlet Limitations of servlet  It’s inaccessible to non-programmers JSP is a complement to servlet  focuses.
Chapter 2 An Overview of Servlet and JSP Technology.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Active Server Pages Server-Side Scripting and Client-Side Scripting.
IT WEB TECHNOLOGY Prepared by, K.ABINAYA Lect/IT.
Java Servlets and Java Server Pages Norman White Stern School of Business.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
Java for networking Module Introduction Data Communications Communication architecture Application.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
©SoftMoore ConsultingSlide 1 Overview of Servlets and JavaServer Pages (JSP)
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
JAVA SERVER PAGES -by Rubeena Memon Deepti Jain Jaya Thakar Jisha Vettuventra.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Apache Struts Technology A MVC Framework for Java Web Applications.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Web Analytics Fundamentals Presented by Tejaswi, Chandrika, Sunil.
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
4166 Review.
Scripted Page Web App Development (Java Server Pages)
PHP / MySQL Introduction
Invoking Java Code from JSP
MSIS 655 Advanced Business Applications Programming
Chapter 27 WWW and HTTP.
Introduction to Servlets
Presentation transcript:

AddressBook using Servlets and Intro to JSP Lec - 33

Servlets Example A part of Address Book

Design Process  Step 1 – Create a database (AddressBook) Make a table named Person

Design Process  Step 2 – Make a PersonInfo class Three attributes: name, address, ph. No. Has Parameterized constructor Override toString() method  Step 3 – Make a DAO class which contains an establishConnection( ) method a searchPerson(string name) method that returns PersonInfo object

Design Process  Step 4 – Write SearchPerson servlet Will take input for name to search in address book Submits the request to ShowPerson servlet  Step 5 – Write ShowPerson servlet Recieves request from SearchPerson servlet Instantiate objects of PersonInfo and DAO class Call searchPerson method Show results

package  What is package?  Examples: java.lang Javax.swing  How to use package import java.lang.*; import javax.swing.*;

JSP Example A part of Address Book

JavaServer Pages Overview

Agenda  Introducing JavaServer Pages TM (JSP TM )  JSP scripting elements  The JSP page Directive  Including Files in JSP Documents  Using JavaBeans™ components with JSP  Creating custom JSP tag libraries  Integrating servlets and JSP with the MVC architecture

The Need for JSP  With servlets, it is easy to Read form data Read HTTP request headers Set HTTP status codes and response headers Use cookies and session tracking Share data among servlets Remember data between requests Get fun, high-paying jobs  But, it sure is a pain to Use those println statements to generate HTML Maintain that HTML

The JSP Framework  Idea: Use regular HTML for most of page Mark servlet code with special tags Entire JSP page gets translated into a servlet (once), and servlet is what actually gets invoked (for each request)

What are Java Server Pages?  The Java Server Pages technology combine Java code and HTML tags in the same document to produce a JSP file. Java JSP + =

Advantages of JSP Over Competing Technologies  Versus ASP or ColdFusion Better language for dynamic part Portable to multiple servers and operating systems  Versus PHP Better language for dynamic part Better tool support  Versus WebMacro or Velocity Standard  Versus pure servlets More convenient to create HTML Can use standard tools (e.g., UltraDev) Divide and conquer JSP developers still need to know servlet programming

JSP/Servlets in the Real World  Google: the world’s biggest search portal

JSP/Servlets in the Real World  ofoto.com: print and manage digital and conventional photos.

JSP/Servlets in the Real World First USA Bank: largest credit card issuer in the world; most on-line banking customers

JSP/Servlets in the Real World Delta Airlines: entire Web site, including real-time schedule info

JSP/Servlets in the Real World American Century Investments: more than 70 mutual funds, $90 billion under management, two million investors

JSP/Servlets in the Real World  Excite: one of the top five Internet portals; one of the ten busiest sites on the Web

JSP – The Page becomes a Class  Page Compiler  Chunks  Page compiled into a Servlet  First invocation is slow – has to compile  Subsequent invocations more rapid