Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.

Slides:



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

Java Server Pages (JSP)
Java Servlet & JSP © copyright 2005 SNU OOPSLA Lab.
Introduction to Servlets Based on: Hall, Brown, Core Servlets and JavaServer Pages.
An architecture for webb applications, J2EE
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.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
An introduction to Java Servlet Programming
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
JSP Java Server Pages Reference:
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.
Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
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.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
Introduction Servlets and JSP Celsina Bignoli
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
1 Chapter 2 The Web Tier  Web Applications and Web ContainersWeb Applications and Web Containers  Dynamic Content CreationDynamic Content Creation 
Objectives Java Servlet Web Components
Java support for WWW Babak Esfandiari (sources: Qusay Mahmoud, Roger Impey, textbook)
Chapter 5 Java Servlets. Objectives Explain the nature of a servlet and its operation Use the appropriate servlet methods in a web application Code the.
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.
Stanisław Osiński, 2002JSP – A technology for serving dynamic web content Java Server Pages™ A technology for serving dynamic web content Stanisław Osiński,
Java Servlets & Java Server Pages Lecture July 2013.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
A seminar on j2ee by saritha. s. What is J2EE J2EE (Java 2 Platform, Enterprise Edition) is a Java platform designed for the mainframe-scale computing.
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.
Copyright © 2002 ProsoftTraining. All rights reserved. Java Servlets.
JSP Pages. What and Why of JSP? JSP = Java code imbedded in HTML or XML –Static portion of the page is HTML –Dynamic portion is Java Easy way to develop.
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.
Advanced Java Session 6 New York University School of Continuing and Professional Studies.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
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.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Java Servlets Java Server Pages (JSP)
©SoftMoore ConsultingSlide 1 Overview of Servlets and JavaServer 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.
 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,
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Java Server Pages. 2 Servlets The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
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.
17 Copyright © 2004, Oracle. All rights reserved. Integrating J2EE Components.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
CS 562 Advanced Java and Internet Application Computer Warehouse Web Application By Team Alpha :-  Puja Mehta (102163)  Mona Nagpure (102147)
Introduction Servlets and JSP
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
MSIS 655 Advanced Business Applications Programming
Servlets and Java Server Pages
Servlets and JSP 20-Nov-18 servletsJSP.ppt.
Distributed System Using Java 2 Enterprise Edition (J2EE)
Objectives In this lesson you will learn about: Need for servlets
JavaServer Faces: The Fundamentals
J2EE Lecture 1:Servlet and JSP
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications with Oracle9i JDeveloper

Java 2 Enterprise Edition - J2EE Java Servlets and JavaServer Pages JDeveloper Servlet and JSP Features Building JSP applications Agenda

The J2EE Architecture

Oracle and J2EE

Java 2 Enterprise Edition - J2EE Java Servlets and JavaServer Pages JDeveloper Servlet and JSP Features Building JSP applications Agenda

Java Servlets What Are Servlets? –Servlets are platform-independent, server-side Java components which extend an HTTP server Like mini-webservers HttpServlet - Dynamic Page generation (HTML, XML, …) –Superior to inefficient CGI and proprietary APIs (ISAPI, NSAPI …)

Java Servlets What Are Servlets? –Portable to any Application Server with Java Virtual Machine –Servlets have access to the entire family of Java APIs JDBC EJB JavaMail... Widespread industry acceptance

Java Servlets provide many useful services Provides low-level API for building Internet Services Serves as foundation to JavaServer Pages Can deliver multiple types of data to any client –XML, HTML, WML, GIF, etc... Can serve as “Controller” of JSP/Servlet application Multiple Roles of Java Servlets

The ServletRequest Object Encapsulates all request information from the client –request headers –form data and query parameters –other client data {session info, cookies, path...etc.} The ServletResponse Object Encapsulates all data sent back to client –response headers –OutputStream to write data to the client –setting cookies Java Servlet Architecture

The HttpSession Object Allows for the storage of transient, session data Easy way to identify a single user between page requests Servlets can obtain data from session, modify and store it again Typical Example - Online Store Customer profile information Shopping Cart Java Servlet Architecture

HttpServlet doGet() { Process request from Client using Request object; Send response to client via the Response object; } Request Response Http Client Session

A Hello HttpServlet example public class HelloServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.setContentType(“text/html”); out.println(" "); out.println(” Hello There! "); out.println(" "); out.close(); } Java Servlets

A Servlet which sends XML data public class FormServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.setContentType(“text/xml”); out.println(" "); out.println(" ”); out.println(“ Bob ”); out.println(" ”); out.println(" ”); out.close(); } Java Servlets

LoadInitialize Handle 0 - N Client requests Destroy Life Cycle of a Servlet Server Operations Client (Browser) Requests

Servlet Benefits Performance! Platform Independence Rich Development Environment Broad Industry Acceptance

JavaServer Pages What is a JavaServer Page? –JavaServer Pages separate content presentation from content generation. –Provides a simple and fast way to build dynamic page content (HTML, XML, etc) xyML with embedded Java code Extensible with components & custom tags

JavaServer Pages & Servlets JavaServer Pages are based on Servlet technology –JSP container is a Servlet –Each JSP is compiled into runtime Servlet –Same performance and portability benefits from Servlet technology but with the ease of use of markup language Best of both worlds for web designers and web developers

JavaServer Pages JavaServer Pages consist of HTML pages with special tags which allow for inclusion of Java logic –Scriptlets –Directives –Expressions –Declarations –Other Tags - UseBean, setProperty...

A Simple JavaServer Page example Hello! Today is: JavaServer Pages

A JavaServer Page using a JavaBean Employees: JavaServer Pages

Custom JSP Tags Custom Tag Libraries with JSP 1.1 Today’s Date is:

How is a JSP Served? Java Compiler Servlet Runner JSP Translator JSP Source Hello.jsp Generated file Hello.java Servlet class Hello Output of Hello HTML /XML JDBC JSP runtime

JSP Benefits Performance! Platform Independence Easy xyML Development Environment Extensible with Javabeans and Custom Tags <xml>,<html>,….

Java 2 Enterprise Edition - J2EE Java Servlets and JavaServer Pages JDeveloper Servlet and JSP Features Building JSP applications Agenda

Existing JDeveloper JSP/Servlet Features HttpServlet Wizard JSP Wizard Integrated JSP/Servlet runtime BC4J Data Tag Library –Code generation with Datapage wizard Local and Remote Debugging

Oracle9i JDeveloper JSP/Servlet Features Built-in OC4J runtime container –OC4J (Servlet/JSP/EJB) OC4J

Customizable Component Palette Oracle9i JDeveloper JSP/Servlet Features

JSP Insight –Tag Insight –Java Insight Oracle9i JDeveloper JSP/Servlet Features

Improved BC4J Data Tag Library –More useful/flexible Tags –Component Tags Oracle9i JDeveloper JSP/Servlet Features

JSP Code Generation Templates Oracle9i JDeveloper JSP/Servlet Features

J2EE WAR and EAR Deployment –Deploys to standard WAR and EAR files –One-Click Deployment to Oracle9iAS –Weblogic Deployment Support OC4J Oracle9i JDeveloper JSP/Servlet Features WAR/EAR

Demonstration JSP & Servlet Development in Oracle9i JDeveloper This demonstration shows you how to: Build and debug simple servlets and JSPs Use custom JSP tag libraries –Customize Component Palette Build BC4J based JSP applications Deploy a BC4J JSP application to Oracle9iAS

Summary In this Presentation you have learned: Servlet and JSP Basics How to build and debug Servlets and JSPs with Oracle9i JDeveloper How create BC4J JSP applications and deploy them to Oracle9iAS

& Q U E S T I O N S A N S W E R S Q&A