JSP -exercises- Alessandro Marchetto Fondazione Bruno Kessler-IRST, Centro per la Ricerca Scientifica e Tecnologica.

Slides:



Advertisements
Similar presentations
Michelle Johnston, Firebird Services Ltd
Advertisements

Servlet-JSP and HtmlFixture exercise and solution
1 Web Applications development and testing Alessandro Marchetto Fondazione Bruno Kessler-IRST,
Java Servlet -exercises- Alessandro Marchetto Fondazione Bruno Kessler-IRST, Centro per la Ricerca Scientifica e Tecnologica.
JSP and Servelets.
Java Server Pages (JSP)
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Chapter 51 Scripting With JSP Elements JavaServer Pages By Xue Bai.
Chapter 31 Basic Form-Processing Techniques JavaServer Pages By Xue Bai.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
Java Server Pages B.Ramamurthy. Java Server Pages Servlets are pure Java programs. They introduce dynamism into web pages by using programmatic content.
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,
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?
Contrast with JavaScript HTML Formsto invoke Java Server Pages Structure of Forms Query strings Java Server Pages Sent From Browser To Serverfor JSP.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development JSP Final Remarks 10 th March 2005 Bogdan L. Vrusias
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
ASHIMA KALRA.  INTRODUCTION TO JSP INTRODUCTION TO JSP  IMPLICIT OBJECTS IMPLICIT OBJECTS  COOKIES COOKIES.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
11. Java-Based Web: JSP, JSF. 2 Motto: Rule 1: Our client is always right Rule 2: If you think our client is wrong, see Rule 1. - Anonymous.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
JSP Java Server Pages Softsmith Infotech.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Comp2513 JavaBeans, EJB and J2EE Daniel L. Silver, Ph.D.
 Embeds Java code  In HTML tags  When used well  Simple way to generate dynamic web-pages  When misused (complex embedded Java)  Terribly messy.
Server-Side Scripting with Java Server Page, JSP ISYS 350.
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
JSP Fundamentals Elements of a JSP Using Beans with JSP Integrating Servlets and JSP.
Java Server Pages (JSP) Provide a cross-platform framework for creating dynamic web contents JSP Components: Static HTML/XML parts Special JSP Tags Snippets.
Jsp (Java Server Page) Is a server side program.
Java Server Pages An introduction to JSP. Containers and Components Several clients – one system.
CSCI 6962: Server-side Design and Programming Java Server Faces Scoping and Session Handling.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Chapter 11 Invoking Java Code with JSP Scripting Elements.
OOSSE Week 8 JSP models Format of lecture: Assignment context JSP models JSPs calling other JSPs i.e. breaking up work Parameter passing JSPs with Add.
JSP BASICS AND ARCHITECTURE. Goals of JSP Simplify Creation of dynamic pages. Separate Dynamic and Static content.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
STRUCTURE OF JSP PRESENTED BY: SIDDHARTHA SINGH ( ) SOMYA SHRIVASTAV ( ) SONAM JINDAL ( )
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
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.
How CGI and Java Servlets are Run By David Stein 14 November 2006.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
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.
JSP in Action. JSP Standard Actions forward, include, useBean, setProperty, getProperty, text, element, and plugin Additional actions param, params,
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
JSP / Servet (2) Bayu Priyambadha, S.Kom. MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
Lecture JAVA SERVLETS & JAVA SERVER PAGES François Major Université de Montréal
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
JSP java server pages.
Web Server Programming: CGI(Perl/Python)
Java Server Pages (JSP)
Java Server Pages B.Ramamurthy.
Struts BY: Tejashri Udavant..
Presentation transcript:

JSP -exercises- Alessandro Marchetto Fondazione Bruno Kessler-IRST, Centro per la Ricerca Scientifica e Tecnologica

JSP demo Write a JSP application composed of: 1.An HTML page with a form that requests a string to the user (e.g., the name of the user) 2.A JSP page: - it reads the string sent by the client html - it writes the string in a dynamically generated HTML page (that contains, e.g., Welcome + string) - it writes in the generated HTML page also the current date (using java.util.Date)

Write a servlet and jsp based application as follows: 1.Client - an HTML page with two Forms that contain two text fields (name and surname) and a submit button (that uses the GET method) - the first Form sends its data to a servlet - the other sends its data to a Jsp page 2.A Servlet - it reads name and surname sent by the client (via GET) - and it writes a string such as Welcome: name surname 3.A JSP - it reads name and surname sent by the client (via GET) - it stores name and surname in a JavaBean - it reads the data stored in the JavaBean - it writes the stored data in the output using a string such as Welcome: name surname 4.JavaBean - it defines a string and two methods to set/get the string Servlet, JSP and Form – Name application

Write a Jsp that uses a JavaBean as follows: JavaBean - it defines a string and two methods to get value of the string and to set it (via parameter) JSP - it uses the JavaBean - it uses the jsp:setProperty in order to set the string-field of the Bean with the value Hello Client! - it uses the jsp:getProperty in order to get the value of the string-field and write it on the output Java Bean -1