J2EE Overview Web Programming CSCI 4300. J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.

Slides:



Advertisements
Similar presentations
JSP and web applications
Advertisements

Apache Struts Technology
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
1 CS 483 Enterprise and Web Application Programming Week 6 Session Beans JSP Tutorial.
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,
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Apache Struts Technology A MVC Framework for Java Web Applications.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
ECE356 – Database Systems Lab 1 – Building a Web Project with NetBeans Tiuley Alguindigue Lab Instructor – University of Waterloo, E & CE Dept. Fall 2013.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Java Enterprise Edition Java Web Development Structure of a web project Introduction to Web Applications The first project Introduction to Java Web Development.
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 37 - JavaServer Pages (JSP): Bonus for Java Developers Outline 37.1 Introduction 37.2 JavaServer.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
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.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Introduction to Java Server Pages (JSPs) Robert Thornton.
Introduction to J2EE Architecture Portions by Kunal Mehta.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Java Server Pages A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format,
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
 Embeds Java code  In HTML tags  When used well  Simple way to generate dynamic web-pages  When misused (complex embedded Java)  Terribly messy.
Standalone Java Application vs. Java Web Application
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Struts J2EE web application framework “ Model 2 ” Model View Controller Controller Servlet Key features XML metadata Struts taglib Simplified form validation.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
Introduction to JavaServer Pages. 2 JSP and Servlet Limitations of servlet  It’s inaccessible to non-programmers JSP is a complement to servlet  focuses.
JSP Fundamentals Elements of a JSP Using Beans with JSP Integrating Servlets and JSP.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Java Server Pages (JSP)
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.
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
Java Enterprise Edition Programming Page 1 of 9Configuring Servlets Web Application Context Name  In multiple web applications, a “context name” is used.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
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 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
 2003 Prentice Hall, Inc. All rights reserved Deploying a Web Application ( may include.war )
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.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
JSP / Servlets and Beans
Apache Struts Technology A MVC Framework for Java Web Applications.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 9 Case Study.
Structure of a web application
Java Servlets By: Tejashri Udavant..
Developing the Tools Montreal 2004
Knowledge Byte In this section, you will learn about:
Distributed System Using Java 2 Enterprise Edition (J2EE)
CS320 Web and Internet Programming MVC Architecture
JavaServer Faces: The Fundamentals
Enterprise Java Beans.
Introduction to Java Servlets
Struts BY: Tejashri Udavant..
Presentation transcript:

J2EE Overview Web Programming CSCI 4300

J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is compiled into a servlet for deployment JavaBean: data holding class (part of Model in MVC)

J2EE Architecture Applets and special clients: downloaded, connect back to server Enterprise Java Beans: long-term, application- scope data storage and business logic

Web Application Layout

Mirroring packages with directories

Web Application Descriptor, web.xml Defines servlets and maps them to URL paths Declares the welcome file for the app Specifies pages or servlets to handle various errors Provides initialization parameters to servlets Provides links to external resources such as database connections

Web.xml prolog <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" app_2_3.dtd> app_2_3.dtd You can validate your web.xml using the W3C validator service (recommended1) When you change your web.xml, you must ask Chris or me to reload your web-app

Web.xml root element … web application contents. Can contain: –Servlet definitions –Servlet paths –Parameters –Etc, etc.

Servlet element GonzoServlet cs4300.Gonzo Or GonzoServlet gonzo.jsp

Servlet-mapping element GonzoServlet /gonzo If the web application root is GonzoServlet is accessed at

Welcome page index.jsp Index.jsp is the file served at the URL

Error page elements 404 notFound.jsp org.xml.sax.SaxParseException parseError.jsp

Basic JSP page Declarations Java expressions Scriptlets (chunks of Java code) Try to minimize the mixing of HTML with Java (violates Model 2 architecture)

Declaration, scriptlet, and expression

Equivalent HTML from previous 1 Michael Adams 2 Dan Everett 1 Hunter Thompson But note that we try to avoid such mixing of Java and HTML!

Model 2 Architecture (MVC)

Helper Object Scopes

JavaBean Helper class that holds information Separates Java code from HTML Implements Model component of MVC architecture Useful for holding session data

JSP Address Book Interface

JavaBean Example Store functionality: user enters name - pair for storage in bean Fetch functionality: user enters name, bean replies with

JSP-Bean communication Make element names in JSP correspond to variable names in Bean Write Bean class with setX() and getX() setter and getter methods sends inputs to Bean gets values from Bean

Acknowledgements J2EE architecture diagrams: Sun J2EE tutorial, Object scopes: jGuru Java Server Pages fundamentals,