© copyright Janson Industries 2011

Slides:



Advertisements
Similar presentations
Java Servlets Java Server Pages (JSP)
Advertisements

 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
Java Server Pages by Jon Pearce. JSP Documents JSP docs are XHTML Documents containing: –Fixed-Template Data: FTD HTML Components XML markup –JSP Components:
June 1, 2000 Object Oriented Programming in Java (95-707) Advanced Topics 1 Lecture 10 Object Oriented Programming in Java Advanced Topics Servlets.
Servlets. A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password: In Netbeans you can graphically create.
Integrating Servlets and JavaServer Pages Vijayan Sugumaran School of Business Administration Oakland University Parts of this presentation provided by.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
Chapter 91© copyright Janson Industries 2011 Java Design Concepts ■ JSP’s ■ MVC MVC ■ Beans Beans ■ JSP Tags JSP Tags.
Chapter 111© copyright Janson Industries 2011 Custom Tags ▮ Tag Handlers ▮ XML ▮ Tag Libraries ▮ Web Deployment Descriptor.
ITEC 4020A:Internet Client Server Systems Professor: Marin Litoiu Lectures 3&4: Internet Protocols © Marin Litoiu, York University, Canada This lecture.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Li Tak Sing COMPS311F. Static attributes in Servlets Since Servlets are also Java classes, you can also use static attributes to store values that can.
® IBM Software Group © 2007 IBM Corporation JSP Custom Tags
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
CS 160: Software Engineering September 3 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CSC 2720 Building Web Applications Frameworks for Building Web Applications.
CS-4220 Dr. Mark L. Hornick 1 Java Server Pages. HTML/JSPs are intended to be used as the views in an MVC- based web application Model – represents an.
 Obtaining a RequestDispatcher Forwarding requests from servlets to dynamic resources  Forwarding requests from servlets to static resources  Using.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Advanced Java Session 6 New York University School of Continuing and Professional Studies.
Configuration Web Server Tomcat - Install JDK Install Tom cat Configure Tom cat for running Servlet C:\Program Files\Apache Software Foundation\Tomcat.
Introduction To HTML Dr. Magdi AMER. HTML elements.
ClaRA web services V. Gyurjyan Clas12 Software Meeting
 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,
HTML Basic Structure. Page Title My First Heading My first paragraph.
Chapter 2 Java Struct 2. Content Basic MVC Architecture Struts 2 Overview Struts 2 - Architecture.
OOSD Using Java CBTS Framework. 11/2/04CBTS2 Servlet  A servlet is a Java program that can extends Web server’s functionality.  Servlets interact with.
File Upload / Download FORM SUBMIT A Controller Service Dao AJAX
Programming with Java Lecture 6 Elements of a Java Servlet
Introduction to Servlets
Introduction to Servlets
Principles of Software Development
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Java Servlets By: Tejashri Udavant..
Introduction to Web Services
Web Development & Design Foundations with HTML5 8th Edition
Servlets Hits Counter 20-Jul-18.
Session Tracking in Servlets
Quicken Support Phone Number More info :
Quicken Tech Support Phone Number. More info :
MLX Revenue Cycle Management - mlxbilling.com
V. Gyurjyan Clas12 Software Meeting
Mint Customer Support Phone Number
Mint Helpline Phone Number
Reinstallation or Repairing Software
Sessions.
Tony Johnson 8/12/97 WSC meeting
SERVLETS AND JDBC.
In Class Assg 4 - Solution
In Class Assg 3 - Solution
Jagdish Gangolly State University of New York at Albany
Servlets and JSP 20-Nov-18 servletsJSP.ppt.
Advanced Java programming in J2EE Chapter 1
Introduction There are several good reasons for taking CS142: Web Applications: You will learn a variety of interesting concepts. It may inspire you to.
In Class Assg 2 - solution
© copyright Janson Industries 2011
with a value of javascript:onclick=resizeWindow()
Start the Installation Manager by clicking:
Intro to Programming & Algorithm Design
HTML Basic Structure.
Introduction to Web Services
The Most Basic HTML Page
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Creating a Basic Web Page
Cookies and Sessions.
JSP In Class Assg 1 Do same thing using JSP tags instead of scripting tags Chapter 9 © copyright Janson Industries 2011.
Web Design & Development
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

© copyright Janson Industries 2011 In class assg 2 solution Create CustJSP: Access the Customer bean Display the customer info using bean tags Change Func2Servlet to create CustBean and redirect to CustJSP Chapter 9 © copyright Janson Industries 2011

© copyright Janson Industries 2011 Chapter 9 © copyright Janson Industries 2011

In Class Assg 2 - solution <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <html> <head> <title>CustJSP</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational® Application Developer for WebSphere® Software"> </head> <body>The customer name is: <jsp:getProperty name="CustBean" property="custName" /><br> The street is: <jsp:getProperty name="CustBean" property="shipToStreet" /><br> Chapter 9 © copyright Janson Industries 2011

In Class Assg 2 - solution The city is: <jsp:getProperty name="CustBean" property="shipToCity" /><br> The state is: <jsp:getProperty name="CustBean" property="shipToState" /><br> The zip is: <jsp:getProperty name="CustBean" property="shipToZip" /><br> The contact person is: <jsp:getProperty name="CustBean" property="contactPerson" /><br> The phone number is: <jsp:getProperty name="CustBean" property="contactPhone" /><br> </body> </html> Chapter 9 © copyright Janson Industries 2011

In Class Assg 2 - solution In Func2Servlet protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { co.setCustName(request.getParameter("CustName")); co.setShipToStreet(request.getParameter("Street")); co.setShipToCity(request.getParameter("City")); co.setShipToState(request.getParameter("State")); co.setShipToZip(request.getParameter("Zip")); co.setContactPerson(request.getParameter("ContactPerson")); co.setContactPhone(request.getParameter("PhoneNum")); HttpSession sess = request.getSession(); sess.setAttribute("CustBean", co); response.sendRedirect("CustJSP.jsp"); //CustServlet cs = new CustServlet(); //cs.doGet(request, response, co); } Chapter 9 © copyright Janson Industries 2011

© copyright Janson Industries 2011 Chapter 9 © copyright Janson Industries 2011

© copyright Janson Industries 2011 Chapter 9 © copyright Janson Industries 2011