Server-Side Web Development JSP. Today. Web Servers. Static HTML Directives. Actions Comments Tag Libraries Implicit Objects. Apache.



Similar documents
Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Apache Jakarta Tomcat

JSP Java Server Pages

Complete Java Web Development

Java Server Pages Tutorial

Building Web Applications, Servlets, JSP and JDBC

Services. Custom Tag Libraries. Today. Web Development. Role-Based. Development. Code Reuse. Tag Libraries Custom Tags. Tag Lifecycle.

Web Container Components Servlet JSP Tag Libraries

IT6503 WEB PROGRAMMING. Unit-I

Developing XML Solutions with JavaServer Pages Technology

Course Name: Course in JSP Course Code: P5

CSE 510 Web Data Engineering

Glassfish, JAVA EE, Servlets, JSP, EJB

SSC - Web development Model-View-Controller for Java web application development

Web Pages. Static Web Pages SHTML

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Agenda. Summary of Previous Session. Application Servers G Session 3 - Main Theme Page-Based Application Servers (Part II)

Web Application Architecture (based J2EE 1.4 Tutorial)

Preface. Motivation for this Book

Mastering Tomcat Development

DTS Web Developers Guide

Developing a J2EE Application. Web Auction. Gerald Mo

QuickSpecs. QuickSpecs. Description. HP OpenVMS Application Modernization and Integration Infrastructure Package,Version 2.3

In this chapter, we lay the foundation for all our further discussions. We start

Tutorial: Building a Web Application with Struts

NetBeans IDE Field Guide

Building Server-Side Web Language Processors

Drupal CMS for marketing sites

WIRIS quizzes web services Getting started with PHP and Java

JBoss Portlet Container. User Guide. Release 2.0

Japan Communication India Skill Development Center

CS506 Web Design and Development Solved Online Quiz No. 01

HttpUnit Laboratorio di Sistemi Software - A.A. 2003/2004

Modeling Web Applications Using Java And XML Related Technologies

CSC 551: Web Programming. Spring 2004

Modern Software Development Tools on OpenVMS

ACM Crossroads Student Magazine The ACM's First Electronic Publication

Architectural models of J2EE Web tier frameworks. Timo Westkämper

A Guide to Understanding Web Application Development Corey Benson, SAS Institute, Inc., Cary, NC Robert Girardin, SAS Institute, Inc.

Japan Communication India Skill Development Center

BIRT Application and BIRT Report Deployment Functional Specification

Hudson Continous Integration Server. Stefan Saasen,

Tomcat 5 New Features

Portals, Portlets & Liferay Platform

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports Server 6i

Crawl Proxy Installation and Configuration Guide

Web and e-business Technologies

zen Platform technical white paper

A Comparison of Software Architectures for E-Business Applications

FileMaker Server 10 Help

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Applets, RMI, JDBC Exam Review

JMETER - MONITOR TEST PLAN

JW Player Quick Start Guide

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

FileMaker Server 9. Custom Web Publishing with PHP

OVERVIEW HIGHLIGHTS. Exsys Corvid Datasheet 1

What Is the Java TM 2 Platform, Enterprise Edition?

Design Approaches of Web Application with Efficient Performance in JAVA

S3 Monitor Design and Implementation Plans

Terms and Definitions for CMS Administrators, Architects, and Developers

Controlling Web Application Behavior

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

NetBeans IDE Field Guide

Enterprise Application Development In Java with AJAX and ORM

Oracle9i Application Server: Options for Running Active Server Pages. An Oracle White Paper July 2001

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Database Application Design and Development. What You Should Know by Now

IUCLID 5 Guidance and Support

Creating Custom Web Pages for cagrid Services

BHARATHIAR UNIVERSITY COIMBATORE SCHOOL OF DISTANCE EDUCATION

OVERVIEW OF JSP TECHNOLOGY

Oracle WebLogic Server

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

Virtual Credit Card Processing System

ServletExec TM 5.0 User Guide

mod_tcl TCL inside the Apache web server

CrownPeak Playbook CrownPeak Hosting with PHP

Japan Communication India Skill Development Center

Firewall Builder Architecture Overview

10CS73:Web Programming

FileMaker Server 13. Custom Web Publishing with PHP

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Features of The Grinder 3

Abstract. 1. Introduction

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

Accessing Data with ADOBE FLEX 4.6

CrownPeak Java Web Hosting. Version 0.20

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Tableau Server Trusted Authentication

The presentation explains how to create and access the web services using the user interface. WebServices.ppt. Page 1 of 14

Net-WMS FP Net-WMS SPECIFIC TARGETED RESEARCH OR INNOVATION PROJECT. Networked Businesses. D.8.1 Networked architecture J2EE compliant

Oracle WebLogic Server

HOW TO CONFIGURE PASS-THRU PROXY FOR ORACLE APPLICATIONS

Building a Database-Driven Web Application With FileMaker

FileMaker Server 15. Custom Web Publishing Guide

ICE Trade Vault. Public User & Technology Guide June 6, 2014

Introduction to Sun ONE Application Server 7

Transcription:

1 Pages () Lecture #4 2007 Pages () 2 Pages () 3 Pages () Serves resources via HTTP Can be anything that serves data via HTTP Usually a dedicated machine running web server software Can contain modules that processes requests Pages () 1 A Connection is established 2 A HTTP request is received 3 The (logical) path in the request is translated 4 The requested resource is identified (via the path) 5 A server module handling that resource is invoked 6 The module processes the request and generates a reply 7 A mime-type is provided and a HTTP response is created 8 The HTTP response is sent (possibly in increments) Pages () Pages () 1 A page is requested 2 Server checks if a Java Servlet for the page exists 3 If no Servlet is found (or newer is detected), the is translated to Java (a Servlet class is created) 4 The Java Servlet is compiled 5 The Java Servlet is invoked and processes the request Pages () HTML with extra XML-tags (Scripted server-side) Java for the web A way to provide dynamic content in web pages XML-tags act as front-ends for Java classes May include other pages dynamically s are compiled into Java Servlets code is never visible to clients Generates response (HTML) dynamically Model-View-Controller pattern recommended

Syntax Script Tags Pages () may contain Pages () <%@... %> Declarations <%!... %> Scriptlets <%... %> Expressions <%=... %> <%--... --%> Pages () All HTML is treated by as static text Pages () <%@... %> HTML may be mixed with in any way All non- tags are treated as HTML Types of directives Page Include (aka Custom Tags) Page Page Directive Attributes Pages () <%@ page attribute="..." %> Instructs the engine how to process the Attributes determine directive content Pages () language - selects scripting language (Java) extends - base class for generated Servlet import - Java class / package import session - enable session tracking (default: true) buffer - set output buffer size autoflush - enable auto flushing of output buffer isthreadsafe - thread safe marker info - page information (author, version, copyright etc) errorpage - set default error page iserrorpage - enable exception tracking on page contenttype - set response mime type

Include Directive Pages () <%@ include file="page.jsp" %> Pages () <%@ taglib uri="taglib.tld" prefix="prefix" %> Includes another page at translation time Included page becomes part of Servlet Generates error if page not found Loads a tag library Tags are usable via the specified tag prefix The version of language extension Directive Examples Pages () <%@ page import="examples.*, examples.tags.*" %> <%@ taglib uri="/web-inf/examples-taglib.tld" prefix="examples" %> <%@ include file="/includes/head.jsp" %>... Pages () Declarations <%!... %> Scriptlets <%... %> <examples:validateparameters parameters="name,age"/>... Expressions <%=... %> <%@ include file="/includes/foot.jsp" %> Declarations Declaration examples Pages () Content placed in Servlet body (members) Used to declare members and methods Does not produce HTML output Declared content is later used by Scriptlets or expressions Lines must be terminated with a semicolon Pages () <%! public int getsum (int x, int y) { return x + y; } %> <jsp:declaration> public int getsum (int x, int y) { return x + y; } </jsp:declaration>

Scriplets Scriptlet examples Pages () Content placed in Servlet jspservice() method (local variables and in-line code) Used to embed Java code directly in the page May produce HTML output (via out.println()) Lines must be terminated with a semicolon Pages () <% int x = 1; int y = 2; int sum = x + y; %> <jsp:scriptlet> int x = 1; int y = 2; int sum = x + y; </jsp:scriptlet> Expressions Expression examples Pages () Content output directly to HTML Used as an alias for out.println() Code must evaluate to an expression Lines must not be terminated with a semicolon Pages () 1 + 2 = <%= 1 + 2 %> 1 + 2 = <jsp:expression> 1 + 2 </jsp:expression> Include Action Pages () include - include another page forward - forward request to another resource param - specify parameters when calling or forwarding Pages () <jsp:include page="page.jsp"/> plug-in - generates browser-specific code for applets fallback - content if browser does not support applets getproperty - get a property from a JavaBean setproperty - set a property on a JavaBean usebean - use a JavaBean Includes another page at request time Generates a request to included page Servlet Ignored if page not found Usually used to call declared methods Control is returned

Forward Action Param Action Pages () <jsp:forward page="page.jsp"/> Forwards request to another resource Pages () <jsp:forward page="page.jsp"> <jsp:param name="name" value="value"/> </jsp:forward> Control is not returned Used to specify parameters when including / forwarding HTML Pages () <!-- HTML comment --> Pages () <%-- comment --%> Evaluated by server (as HTML) Part of the server response / web page Visible in page source from web browser Not evaluated by server Not part of the server response / web page Not visible in page source from web browser Pages () Java classes Implements the Tag Extension API interfaces Usable as tags in s Java class coupled to a tag using a XML-descriptor Tags can control processing Pages () request - HTTP request response - HTTP response out - response stream session - web application session pagecontext - page context data application - Servlet context data config - Servlet configuration data page - Servlet object exception - exception data

HTTP Server Pages () Software Foundation Non-profit organization developing open-source software http://www.apache.org/ Pages () A (patchy) web server Arrived early and helped shape the web Runs 58% of the worlds web sites (March 2007) Serves HTTP and HTTPS requests Runs CGI-scripts for dynamic content Can host modules for PHP,, ASP etc Tomcat Axis2 Pages () Servlet & container with built-in web server Can run standalone or as a module in Serves HTTP and HTTPS requests s may have been forwarded from HTTPD Server Contains configuration and management tools Pages () Service framework Refactorization of Axis Contains tools for generating language bindings and interfaces Includes a Service hosting environment Can run as a module / web application in Tomcat Ant Derby Pages () A build tool for software development Make for Java Used to automate build, deployment and clean-up Pages () A Pure-Java relational database management system Can be embedded into Java programs No configuration required No management clients provided Databases accessible through JDBC

Other Related Project Pages () Struts - web application framework Jakarta - server-side Java projects Xalan - XSLT processor Xerces - A validating XML parser Pages () Using /Servlets Data storage, validation & access...