Introduction Servlets and JSP Celsina Bignoli

Slides:



Advertisements
Similar presentations
Java Server Pages (JSP)
Advertisements

Java Servlet & JSP © copyright 2005 SNU OOPSLA Lab.
J.Sant Servlets Joseph Sant Sheridan Institute of Technology.
Servlets Stoney Jackson
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
JSP Java Server Pages Reference:
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Website Development with PHP and MySQL Introduction.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Introduction to Servlet & JSP
Comp2513 Java Servlet Basics Daniel L. Silver, Ph.D.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
14-Jul-15 Tomcat. 2 The Apache Jakarta Project The Apache Jakarta Project “creates and maintains open source solutions on the Java platform for distribution.
Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.
Server Side Programming Web Information Systems 2012.
Java web development Servlet & Java server pages.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
8 Server Side Scripting.
Java Servlets and JSP.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Server-side Technologies
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Applets & Servlets.
1 Servlet How can a HTML page, displayed using a browser, cause a program on a server to be executed?
Introduction to JAVA Instructor : Simon Hui & Louis Wong Industrial Centre The Hong Kong Polytechnic University Sep, 2002.
Servlets. - Java technology for Common Gateway Interface (CGI) programming. - It is a Java class that dynamically extends the function of a web server.
Objectives Java Servlet Web Components
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Chapter 2 Web app architecture. High-level web app architecture  When a client request coming in and needs servlet to serve dynamic web content, what.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Java Servlets and Java Server Pages Norman White Stern School of Business.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
STRUCTURE OF JSP PRESENTED BY: SIDDHARTHA SINGH ( ) SOMYA SHRIVASTAV ( ) SONAM JINDAL ( )
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
Configuration Web Server Tomcat - Install JDK Install Tom cat Configure Tom cat for running Servlet C:\Program Files\Apache Software Foundation\Tomcat.
©SoftMoore ConsultingSlide 1 Overview of Servlets and JavaServer Pages (JSP)
Java Servlets and Java Server Pages
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,
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
Distributed Web Systems Java Servlets Lecturer Department University.
CS122B: Projects in Databases and Web Applications Spring 2017
CS122B: Projects in Databases and Web Applications Winter 2017
Introduction Servlets and JSP
MSIS 655 Advanced Business Applications Programming
Java Servlet Ziad A. Al-Sharif.
CS122B: Projects in Databases and Web Applications Winter 2018
CS122B: Projects in Databases and Web Applications Spring 2018
Java Servlets and JSP.
CS122B: Projects in Databases and Web Applications Winter 2019
Basic servlet structure
Presentation transcript:

Introduction Servlets and JSP Celsina Bignoli

Dynamic web pages Content may change based on –identity of the user –user’s browser type –information provided by the user –selections made by the user

CGI CGI (Common Gateway Inteface) –outlines how a web server communicates with a program. –Typically written in Pearl (or C) CGI scripting is not efficient –for every request the web server has to create a new process load an interpreter run the program and dispose of the process once done.

CGI improvements Fast-CGI –runs program in a external process or pool of processes mod_perl, NSAPI, ISAPI –run server-side programs in the same process as the web server –available only on some web servers

Servlets Server side Java programs Solve scalability issue –serlvets are run on threads of execution not separate processes Solve portability issue –runs on every platform that supports Java –supported by all most popular web servers Issue –html tags are embedded in java programs within out.print() statements

JSP server-side technology separate dynamic content from static content of a page –Java scriptlets embedded into html-like page Separate the work of –java programmers –page authors

JSP relationship to Servlets A JSP is converted into a Servlet

Servlet Example import java.text.*; import java.util.*; import public class DateServlet extends HttpServlet{ public void doGet(HTTPServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(“text/html’); PrintWriter out = response.getWriter(); out.println(“ ”); out.println(“Today is: “); Date d = new Date(); out.println(“ ” + DateFormat.getInstance().format(d)+ “ ”); out.println(“ ”); } embedded HTML

JSP Example Static: HTML/XML elements Dynamic: scriptlets Additional: special JSP elements Example.jsp <% Date d=new Date(); String today = DateFormat.getInstance().format(d); %> Today is: HTML Scriptlet JSP tag

JSP alternatives Active Server Pages –allows you to add VBScript or JScript code to the page –primarily a solution for te Windows platform PHP –open source web-scripting language. –extensive set of predifined functions to access databases, LDAP directories, mail servers etc… –widely supported ColdFusion –ColdFusion Markup Language(CFML) accessing databases, files, mail servers etc… –custom elements can be developed in C++ or Java

JSP Unique Features JSP is a specification, not a product –competing implementations integral part of J2EE –access all features of the Java language

How to get Started Install JDK 5.0 Download Apache Tomcat 5.5 from: Use a regular editor or an IDE that supports JSP development –Eclipse –JBuilder –JCreator –Oracle JDeveloper –NetBeans –Macromedia DreamWeaver