Servlets, JSPs and MySQL Presented by: Gian Alvarez Vicente Rivera.

Slides:



Advertisements
Similar presentations
Other Web Application Development Technologies. PHP.
Advertisements

Lecture plan Information retrieval (from week 11)
1 Database Driven Web Application Clients Application Servers including web servers Database Server Traditional client-server (2-tier architecture): client:
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
DT228/3 Web Development WWW and Client server model.
Java Servlet & JSP © copyright 2005 SNU OOPSLA Lab.
Time Scalability Single User Unlimited Users 100s of Users Several Users PC based Single user Late 1980sNow PC based, file-level locking Single user or.
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Web Server Hardware and Software
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 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.
Time Scalability Single User Unlimited Users 100s of Users Several Users PC based Single user Late 1980sNow PC based, file-level locking Single user or.
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 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.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
Web-based Software Development - An introduction.
Server-side Technologies
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
Applets & Servlets.
Web Application Development Tools/Environments Tim Sigmon George Pipkin, Bill Niebel, Wade Komisar Dave Saunders, Nathan Piazza Advanced Technology Group.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Week 7 Lecture Web Database Development Samuel Conn, Asst. Professor
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.
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Web Application Programming Carol Wolf Computer Science.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
Wanna know how to get from “Y” to“K” ? Farisai Mabvudza Uma Rudraraju & George Wells Greg Foster & Presented By…Supervised By…
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Introduction to PHP Advanced Database System Lab no.1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically generated web pages.
WEB DEVELOPMENT WITH PHP/MYSQL. WEB DEVELOPMENT COURSE HAS DIFFERENT NAME IN DIFFERENT INSITUTES, THIS IS A CORE COURSE FOR BS/MS STUDENTS. THIS IS ALSO.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
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.
UNIT-3 1.Web server software and Tools 1IT2031 UNIT-3.
Chapter 1 Introduction to Ecommerce What is E-Commerce? Microsoft Technologies for E- Commerce. What is an ASP Page. Objectives :
Introduction and Principles Web Server Scripting.
PHP Introduction PHP is a server-side scripting language.
WEB SERVER SOFTWARE FEATURE SETS
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Database Connectivity and Server-Side Scripting Chapter 12.
Java Servlets and Java Server Pages
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
JSP / Servlets and Beans
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Active Server Pages v.s. Java Server Pages Presenters: Lan Guo Qunying Fan Pei-Xun Wu Date:
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
Web-based Software Development - An introduction
Introduction to JSP Liu Haibin 12/09/2018.
PHP / MySQL Introduction
MSIS 655 Advanced Business Applications Programming
Java Server Pages (JSP)
Presentation transcript:

Servlets, JSPs and MySQL Presented by: Gian Alvarez Vicente Rivera

Agenda Overview of JSP JSP Architecture Providers of JSP Server Engines Who is Using JSP Compare JSP to Other Tools Pros and Cons of JSP JAVA Beans Examples Mini-Workshop Links/Questions Overview of JSP JSP Architecture Providers of JSP Server Engines Who is Using JSP Compare JSP to Other Tools Pros and Cons of JSP JAVA Beans Examples Mini-Workshop Links/Questions

JSP Overview - History Earlier dynamic web pages were developed with CGI –Web Applications eventually outgrew CGI because of the following: Datasets became large Increased traffic on sites Trouble maintaining state and session information Performance bottlenecks Can involve proprietary APIs Earlier dynamic web pages were developed with CGI –Web Applications eventually outgrew CGI because of the following: Datasets became large Increased traffic on sites Trouble maintaining state and session information Performance bottlenecks Can involve proprietary APIs

JSP Overview History (Cont’d) Microsoft Saves the Day? –Active Server Pages (ASP) are released that are: Pre-coded server extensions Easily integrates with ODBC –Gives developers simple server-side scripting to access the server –Upside for Microsoft, downside for us, ASP is limited to only Microsoft platforms Microsoft Saves the Day? –Active Server Pages (ASP) are released that are: Pre-coded server extensions Easily integrates with ODBC –Gives developers simple server-side scripting to access the server –Upside for Microsoft, downside for us, ASP is limited to only Microsoft platforms

JSP Overview - Software With a foundation in Java, JSP –Threads incoming requests –Supports the definition of tags that abstract functionality within a page in a library –Interacts with a wide array of databases –Serves dynamic content in a persistent and efficient manner Initially the server automatically separates HTML and JSP code, compiles the JSP code, and starts the servlet, from then on the servlets are stored in the web server’s memory in Java byte code –Extends the same portability, large class library, object-oriented code methodology, and robust security measures that have made Java a top choice With a foundation in Java, JSP –Threads incoming requests –Supports the definition of tags that abstract functionality within a page in a library –Interacts with a wide array of databases –Serves dynamic content in a persistent and efficient manner Initially the server automatically separates HTML and JSP code, compiles the JSP code, and starts the servlet, from then on the servlets are stored in the web server’s memory in Java byte code –Extends the same portability, large class library, object-oriented code methodology, and robust security measures that have made Java a top choice

Architecture

Who is using JSP? altavista.com – mhttp:// m half.com – E-Loan – iWon – Jguru – State of Maine – altavista.com – mhttp:// m half.com – E-Loan – iWon – Jguru – State of Maine – petsmart.com – mhttp:// m ya.com – BizRate – salesforce.com – omhttp:// om listen.com – State of Utah –

Comparison of JSP to… PHPCold FusionASPJSP CostFree $0 (Express version)- $5000 (Enterprise version) Free with Windows NT, cost for 3rd- party software Free Language In Page PHPCFMLVBScript, JScriptJava OS Platform Unix (Linux), Windows, MacOS, OS/2 Windows NT, Solaris, Linux Windows 9x, NT, other platforms requires third-party ASP porting products UNIX, Microsoft Windows, Mac OS, Linux Supported Web server iPlanet/Netscape Enterprise Server (NSAPI), MS Internet Information Server (IIS), Apache, Zeus, fhttpd, etc. (ver 4) IIS, Netscape Enterprise Server, Apache, Website Server (WSAPI), CGI IIS, Personal Web Server (PWS), other servers with third-party products (ChiliSoft!) Any Web server, including Apache, Netscape and IIS

Comparison of JSP to … (Cont’d) PHPColdFusionASPJSP Supported Database MySQL, mSQL, ODBC, Oracle, Informix, Sybase, etc. ODBC, OLE DB, DB2, Oracle, Informix, Sybase, etc. any ODBC- compliant database any ODBC- and JDBC-compliant database PortabilityFair (DB portability)GoodFairGood ScalabilityFairGood Component Support COM, Java classes (version 4) COM, CORBA, JavaBeans COM components JavaBeans, Enterprise JavaBeans Learning curveHigh (C, Perl)Low Medium (VBScript, JScript) High (Java)

Pros and Cons Pros –Efficient –Convenient Server engines typically have built-in infrastructures to handle parsing/decoding HTML form data, reading/setting HTTP headers, session tracking –Powerful Java behind the scene –Portable Write once, run anywhere –Inexpensive Various free or inexpensive engines available Pros –Efficient –Convenient Server engines typically have built-in infrastructures to handle parsing/decoding HTML form data, reading/setting HTTP headers, session tracking –Powerful Java behind the scene –Portable Write once, run anywhere –Inexpensive Various free or inexpensive engines available Cons –Need for a Server Engine Another engine to maintain –Un-acceptably by the client machine Virtual hosting of unrelated sites on a single machine can cause problems (choose your server engine wisely) –High Learning Curve Steeper learning curve than Cold Fusion

JSP and JavaBeans A JavaBean is a Java Class file that creates an object Defines how to create an Object, retrieve and set properties of the Object A JavaBean is a Java Class file that creates an object Defines how to create an Object, retrieve and set properties of the Object JSP JavaBeans Get Bean Value Set Bean Value

JSP and JavaBeans (Cont’d) JavaBeans can store data JavaBeans can perform complex calculations JavaBeans can hold business logic JavaBeans can handle Database Connectivity and store data retrieved from them JavaBeans facilitate –Reuse of code –Debugging process –Separating code from content JavaBeans can store data JavaBeans can perform complex calculations JavaBeans can hold business logic JavaBeans can handle Database Connectivity and store data retrieved from them JavaBeans facilitate –Reuse of code –Debugging process –Separating code from content

Examples ‘Hello World’ <!-JSP name: Hello.JSP Written by Chris --  Hello1.jsp Hello World The browser displays: ‘Hello World’ <!-JSP name: Hello.JSP Written by Chris --  Hello1.jsp Hello World The browser displays: ‘Hello World’

Examples ‘Rectangle Problem’ <!--- JSP name: area problem –  The area of the rectangle is The browser displays: 'The area of the rectangle is 28'. Note: Java and JSP are very case sensitive <!--- JSP name: area problem –  The area of the rectangle is The browser displays: 'The area of the rectangle is 28'. Note: Java and JSP are very case sensitive

Examples ‘Random Numbers’ Your Personal Random Numbers Here are your personal random numbers: <% java.util.Random r = new java.util.Random( ); for (int i=0; i<5; i++) { out.println(" "); out.println(r.nextInt( )); } %> Your Personal Random Numbers Here are your personal random numbers: <% java.util.Random r = new java.util.Random( ); for (int i=0; i<5; i++) { out.println(" "); out.println(r.nextInt( )); } %>

Examples ‘Random Numbers’ (Cont’d) The browser displays: Your Personal Random Numbers Here are your personal random numbers: The browser displays: Your Personal Random Numbers Here are your personal random numbers:

Mini - Workshop

ER-Diagram

Some Good Links Jguru.com – - main page has nice search of the FAQ, Forums, etc… – their main JSP FAQ pagehttp:// Jspinsider.com – - articles, tutorials, linkshttp:// – - on-line course/tutorial on JSPhttp:// Other Tutorials – basis of the book Core Servlets and JavaServer Pages (Sun Microsystems Press and Prentice Hall, May 2000) by Marty Hallhttp:// Sun’s Java Site – JSP –Forum active –archive- Sun’s Java Site – APIs –Java Std Ed essential javahttp://java.sun.com/j2se/1.3/docs/api/index.html –Java Enterprise Edition enterprise-class server side applications Jguru.com – - main page has nice search of the FAQ, Forums, etc… – their main JSP FAQ pagehttp:// Jspinsider.com – - articles, tutorials, linkshttp:// – - on-line course/tutorial on JSPhttp:// Other Tutorials – basis of the book Core Servlets and JavaServer Pages (Sun Microsystems Press and Prentice Hall, May 2000) by Marty Hallhttp:// Sun’s Java Site – JSP –Forum active –archive- Sun’s Java Site – APIs –Java Std Ed essential javahttp://java.sun.com/j2se/1.3/docs/api/index.html –Java Enterprise Edition enterprise-class server side applications

Questions ? ?