Introduction to Web Applications using JSP, Servlets, Jstl and JQuery Workshop for ICOM5016



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

Web-JISIS Reference Manual

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Crystal Reports for Eclipse

Java Servlet and JSP Programming. Structure and Deployment China Jiliang University

BIRT Application and BIRT Report Deployment Functional Specification

Design Approaches of Web Application with Efficient Performance in JAVA

JHU/EP Server Originals of Slides and Source Code for Examples:

Web Applications. For live Java training, please see training courses at

CrownPeak Java Web Hosting. Version 0.20

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Web Applications. Originals of Slides and Source Code for Examples:

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

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

Solr Bridge Search Installation Guide

Security Testing of Java web applications Using Static Bytecode Analysis of Deployed Applications

Building Web Applications, Servlets, JSP and JDBC

1 Building, Deploying and Testing DPES application

CREATE A CUSTOM THEME WEBSPHERE PORTAL

Web-JISIS 10 March 2016 Reference Manual

Mastering Tomcat Development

Web Application Architecture (based J2EE 1.4 Tutorial)

Virtual Machine (VM) For Hadoop Training

Server Setup and Configuration

Preface. Motivation for this Book

Java Web Services Developer Pack. Copyright 2003 David A. Wilson. All rights reserved.

Glassfish, JAVA EE, Servlets, JSP, EJB

Building Web Services with Apache Axis2

Web Container Components Servlet JSP Tag Libraries

& JSP Technology Originals of Slides and Source Code for Examples:

Crystal Reports for Borland JBuilder

Apache Tomcat ISAPI Redirector and Canto Cumulus WPP

2011 Marty Hall An Overview of Servlet & JSP Technology Customized Java EE Training:

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

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

Configuring the LCDS Load Test Tool

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Course Name: Course in JSP Course Code: P5

Simplify Your Web App Development Using the Spring MVC Framework

Complete Java Web Development

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

CORISECIO. Quick Installation Guide Open XML Gateway

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

DIPLOMA IN WEBDEVELOPMENT

Java with Eclipse: Setup & Getting Started

Web Development on the SOEN 6011 Server

Outline. CS 112 Introduction to Programming. Recap: HTML/CSS/Javascript. Admin. Outline

An Overview of Servlet & JSP Technology

Installing and Running Tomcat 5.5

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

What s New in IBM Web Experience Factory IBM Corporation

Debugging Ajax Pages: Firebug

Portals, Portlets & Liferay Platform

Install guide for Websphere 7.0

Pentesting Web Frameworks (preview of next year's SEC642 update)

Getting Started with Web Applications

Development. with NetBeans 5.0. A Quick Start in Basic Web and Struts Applications. Geertjan Wielenga

CS506 Web Design and Development Solved Online Quiz No. 01

Data Visualization in Ext Js 3.4

Android on Intel Course App Development - Advanced

Course Number: IAC-SOFT-WDAD Web Design and Application Development

PingFederate. Identity Menu Builder. User Guide. Version 1.0

JBoss SOAP Web Services User Guide. Version: M5

Web Cloud Architecture

What servlets and JSP are all about

AJAX Toolkit Framework

Japan Communication India Skill Development Center

Tutorial: setting up a web application

On-campus Tomcat Deployment Client

Adobe ColdFusion 11 Enterprise Edition

Creating Java EE Applications and Servlets with IntelliJ IDEA

OPENRULES. Release TUTORIAL Cloud Application Development

Volume 1: Core Technologies Marty Hall Larry Brown. An Overview of Servlet & JSP Technology

CafePilot has 3 components: the Client, Server and Service Request Monitor (or SRM for short).

SSO Plugin. Integration for BMC MyIT and SmartIT. J System Solutions. Version 4.0

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

Jaspersoft APIs. Integrating BI with your Applications. Community and Professional Editions

SDK Code Examples Version 2.4.2

How to Easily Integrate BIRT Reports into your Web Application

Maven2 Reference. Invoking Maven General Syntax: Prints help debugging output, very useful to diagnose. Creating a new Project (jar) Example:

Linstantiation of applications. Docker accelerate

Java Web Programming with Eclipse

SSC - Web applications and development Introduction and Java Servlet (II)

Web Application Developer s Guide

Eclipse Web Tools Platform. Naci Dai (Eteration), WTP JST Lead

Nicholas S. Williams. wrox. A Wiley Brand

1 How to install CQ5 with an Application Server

How to make a good Software Requirement Specification(SRS)

2. Follow the installation directions and install the server on ccc

Copyright 2014, SafeNet, Inc. All rights reserved.

Esigate Module Documentation

Apache Tomcat 4.0 Sample Modified 06/09/04

Transcription:

Introduction to Web Applications using JSP, Servlets, Jstl and JQuery Workshop for ICOM5016 University of Puerto Rico, Mayaguez Campus October 24, 2010

Outline 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

Outline 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

Browse it here mediadb

Outline Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery W eb Server + Servlet Container (Tomcat) Download Tomcat 6.0 from Apache-Tomcat-Project Unzip the file into your directory Tomcat-Dir

Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery Jstl (JSP Standard Tag Library) and JQuery Jstl is a collection of tags that implements programming structures. Download Jstl from here JQuery is a Ajax Library. Download from here

Outline 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

Eclipse Preference Servers Runtime Environments Add

Set the tomcat directory

Outline 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

This web application implements a very simple arithmetic calculator. The user can sends two numbers and an operation (+,-,/,*) and receives the results. Download it from here Look it at here: web-calc

The Web app has the following files: Calculator.java index.jsp CalculatorServlet.java calculator-result.jsp

index.jsp

CalculatorServlet.java

calculator-result.jsp

Considering the MVC pattern, This web app has three components: Models: Courses.java, Professor.java, etc (POJOs) Views: index.jsp, courseviewer.jsp, etc Controller: Servlets + CourseMgr.java, ProfessorMgr, etc It uses embedded java code It uses JSTL and JQuery Download it from here Look it at here: web-university

Installing JSTL Copy the jstl jar to: Web-name WebContent WEB-INF lib

Installing JSTL Add the jars to the classpath: Web-project Properties Java Build Path Libraries Add Jars

Embedded Java Code in JSP Pages We have access to these objects: request, response, session We can use Java and HTML. Scriptlets are a Good Example of a Bad Solution.

Embedded Java Code in JSP Pages courseviewer.jsp

JSTL: JSP Standard Tag Library We will only use the core library (http://java.sun.com/jsp/jstl/core). Here a good tutorial Do not forget to add the jstl directive in the JSP pages:

JSTL: JSP Standard Tag Library professorviewer.jsp

JQuery Here studentviewer.jsp using JQuery JQuery allows us to send background requests to the Web Server. JQuery allows us to receive asynchronous response from the Web Server. It also manipulates the DOM.

JQuery You must include the jquery.js file in your pages.

JQuery In the example, we want to add a link that retrieves the student s details and shows them in a div tag

JQuery js/jsstudent.js

Outline 1 2 Your Attention Web Server + Servlet Container (Tomcat) Jstl (JSP Standard Tag Library) and JQuery 3 4 5

Web-project Export WAR file Uncheck the optimize option Check Export source file

Tomcat installation under ubuntu: sudo apt-get install tomcat6 Deploying a war file to Tomcat: Copy the war file into /full-path-tomcat/webapps/ sudo cp my-web-app.war /var/lib/tomcat6/webapps/ Browse your web app here: http://your-ip:8080/my-web-app/index.jsp