JavaServer Pages. What is JavaServer Pages?

Size: px
Start display at page:

Download "JavaServer Pages. What is JavaServer Pages?"

Transcription

1 JavaServer Pages SWE 642, Fall 2008 Nick Duan What is JavaServer Pages? JSP is a server-side scripting language in Java for constructing dynamic web pages based on Java Servlet, specifically it contains three types vocabularies A set of special tags for interfacing with the Java language An expression language (EL) for accessing server-side JavaBeans and built-in objects An tag extension mechanism to the define customized tags An XML document containing a combination of HTML/JavaScripts, CSS, and JSP elements Any difference between JSP and JavaScripts? 10/28/2008 Nick Duan 2 1

2 Directive Sample JSP Action page info= Samle JSP for SWE642 %> <jsp:usebean id= mybean" class= edu.gmu.beanclass"/> <jsp:setproperty name= mybean" property= "*"/> <html> <body> import file= header.html %> Directive Scriptlet <% if (request.getparameter("name")==null ) { %> <h1>user Info Request Form</h1> <form method= get" action="/process.jsp"> <br> Name: <input type="text" name= "name > <p> <input type="submit" value= Submit"> </form> <% } else { %> <p> <b>user Name provided</b>: <p> Name: <jsp:getproperty name= mybean" property="name"/> <% } %> </body></html> Action August 21, 2008 Nick Duan 3 JSP Lifecycle Hello.jsp 1. Request 6. Response JSP Container J2EE Server 3. Generate 4. Compile Hello_jsp.java Follow the servlet lifecycle here Hello_jsp.class If JSP is already compiled, compilation is skipped 10/28/2008 Nick Duan 4 2

3 Types of JSP Elements JSP Element Type Syntax Comment <%-- my comments --%> Declaration <%! int count=0; %> Directives include file= myjsp.jsp %> page {attribute= value }* %> taglib uri= prefix= me %> Expression <%= variable %> Scriptlet <% String mystring= mystring ; %> Actions <jsp:usebean {attribute= value }* /> August 21, 2008 Nick Duan 5 Page Directives Defines one of more page-dependent properties Commonly used attributes page import = a java class to this page extends = a base class for this page errorpage = error page url contenttype = MINE type of this page pageencoding = character encoding of this page August 21, 2008 Nick Duan 6 3

4 Standard Actions in JSP XML elements with the prefix jsp, predefined by the JSP engine Standard Actions <jsp:usebean /> Actions for Dealing with Java Beans <jsp: setproperty /> <jsp: getproperty /> <jsp: param /> <jsp: include /> <jsp: forward /> <jsp: plugin /> <jsp:params /> <jsp:element /> <jsp:attribute /> <jsp:text /> 10/28/2008 Nick Duan 7 What is a JavaBean? A Java class with standard naming conventions for data members (properties) and public access methods (getters/setters) Declared as a public class with default constructor First introduced in JDK 1.0 with different types of properties (simple, indexed, change, vetoable) and introspection APIs Java Beans with simple properties are most commonly used Sometimes it may refer to any Java class 10/28/2008 Nick Duan 8 4

5 Sample Java Bean Definition public class User { } private String name; private String phonenumber; public String getname() { return name; } public void setname(string val) { name=val; } public String getphonenumber () { return phonenum; } public void setphonenumber(string val) { phonenumber=val; } August 21, 2008 Nick Duan 9 The usebean Action Create a Java Bean object within the page or reference an existing one in request or session object Syntax <jsp:usebean id= bname scope= page request session application class= edu.gmu.swe642.user /> id Variable name of the Java Bean object to be used throughout the page An usebean action to be defined first before any setproperty and getproperty action in a JSP 10/28/2008 Nick Duan 10 5

6 The setproperty Action setproperty sets a value of a data member in a Java Bean object Performs the corresponding setter function of the bean <jsp:setproperty name= bname" property= name" value= Charlie Brown"/> <jsp:setproperty name= bname" property="*" /> Set the bean properties with values of request parameters with identical names 10/28/2008 Nick Duan 11 The getproperty Action getproperty performs the corresponding getter method of the bean and output the result to the jspwriter <jsp:getproperty name= bname" property= phonenumber"/> Equivalent to the jsp expression: <%=bname.getphonenumber()%> bname must have been defined as an id in a previous usebean action August 21, 2008 Nick Duan 12 6

7 The forward & include Action Similar to the forward and include method of the servlet dispatcher (What s the difference between forward and include?) Syntax <jsp:include page= yours.jsp" flush= true false /> <jsp:forward page= yours.jsp /> <jsp:include page= yours.jsp" flush= true false > {<jsp:param name= name value= val />}* </jsp:include> <jsp:forward page= yours.jsp > {<jsp:param name= name value= val />}* </jsp:forward> 10/28/2008 Nick Duan 13 Implicit Objects in JSP Predefined variables for standard Servlet/JSP objects request HttpServletRequest response HttpServletResponse session HttpSession application ServletContext config ServletConfig out JspWriter Example Current session ID: <%=session.getid()%> August 21, 2008 Nick Duan 14 7

8 Unified Expression Language A generic scripting technology not limited to JSP (also used in JSF) Functionalities built into the JSP engine Direct access to JavaBeans/various data structures (array, enum and collections), and implicit objects via various resolvers Allow direct data mapping to/from JavaBeans (or bean-like) data objects Invoke static/public methods Built-in string and arithmetic operations August 21, 2008 Nick Duan 15 EL Examples ${expr} immediate evaluation #{expr} deferred evaluation (used mostly in JSF technology) ${employee.name} JavaBeans, Java enum, Map ${array[0]} array ${employee[ name ]} JavaBeans, Java enum, Map ${employee.age + 20} Arithmetic expr. ${planet == earth } Logical expr. August 21, 2008 Nick Duan 16 8

9 EL Resolvers A set of standard Java classes extending ELResolver for resolving JSP objects and accessing their properties Types of resolver classes include ArrayELResolver BeanELResolver ListELResolver MapELResolver ResourceBundleResolver ImplicitObjectResolver August 21, 2008 Nick Duan 17 Custom Tags in JSP A customer tag is a JSP element designed to perform JSP functions (e.g EL eval) and/or HTML rendering of a page segment Format in JSP <pref:tagname attri_name= value../> (with or without body) Able to access all objects available to JSP and communicate with each other Reusable and flexible, more popular than JSP fragment. Can be bundled into a tag library Can be implemented either using a combination of EL and existing tags/scripts, or via creation of tag classes using tag APIs August 21, 2008 Nick Duan 18 9

10 Configure Custom Tags Create tag files with extension.tag and package under WEB-INF/tags/dir, or provide tag classes under WEB-INF/classes Reference tag library in JSP taglib prefix= pref tagdir= WEB- INF/tags/subdir %> taglib prefix= pref" uri= uri" %> url references the location of the tld file In case of API implementation, define tag library descriptor file(s) with the extension.tld under WEB-INF or a subdirectory Implicit tld file is generated in case of tag files August 21, 2008 Nick Duan 19 JSP Standard Tag Library What is JSTL? A collection of commonly used custom tags for JSP A JCP standard, Latest version: 1.2 Defined in multiple categories according to tag functionality Category Uri Prefix Core c XML Processing xml I18N formatting fmt Database sql Functions fn August 21, 2008 Nick Duan 20 10

11 Example of JSTL taglib uri=" prefix="sql" %> taglib uri=" prefix="c" %> <sql:query var="rs" datasource="jdbc/proj642db"> select * from employee </sql:query> <table border=1 bgcolor="lightblue" width="300"> <tr><td>name</td> <td>address</td> <td>age</td> </tr> <c:foreach var="row" items="${rs.rows}"> <tr><td>${row.name}</td> <td>${row.address}</td> <td>${row.age}</td> </tr> </c:foreach> </table> August 21, 2008 Nick Duan 21 Summary JSP is a combination of various techniques for creating presentation-tier of web applications. If used properly, JSP can be a efficient tool in developing web applications The best practice in JSP nowadays is to use JavaBeans and Bean-like components, and custom tags to define page logic and HTML rendering, instead of using embedded Java code Design a JSP into reusable fragments implemented using tags August 21, 2008 Nick Duan 22 11

12 Quiz How to create aperform request dispatching in JSP (servlet-chaining in JSP)? Should you ever use request dispatching in JSP? What would be the best way to instantiate a Java ArrayList object in a JSP? How to define a custom tag that displays the content of a Map in HTML table format? How to create a single customer tag that renders an SQL result in table format? August 21, 2008 Nick Duan 23 12

Java Server Page (JSP)

Java Server Page (JSP) Java Server Page (JSP) CS 4640 Programming Languages for Web Applications [Based in part on SWE432 and SWE632 materials by Jeff Offutt] [Robert W. Sebesta, Programming the World Wide Web] 1 Web Applications

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2465 1 Review:

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411 1 Review:

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Java Server Pages (JSP) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442

More information

PES INSTITUTE OF TECHNOLOGY, SOUTH CAMPUS DEPARTMENT OF MCA INTERNAL TEST (SCHEME AND SOLUTION) II

PES INSTITUTE OF TECHNOLOGY, SOUTH CAMPUS DEPARTMENT OF MCA INTERNAL TEST (SCHEME AND SOLUTION) II PES INSTITUTE OF TECHNOLOGY, SOUTH CAMPUS DEPARTMENT OF MCA INTERNAL TEST (SCHEME AND SOLUTION) II Subject Name: Advanced JAVA programming Subject Code: 13MCA42 Time: 11:30-01:00PM Max.Marks: 50M ----------------------------------------------------------------------------------------------------------------

More information

Introduction to Java Server Pages. Enabling Technologies - Plug-ins Scripted Pages

Introduction to Java Server Pages. Enabling Technologies - Plug-ins Scripted Pages Introduction to Java Server Pages Jeff Offutt & Ye Wu http://www.ise.gmu.edu/~offutt/ SWE 432 Design and Implementation of Software for the Web From servlets lecture. Enabling Technologies - Plug-ins Scripted

More information

Fast Track to Java EE 5 with Servlets, JSP & JDBC

Fast Track to Java EE 5 with Servlets, JSP & JDBC Duration: 5 days Description Java Enterprise Edition (Java EE 5) is a powerful platform for building web applications. The Java EE platform offers all the advantages of developing in Java plus a comprehensive

More information

JSP - SYNTAX. Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is the simple and first example for JSP:

JSP - SYNTAX. Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is the simple and first example for JSP: http://www.tutorialspoint.com/jsp/jsp_syntax.htm JSP - SYNTAX Copyright tutorialspoint.com This tutorial will give basic idea on simple syntax ie. elements involved with JSP development: The Scriptlet:

More information

JavaServer Pages (JSP)

JavaServer Pages (JSP) JavaServer Pages (JSP) The Context The Presentation Layer of a Web App the graphical (web) user interface frequent design changes usually, dynamically generated HTML pages Should we use servlets? No difficult

More information

directive attribute1= value1 attribute2= value2... attributen= valuen %>

directive attribute1= value1 attribute2= value2... attributen= valuen %> JSP Standard Syntax Besides HTML tag elements, JSP provides four basic categories of constructors (markup tags): directives, scripting elements, standard actions, and comments. You can author a JSP page

More information

Java Server Pages. JSP Part II

Java Server Pages. JSP Part II Java Server Pages JSP Part II Agenda Actions Beans JSP & JDBC MVC 2 Components Scripting Elements Directives Implicit Objects Actions 3 Actions Actions are XML-syntax tags used to control the servlet engine

More information

Introduction to JSP and Servlets Training 5-days

Introduction to JSP and Servlets Training 5-days QWERTYUIOP{ Introduction to JSP and Servlets Training 5-days Introduction to JSP and Servlets training course develops skills in JavaServer Pages, or JSP, which is the standard means of authoring dynamic

More information

JSP - ACTIONS. There is only one syntax for the Action element, as it conforms to the XML standard:

JSP - ACTIONS. There is only one syntax for the Action element, as it conforms to the XML standard: http://www.tutorialspoint.com/jsp/jsp_actions.htm JSP - ACTIONS Copyright tutorialspoint.com JSP actions use constructs in XML syntax to control the behavior of the servlet engine. You can dynamically

More information

JSP MOCK TEST JSP MOCK TEST IV

JSP MOCK TEST JSP MOCK TEST IV http://www.tutorialspoint.com JSP MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to JSP Framework. You can download these sample mock tests at your local

More information

Unit 5 JSP (Java Server Pages)

Unit 5 JSP (Java Server Pages) Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic, platform-independent method for building Web-based applications. It focuses more on presentation logic

More information

1. Introduction. 2. Life Cycle Why JSP is preferred over Servlets? 2.1. Translation. Java Server Pages (JSP) THETOPPERSWAY.

1. Introduction. 2. Life Cycle Why JSP is preferred over Servlets? 2.1. Translation. Java Server Pages (JSP) THETOPPERSWAY. 1. Introduction Java Server Pages (JSP) THETOPPERSWAY.COM Java Server Pages (JSP) is used for creating dynamic web pages. Java code can be inserted in HTML pages by using JSP tags. The tags are used for

More information

Université du Québec à Montréal

Université du Québec à Montréal Laboratoire de Recherches sur les Technologies du Commerce Électronique arxiv:1803.05253v1 [cs.se] 14 Mar 2018 Université du Québec à Montréal How to Implement Dependencies in Server Pages of JEE Web Applications

More information

This course is intended for Java programmers who wish to write programs using many of the advanced Java features.

This course is intended for Java programmers who wish to write programs using many of the advanced Java features. COURSE DESCRIPTION: Advanced Java is a comprehensive study of many advanced Java topics. These include assertions, collection classes, searching and sorting, regular expressions, logging, bit manipulation,

More information

CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, JSPs 1

CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, JSPs 1 CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, 2004 JSPs 1 As we know, servlets, replacing the traditional CGI technology, can do computation and generate dynamic contents during

More information

PSD1B Advance Java Programming Unit : I-V. PSD1B- Advance Java Programming

PSD1B Advance Java Programming Unit : I-V. PSD1B- Advance Java Programming PSD1B Advance Java Programming Unit : I-V PSD1B- Advance Java Programming 1 UNIT I - SYLLABUS Servlets Client Vs Server Types of Servlets Life Cycle of Servlets Architecture Session Tracking Cookies JDBC

More information

Scope and State Handling in JSP

Scope and State Handling in JSP Scope and State Handling in JSP CS 4640 Programming Languages for Web Applications [Based in part on SWE432 and SWE632 materials by Jeff Offutt] [Robert W. Sebesta, Programming the World Wide Web] 1 Session

More information

a. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22.

a. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22. Answers 1. What is the super interface to all the JDBC Drivers, specify their fully qualified name? a. Java.sql.Driver i. JDBC-ODBC Driver ii. Java-Native API Driver iii. All Java Net Driver iv. Java Native

More information

01KPS BF Progettazione di applicazioni web

01KPS BF Progettazione di applicazioni web 01KPS BF Progettazione di applicazioni web Introduction to Java Server Pages Fulvio Corno, Alessio Bosca Dipartimento di Automatica e Informatica Politecnico di Torino PAW - JSP intro 1 Introduction to

More information

Fast Track to Java EE

Fast Track to Java EE Java Enterprise Edition is a powerful platform for building web applications. This platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This

More information

A JavaBean is a class file that stores Java code for a JSP

A JavaBean is a class file that stores Java code for a JSP CREATE A JAVABEAN A JavaBean is a class file that stores Java code for a JSP page. Although you can use a scriptlet to place Java code directly into a JSP page, it is considered better programming practice

More information

Java E-Commerce Martin Cooke,

Java E-Commerce Martin Cooke, Java E-Commerce Martin Cooke, 2002 1 Java technologies for presentation: JSP Today s lecture in the presentation tier Java Server Pages Tomcat examples Presentation How the web tier interacts with the

More information

JSP. Basic Elements. For a Tutorial, see:

JSP. Basic Elements. For a Tutorial, see: JSP Basic Elements For a Tutorial, see: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/jspintro.html Simple.jsp JSP Lifecycle Server Web

More information

20/08/56. Java Technology, Faculty of Computer Engineering, KMITL 1

20/08/56. Java Technology, Faculty of Computer Engineering, KMITL 1 Engineering, KMITL 1 Agenda What is JSP? Life-cycle of JSP page Steps for developing JSP-based Web application Dynamic contents generation techniques in JSP Three main JSP constructs Directives Error handling

More information

Advance Java. Configuring and Getting Servlet Init Parameters per servlet

Advance Java. Configuring and Getting Servlet Init Parameters per servlet Advance Java Understanding Servlets What are Servlet Components? Web Application Architecture Two tier, three tier and N-tier Arch. Client and Server side Components and their relation Introduction to

More information

A Gentle Introduction to Java Server Pages

A Gentle Introduction to Java Server Pages A Gentle Introduction to Java Server Pages John Selmys Seneca College July 2010 What is JSP? Tool for developing dynamic web pages developed by SUN (now Oracle) High-level abstraction of Java Servlets

More information

JAVA 2 ENTERPRISE EDITION (J2EE)

JAVA 2 ENTERPRISE EDITION (J2EE) COURSE TITLE DETAILED SYLLABUS SR.NO JAVA 2 ENTERPRISE EDITION (J2EE) ADVANCE JAVA NAME OF CHAPTERS & DETAILS HOURS ALLOTTED SECTION (A) BASIC OF J2EE 1 FILE HANDLING Stream Reading and Creating file FileOutputStream,

More information

112. Introduction to JSP

112. Introduction to JSP 112. Introduction to JSP Version 2.0.2 This two-day module introduces JavaServer Pages, or JSP, which is the standard means of authoring dynamic content for Web applications under the Java Enterprise platform.

More information

Sun Sun Certified Web Component Developer for J2EE 5 Version 4.0

Sun Sun Certified Web Component Developer for J2EE 5 Version 4.0 Sun Sun Certified Web Component Developer for J2EE 5 Version 4.0 QUESTION NO: 1 To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application

More information

112-WL. Introduction to JSP with WebLogic

112-WL. Introduction to JSP with WebLogic Version 10.3.0 This two-day module introduces JavaServer Pages, or JSP, which is the standard means of authoring dynamic content for Web applications under the Java Enterprise platform. The module begins

More information

Table of Contents. Introduction... xxi

Table of Contents. Introduction... xxi Introduction... xxi Chapter 1: Getting Started with Web Applications in Java... 1 Introduction to Web Applications... 2 Benefits of Web Applications... 5 Technologies used in Web Applications... 5 Describing

More information

Principles and Techniques of DBMS 6 JSP & Servlet

Principles and Techniques of DBMS 6 JSP & Servlet Principles and Techniques of DBMS 6 JSP & Servlet Haopeng Chen REliable, INtelligent and Scalable Systems Group (REINS) Shanghai Jiao Tong University Shanghai, China http://reins.se.sjtu.edu.cn/~chenhp

More information

Unit 4 Java Server Pages

Unit 4 Java Server Pages Q1. List and Explain various stages of JSP life cycle. Briefly give the function of each phase. Ans. 1. A JSP life cycle can be defined as the entire process from its creation till the destruction. 2.

More information

CS506 Web Design & Development Final Term Solved MCQs with Reference

CS506 Web Design & Development Final Term Solved MCQs with Reference with Reference I am student in MCS (Virtual University of Pakistan). All the MCQs are solved by me. I followed the Moaaz pattern in Writing and Layout this document. Because many students are familiar

More information

Module 5 Developing with JavaServer Pages Technology

Module 5 Developing with JavaServer Pages Technology Module 5 Developing with JavaServer Pages Technology Objectives Evaluate the role of JSP technology as a presentation Mechanism Author JSP pages Process data received from servlets in a JSP page Describe

More information

Specialized - Mastering JEE 7 Web Application Development

Specialized - Mastering JEE 7 Web Application Development Specialized - Mastering JEE 7 Web Application Development Code: Lengt h: URL: TT5100- JEE7 5 days View Online Mastering JEE 7 Web Application Development is a five-day hands-on JEE / Java EE training course

More information

COMP201 Java Programming

COMP201 Java Programming COMP201 Java Programming Part III: Advanced Features Topic 16: JavaServer Pages (JSP) Servlets and JavaServer Pages (JSP) 1.0: A Tutorial http://www.apl.jhu.edu/~hall/java/servlet-tutorial/servlet-tutorial-intro.html

More information

CE212 Web Application Programming Part 3

CE212 Web Application Programming Part 3 CE212 Web Application Programming Part 3 30/01/2018 CE212 Part 4 1 Servlets 1 A servlet is a Java program running in a server engine containing methods that respond to requests from browsers by generating

More information

JavaServer Pages. Juan Cruz Kevin Hessels Ian Moon

JavaServer Pages. Juan Cruz Kevin Hessels Ian Moon Page 1 of 14 JavaServer Pages Table of Contents 1. Introduction What is JSP? Alternative Solutions Why Use JSP? 2. JSP Process Request Compilation Example 3. Object Instantiation and Scope Scope Synchronization

More information

Session 12. JSP Tag Library (JSTL) Reading & Reference

Session 12. JSP Tag Library (JSTL) Reading & Reference Session 12 JSP Tag Library (JSTL) 1 Reading & Reference Reading Head First Chap 9, pages 439-474 Reference (skip internationalization and sql sections) Java EE 5 Tutorial (Chapter 7) - link on CSE336 Web

More information

ADVANCED JAVA COURSE CURRICULUM

ADVANCED JAVA COURSE CURRICULUM ADVANCED JAVA COURSE CURRICULUM Index of Advanced Java Course Content : 1. Basics of Servlet 2. ServletRequest 3. Servlet Collaboration 4. ServletConfig 5. ServletContext 6. Attribute 7. Session Tracking

More information

Java Server Pages, JSP

Java Server Pages, JSP Java Server Pages, JSP Java server pages is a technology for developing web pages that include dynamic content. A JSP page can change its content based on variable items, identity of the user, the browsers

More information

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab. Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 10 JAVABEANS IN JSP El-masry May, 2014 Objectives Understanding JavaBeans.

More information

JSP CSCI 201 Principles of Software Development

JSP CSCI 201 Principles of Software Development JSP CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JSP Program USC CSCI 201L JSP 3-Tier Architecture Client Server Web/Application Server Database USC

More information

Web applications and JSP. Carl Nettelblad

Web applications and JSP. Carl Nettelblad Web applications and JSP Carl Nettelblad 2015-04-02 Outline Review and assignment Jara Server Pages Web application structure Review We send repeated requests using HTTP Each request asks for a specific

More information

Module 3 Web Component

Module 3 Web Component Module 3 Component Model Objectives Describe the role of web components in a Java EE application Define the HTTP request-response model Compare Java servlets and JSP components Describe the basic session

More information

Java Server Pages JSP

Java Server Pages JSP Java Server Pages JSP Agenda Introduction JSP Architecture Scripting Elements Directives Implicit Objects 2 A way to create dynamic web pages Introduction Separates the graphical design from the dynamic

More information

More JSP. Advanced Topics in Java. Khalid Azim Mughal Version date: ATIJ More JSP 1/42

More JSP. Advanced Topics in Java. Khalid Azim Mughal   Version date: ATIJ More JSP 1/42 More JSP Advanced Topics in Java Khalid Azim Mughal khalid@ii.uib.no http://www.ii.uib.no/~khalid/atij/ Version date: 2006-09-04 ATIJ More JSP 1/42 Overview Including Resources in JSP Pages using the jsp:include

More information

Trabalhando com JavaServer Pages (JSP)

Trabalhando com JavaServer Pages (JSP) Trabalhando com JavaServer Pages (JSP) Sumário 7.2.1 Introdução 7.2.2 JavaServer Pages Overview 7.2.3 First JavaServer Page Example 7.2. Implicit Objects 7.2.5 Scripting 7.2.5.1 Scripting Components 7.2.5.2

More information

6- JSP pages. Juan M. Gimeno, Josep M. Ribó. January, 2008

6- JSP pages. Juan M. Gimeno, Josep M. Ribó. January, 2008 6- JSP pages Juan M. Gimeno, Josep M. Ribó January, 2008 Contents Introduction to web applications with Java technology 1. Introduction. 2. HTTP protocol 3. Servlets 4. Servlet container: Tomcat 5. Web

More information

ADVANCED JAVA TRAINING IN BANGALORE

ADVANCED JAVA TRAINING IN BANGALORE ADVANCED JAVA TRAINING IN BANGALORE TIB ACADEMY #5/3 BEML LAYOUT, VARATHUR MAIN ROAD KUNDALAHALLI GATE, BANGALORE 560066 PH: +91-9513332301/2302 www.traininginbangalore.com 2EE Training Syllabus Java EE

More information

GUJARAT TECHNOLOGICAL UNIVERSITY

GUJARAT TECHNOLOGICAL UNIVERSITY 1. Learning Objectives: To learn and work with the web components of Java EE. i.e. the Servlet specification. Student will be able to learn MVC architecture and develop dynamic web application using Java

More information

A.1 JSP A.2 JSP JSP JSP. MyDate.jsp page contenttype="text/html; charset=windows-31j" import="java.util.calendar" %>

A.1 JSP A.2 JSP JSP JSP. MyDate.jsp page contenttype=text/html; charset=windows-31j import=java.util.calendar %> A JSP A.1 JSP Servlet Java HTML JSP HTML Java ( HTML JSP ) JSP Servlet Servlet HTML JSP MyDate.jsp

More information

Advanced Java Programming

Advanced Java Programming Advanced Java Programming Length: 4 days Description: This course presents several advanced topics of the Java programming language, including Servlets, Object Serialization and Enterprise JavaBeans. In

More information

C H A P T E RJSP.2. JSP.2.1 Syntax of expressions in JSP pages: ${} vs #{}

C H A P T E RJSP.2. JSP.2.1 Syntax of expressions in JSP pages: ${} vs #{} C H A P T E RJSP.2 Expression Language As of JSP 2.1, the expression languages of JSP 2.0 and JSF 1.1 have been merged into a single unified expression language (EL 2.1) for the benefit of all Java based

More information

SNS COLLEGE OF ENGINEERING, Coimbatore

SNS COLLEGE OF ENGINEERING, Coimbatore SNS COLLEGE OF ENGINEERING, Coimbatore 641 107 Accredited by NAAC UGC with A Grade Approved by AICTE and Affiliated to Anna University, Chennai IT6503 WEB PROGRAMMING UNIT 04 APPLETS Java applets- Life

More information

Basic Principles of JSPs

Basic Principles of JSPs 5 IN THIS CHAPTER What Is a JSP? Deploying a JSP in Tomcat Elements of a JSP Page Chapter 4, Basic Principles of Servlets, introduced you to simple Web applications using servlets. Although very useful

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

LTBP INDUSTRIAL TRAINING INSTITUTE Java SE Introduction to Java JDK JRE Discussion of Java features and OOPS Concepts Installation of Netbeans IDE Datatypes primitive data types non-primitive data types Variable declaration Operators Control

More information

About the Authors. Who Should Read This Book. How This Book Is Organized

About the Authors. Who Should Read This Book. How This Book Is Organized Acknowledgments p. XXIII About the Authors p. xxiv Introduction p. XXV Who Should Read This Book p. xxvii Volume 2 p. xxvii Distinctive Features p. xxviii How This Book Is Organized p. xxx Conventions

More information

Trabalhando com JavaServer Pages (JSP)

Trabalhando com JavaServer Pages (JSP) Trabalhando com JavaServer Pages (JSP) Sumário 7.2.1 Introdução 7.2.2 JavaServer Pages Overview 7.2.3 First JavaServer Page Example 7.2.4 Implicit Objects 7.2.5 Scripting 7.2.5.1 Scripting Components 7.2.5.2

More information

Advantage of JSP over Servlet

Advantage of JSP over Servlet JSP technology is used to create web application just like Servlet technology. It can be thought of as an extension to servlet because it provides more functionality than servlet such as expression language,

More information

Servlet and JSP Review

Servlet and JSP Review 2006 Marty Hall Servlet and JSP Review A Recap of the Basics 2 JSP, Servlet, Struts, JSF, AJAX, & Java 5 Training: http://courses.coreservlets.com J2EE Books from Sun Press: http://www.coreservlets.com

More information

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER J2EE CURRICULUM Mob : +91-9024222000 Mob : +91-8561925707 Email : info@dvswebinfotech.com Email : hr@dvswebinfotech.com 48, Sultan Nagar,Near Under

More information

Ch04 JavaServer Pages (JSP)

Ch04 JavaServer Pages (JSP) Ch04 JavaServer Pages (JSP) Introduce concepts of JSP Web components Compare JSP with Servlets Discuss JSP syntax, EL (expression language) Discuss the integrations with JSP Discuss the Standard Tag Library,

More information

UNIT -5. Java Server Page

UNIT -5. Java Server Page UNIT -5 Java Server Page INDEX Introduction Life cycle of JSP Relation of applet and servlet with JSP JSP Scripting Elements Difference between JSP and Servlet Simple JSP program List of Questions Few

More information

Component Based Software Engineering

Component Based Software Engineering Component Based Software Engineering Masato Suzuki School of Information Science Japan Advanced Institute of Science and Technology 1 Schedule Mar. 10 13:30-15:00 : 09. Introduction and basic concepts

More information

Modernizing Java Server Pages By Transformation. S h a n n o n X u T h o m a s D e a n Q u e e n s U n i v e r s i t y

Modernizing Java Server Pages By Transformation. S h a n n o n X u T h o m a s D e a n Q u e e n s U n i v e r s i t y Modernizing Java Server Pages By Transformation S h a n n o n X u T h o m a s D e a n Q u e e n s U n i v e r s i t y Background CSER - Consortium for Software Engineering Research Dynamic Web Pages Multiple

More information

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar www.vuhelp.pk Solved MCQs with reference. inshallah you will found it 100% correct solution. Time: 120 min Marks:

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

LTBP INDUSTRIAL TRAINING INSTITUTE Advance Java Servlet Basics of Servlet Servlet: What and Why? Basics of Web Servlet API Servlet Interface GenericServlet HttpServlet Servlet Li fe Cycle Working wi th Apache Tomcat Server Steps to create

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 12 (Wrap-up) http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 1, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 12 (Wrap-up) http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2457

More information

Database. Request Class. jdbc. Servlet. Result Bean. Response JSP. JSP and Servlets. A Comprehensive Study. Mahesh P. Matha

Database. Request Class. jdbc. Servlet. Result Bean. Response JSP. JSP and Servlets. A Comprehensive Study. Mahesh P. Matha Database Request Class Servlet jdbc Result Bean Response py Ki ta b JSP Ko JSP and Servlets A Comprehensive Study Mahesh P. Matha JSP and Servlets A Comprehensive Study Mahesh P. Matha Assistant Professor

More information

Peers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java

Peers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java Page 1 Peers Techno log ies Pv t. L td. Course Brochure Core Java & Core Java &Adv Adv Java Java Overview Core Java training course is intended for students without an extensive programming background.

More information

First Simple Interactive JSP example

First Simple Interactive JSP example Let s look at our first simple interactive JSP example named hellojsp.jsp. In his Hello User example, the HTML page takes a user name from a HTML form and sends a request to a JSP page, and JSP page generates

More information

Java.. servlets and. murach's TRAINING & REFERENCE 2ND EDITION. Joel Murach Andrea Steelman. IlB MIKE MURACH & ASSOCIATES, INC.

Java.. servlets and. murach's TRAINING & REFERENCE 2ND EDITION. Joel Murach Andrea Steelman. IlB MIKE MURACH & ASSOCIATES, INC. TRAINING & REFERENCE murach's Java.. servlets and 2ND EDITION Joel Murach Andrea Steelman IlB MIKE MURACH & ASSOCIATES, INC. P 1-800-221-5528 (559) 440-9071 Fax: (559) 440-0963 murachbooks@murach.com www.murach.com

More information

Building Web Applications With The Struts Framework

Building Web Applications With The Struts Framework Building Web Applications With The Struts Framework ApacheCon 2003 Session TU23 11/18 17:00-18:00 Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc. Slides: http://www.apache.org/~craigmcc/

More information

Oracle 10g: Build J2EE Applications

Oracle 10g: Build J2EE Applications Oracle University Contact Us: (09) 5494 1551 Oracle 10g: Build J2EE Applications Duration: 5 Days What you will learn Leading companies are tackling the complexity of their application and IT environments

More information

Experiment No: Group B_2

Experiment No: Group B_2 Experiment No: Group B_2 R (2) N (5) Oral (3) Total (10) Dated Sign Problem Definition: A Web application for Concurrent implementation of ODD-EVEN SORT is to be designed using Real time Object Oriented

More information

Contents at a Glance

Contents at a Glance Contents at a Glance 1 Java EE and Cloud Computing... 1 2 The Oracle Java Cloud.... 25 3 Build and Deploy with NetBeans.... 49 4 Servlets, Filters, and Listeners... 65 5 JavaServer Pages, JSTL, and Expression

More information

What's New in the Servlet and JSP Specifications

What's New in the Servlet and JSP Specifications What's New in the Servlet and JSP Specifications Bryan Basham Sun Microsystems, Inc bryan.basham@sun.com Page 1 Topics Covered History Servlet Spec Changes JSP Spec Changes: General JSP Spec Changes: Expression

More information

JSP Scripting Elements

JSP Scripting Elements JSP Scripting Elements Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet and JSP Training Courses: courses.coreservlets.com 1 Slides Marty Hall, http://, book Sun Microsystems

More information

/smlcodes /smlcodes /smlcodes JSP. Java Server Pages. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation

/smlcodes /smlcodes /smlcodes JSP. Java Server Pages. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation /smlcodes /smlcodes /smlcodes JSP Java Server Pages - Satya Kaveti Small Codes Programming Simplified A SmlCodes.Com Small presentation In Association with Idleposts.com For more tutorials & Articles visit

More information

Enterprise Computing with Java MCA-305 UNIT II. Learning Objectives. JSP Basics. 9/17/2013MCA-305, Enterprise Computing in Java

Enterprise Computing with Java MCA-305 UNIT II. Learning Objectives. JSP Basics. 9/17/2013MCA-305, Enterprise Computing in Java Enterprise Computing with Java MCA-305 UNIT II Bharati Vidyapeeth s Institute of Computer Applications and Management, New Delhi-63, by Ms. Ritika Wason UII. # Learning Objectives JSP Basics and Architecture:

More information

JAVA MICROSERVICES. Java Language Environment. Java Set Up. Java Fundamentals. Packages. Operations

JAVA MICROSERVICES. Java Language Environment. Java Set Up. Java Fundamentals. Packages. Operations Java Language Environment JAVA MICROSERVICES Object Oriented Platform Independent Automatic Memory Management Compiled / Interpreted approach Robust Secure Dynamic Linking MultiThreaded Built-in Networking

More information

Exercise. (1) Which of the following can not be used as the scope when using a JavaBean with JSP? a. application b. session c. request d.

Exercise. (1) Which of the following can not be used as the scope when using a JavaBean with JSP? a. application b. session c. request d. Exercise 1. Choose the best answer for each of the following questions. (1) Which of the following can not be used as the scope when using a JavaBean with JSP? a. application b. session c. request d. response

More information

AN ISO 9001:2008 CERTIFIED COMPANY ADVANCED. Java TRAINING.

AN ISO 9001:2008 CERTIFIED COMPANY ADVANCED. Java TRAINING. AN ISO 9001:2008 CERTIFIED COMPANY ADVANCED Java TRAINING www.webliquids.com ABOUT US Who we are: WebLiquids is an ISO (9001:2008), Google, Microsoft Certified Advanced Web Educational Training Organisation.

More information

Integrating Servlets and JavaServer Pages Lecture 13

Integrating Servlets and JavaServer Pages Lecture 13 Integrating Servlets and JavaServer Pages Lecture 13 Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet and JSP Training Courses: courses.coreservlets.com 1 Slides Marty Hall,

More information

Courses For Event Java Advanced Summer Training 2018

Courses For Event Java Advanced Summer Training 2018 Courses For Event Java Advanced Summer Training 2018 Java Fundamentals Oracle Java SE 8 Advanced Java Training Java Advanced Expert Edition Topics For Java Fundamentals Variables Data Types Operators Part

More information

Oracle 1z Java Enterprise Edition 5 Web Component Developer Certified Professional Exam. Practice Test. Version:

Oracle 1z Java Enterprise Edition 5 Web Component Developer Certified Professional Exam. Practice Test. Version: Oracle 1z0-858 Java Enterprise Edition 5 Web Component Developer Certified Professional Exam Practice Test Version: 14.21 QUESTION NO: 1 To take advantage of the capabilities of modern browsers that use

More information

JSP: Servlets Turned Inside Out

JSP: Servlets Turned Inside Out Chapter 19 JSP: Servlets Turned Inside Out In our last chapter, the BudgetPro servlet example spent a lot of code generating the HTML output for the servlet to send back to the browser. If you want to

More information

Call us: /

Call us: / JAVA J2EE Developer Course Content Malleswaram office Address: - #19, MN Complex, 2 nd Floor, 2 nd Cross, Sampige Main Road, Malleswaram, Bangalore 560003. Land Mark: Opp. JOYALUKKAS Gold Show Room. Jayanagar

More information

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1 Umair Javed 2004 J2EE Based Distributed Application Architecture Overview Lecture - 2 Distributed Software Systems Development Why J2EE? Vision of J2EE An open standard Umbrella for anything Java-related

More information

sessionx Desarrollo de Aplicaciones en Red EL (2) EL (1) Implicit objects in EL Literals José Rafael Rojano Cáceres

sessionx Desarrollo de Aplicaciones en Red EL (2) EL (1) Implicit objects in EL Literals José Rafael Rojano Cáceres sessionx Desarrollo de Aplicaciones en Red José Rafael Rojano Cáceres http://www.uv.mx/rrojano EL Expression Language Write the code in something else, just let EL call it. EL () EL stand for Expression

More information

XML and XSLT. XML and XSLT 10 February

XML and XSLT. XML and XSLT 10 February XML and XSLT XML (Extensible Markup Language) has the following features. Not used to generate layout but to describe data. Uses tags to describe different items just as HTML, No predefined tags, just

More information

Welcome To PhillyJUG. 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation

Welcome To PhillyJUG. 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation Welcome To PhillyJUG 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation Web Development With The Struts API Tom Janofsky Outline Background

More information

11.1 Introduction to Servlets

11.1 Introduction to Servlets 11.1 Introduction to Servlets - A servlet is a Java object that responds to HTTP requests and is executed on a Web server - Servlets are managed by the servlet container, or servlet engine - Servlets are

More information