28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.

Slides:



Advertisements
Similar presentations
Lecture 11 Server Side Interaction
Advertisements

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
 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.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
Languages for Dynamic Web Documents
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
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.
04/18/20011 JavaServer Page Presented by: Hongmei Yu 04/18/2001.
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,
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.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Q: According to Intel, the Pentium conforms to the IEEE standards 754 and 854 for floating point arithmetic. If you fly in aircraft designed using a Pentium,
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
JavaServer Pages TM Introduce by
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
UNIT-V The MVC architecture and Struts Framework.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
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.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Applets & Servlets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
CIS 285 ROBINSON WINTER 2005 CIS 285 Web Application Development with Java CIS 285 Sinclair Community College Instructor: Mary Robinson.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
JSP Java Server Pages Softsmith Infotech.
Introduction to JavaServer Pages (JSP) Slides from Dr. Mark Llewellyn.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
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.
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,
Fall CIS 764 Database Systems Design L8. Web ….
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.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Introduction to JavaServer Pages February 23, 2000 Chris Hagner Noblestar Systems Corporation
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)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
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.
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.
STRUCTURE OF JSP PRESENTED BY: SIDDHARTHA SINGH ( ) SOMYA SHRIVASTAV ( ) SONAM JINDAL ( )
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.
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.
Apache Struts Technology A MVC Framework for Java Web Applications.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
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.
Java Server Pages Can web pages be created specially for each user?
Introduction to JSP Liu Haibin 12/09/2018.
MSIS 655 Advanced Business Applications Programming
Java Servlet Ziad A. Al-Sharif.
Java Server Pages (JSP)
CS122B: Projects in Databases and Web Applications Winter 2019
Presentation transcript:

28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen

28/1/2001 Seminar in Databases in the Internet Environment What is JSP? Java based technology that simplifies the developing of dynamic web sites JSP pages are HTML pages with embedded code that allows to access data from Java code running on the server JSP provides separation of HTML presentation logic from the application logic.

28/1/2001 Seminar in Databases in the Internet Environment JSP Flow

28/1/2001 Seminar in Databases in the Internet Environment Comparison with existing technologies: CGI CGI(Common Gateway Interface) programs (typically written in C or Perl) interact with the user by reading the user's input, HTML forms, and returning custom HTML pages. Problems: –For each user request the CGI script must be loaded, run, and unloaded. –Designed to handle only a single request: needed additional session support (to remember a user’s state between requests for a example). JSP vs. CGI: – JSP can maintain state on the server between requests –Spawns a new thread for each request –Does not have to be loaded each time, once it has been initialized –Runs in a ready-loaded JVM as an extension to the web server.

28/1/2001 Seminar in Databases in the Internet Environment Comparison with existing technologies : ASP ASP (Active Server Pages) from Microsoft is the main competing technology for JSP. JSP & ASP are similar in the way they support the creation of dynamic web pages, using HTML templates, scripting code and components for business logic. JSPASP Platforms All major web platformsMicrosoft only Base Language JavaJscript or VBScript Components JSP Tags, JavaBeans, or Enterprise JavaBeans COM/DCOM Code Interpretation OnceEach Instance

28/1/2001 Seminar in Databases in the Internet Environment Comparison with existing technologies : ASP (continue) ASP used on Microsoft IIS pr PWS web servers. Two third parties, Chili!Soft and Halcyonsoft sell software that allows ASPs to be uses with other platforms: the main problem is in porting the COM components to the new platform.Chili!SoftHalcyonsoft JSPs score over ASP: –JSPs are interprted only once, to Java byte-code, and re- interpreted only when the file is modified –JSPs run on all the main web servers –JSPs provide better facilities for separation of page code and template data by means of JavaBeans, Enterprise JavaBeans and custom tag libraries. For more information see: Sun JSP vs. ASP pageSun JSP vs. ASP page

28/1/2001 Seminar in Databases in the Internet Environment Comparison with existing technologies: Servlets Servlets are standard, server-side Java applications that extend the capabilities of a Web server. Java Servlets programming model is similar to CGI scripts. Servlets run inside a single process associated with a web server. Instead of creating a process for each request (as CGI) JVM cerates a Java thread to handle each servlet request. JVM persists beyond the life of a single request (so requests can share data and resources). Essence: Java code that outputs the HTML (out.println approach). All benefits of the core Java platform: OOP model, cross- platform, memory management, rich collections of Java API’s., etc. Problems: –All document contents, both static and dynamic, reside in program source code.

28/1/2001 Seminar in Databases in the Internet Environment JSP Technology JSP technology provides a way to combine the worlds of HTML and Java servlet programming. JSP specs are built on the Java Servlet API. JSP supports two different styles for adding dynamic content to web pages: –JSP pages can embed actual programming code (typically Java) –JSP supports a set of HTML-like tags that interact with Java objects on the server (without the need for raw Java code to appear in the page).

28/1/2001 Seminar in Databases in the Internet Environment JSP Example: Hello World 1. 2.

28/1/2001 Seminar in Databases in the Internet Environment SimpleJSP.jsp

28/1/2001 Seminar in Databases in the Internet Environment SimpleJSP.jsp - the Bean edition JSP includes tags for interacting with JavaBeans. JavaBean is a simply Java class that follow JavaBeans specs: rules for defining a Bean’s ctor & methods for accessing and setting their properties.

28/1/2001 Seminar in Databases in the Internet Environment SimpleJSP.jsp - the Bean edition

28/1/2001 Seminar in Databases in the Internet Environment JSP Example: Hello World In both cases the http request is: The response from JSP container would be:

28/1/2001 Seminar in Databases in the Internet Environment How it is work? Client request for a page ending with ".jsp“. Web Server fires up the JSP engine. The JSP engine checks to see if the JSP file is new or changed. The JSP engine takes the page and converts it into a Java servlet (by JSP parser) The JSP engine compiles the servlet (by standard Java compiler). Servlet Engine executes the new Java servlet using the standard API. Servlet’s output is transferred by Web Server as a http response.

28/1/2001 Seminar in Databases in the Internet Environment JSP Pages content standard HTML tags & scripts (JavaScript/VBscript) new tags for scripting in the Java language. –Expressions: or XML variant: expression For Example: –Scriptlets: or XML variant: scriptlet –Declarations: or XML variant: declaration(s) For ExampleExample

28/1/2001 Seminar in Databases in the Internet Environment JSP Pages content – cont. JSP directives – is a set of tags for providing the JSP container with page specific instructions for how the document should be processed. Directives affect global properties of the JSP page. Comments –for adding documentation –Comments that will be in the output: –JSP comments –Scripting language comments:

28/1/2001 Seminar in Databases in the Internet Environment JSP Pages content – cont. Actions and implicit objects JSP implicit objects: page out config session request application response pageContext exception

28/1/2001 Seminar in Databases in the Internet Environment JSP Pages content – cont. Bean’s tags allows JSP pages to call reusable components called JavaBeans components. The tag syntax is: properties tags tag syntax is:

28/1/2001 Seminar in Databases in the Internet Environment JSP benefits Java-based technology Vendor-neutral Full access to underlying Java platform Performance Reusable components (JavaBeans) Separating presentation and implementation

28/1/2001 Seminar in Databases in the Internet Environment Resources Sun JSP 1.1 Specs and description Server Side Java Resource Site IBM education courses JSP resource index JSP insider

28/1/2001 Seminar in Databases in the Internet Environment The end

28/1/2001 Seminar in Databases in the Internet Environment Scriptlet Example