COMP9321 Web Application Engineering
|
|
- Augustine Chase
- 6 years ago
- Views:
Transcription
1 COMP9321 Web Application Engineering Java Server Pages (JSP) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 3 1
2 Acknowledgement/Contributions Service Oriented Computing Group, CSE, UNSW Australia Dr. Helen Paik Prof. Boualem Bentallah Dr. Srikumar Venugopal Dr. Moshe Chai Barukh Dr. Amin Beheshti Dr. Basem Suleiman Many others from service oriented computing group 2
3 Review: Java Servlets The Request: <html> <head><title> Form</title></head> <body> <h3>enter your name and address. <br />Then click the Send button to send the data to the server.</h3> <form method = "get" action=" <p><input type = "text" name = "name" value = "" size = 30 /> Name </p> <p><input type = "text" name = " " value = "" size = 30 /> Address </p> <p><input type= "submit" value="send" /></p> </form> </body> </html> Servlet processes a request from a web page. It responds to the request by echoing back the name and address that was sent in. 3
4 The Servlet: Review: Java Servlets package echo; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Servlet extends HttpServlet { protected void doget (HttpServletRequest request, HttpServletResponse response) { try{ response.setcontenttype ("text/html"); PrintWriter out = response.getwriter (); String name = request.getparameter ("name"); String = request.getparameter (" "); } out.println ("<html><body>"); out.println ("<h3>hello.</h3>"); out.println ("<h3>" + name+ "</h3>"); out.println ("<h3>your address is " + + "</h3>"); out.println ("</body></html>"); }catch (IOException e) {System.out.println ("Servlet Exception");} 4
5 Review: Java Servlets Deployment Descriptor : web.xml <?xml version="1.0" encoding="iso "?> <web-app> <servlet> <servlet-name> servlet</servlet-name> <servlet-class>echo. servlet</servlet-class> </servlet> <servlet-mapping> <servlet-name> servlet</servlet-name> <url-pattern>/servlet/echo. servlet</url-pattern> </servlet-mapping> </web-app> 5
6 JavaServer Pages (JSP) Technology JavaServer Pages (JSP) is a server-side development technology that enables the creation of web content (both static and dynamic components) JSP makes available all the dynamic capabilities of Java Servlet technology; but provides a more natural approach to creating static content JSP is similar to PHP, but it uses the Java programming language To deploy and run JavaServer Pages, a compatible web server with a servlet container, such as Apache Tomcat, is required 6
7 Main Features of JSP technology A language for developing JSP pages; text-based documents that describe how to process a request and construct a response; An Expression Language (EL) for accessing server-side objects; Mechanisms for defining extensions to the JSP language; Platform independent, and an integral part of Java EE JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP also has access to all the powerful Enterprise Java APIs, including JDBC, JNDI, EJB It can be used in combination with servlets to handle the business logic Performance is significantly better because JSP allows embedding Dynamic Elements in HTML Pages itself instead of having a separate CGI files 7
8 JSP Page A JSP page is a text document that consists of: Static data: o which can be expressed in any text-based format (such as HTML, SVG, WML, and XML); JSP elements: o which construct dynamic content; o The recommended file extension for the source file of a JSP page is.jsp. o The recommended extension for the source file of a fragment of a JSP page is.jspf. 8
9 JSP Directives General format directive attribute="value" %> <%= %> is used for expressions e.g. <%= request.getparameter (" ") %> <%! %> is used for declarations. e.g. <%! String name, ; %> <% %> is used for straight Java code. e.g. <% if (x > 5) { %> <%@ %> is used to include another file such as an HTML file or a package such as java.sql.*. e.g. <%@ page contenttype="text/html; charset=utf-8" %> e.g. <%@ taglib uri=" " prefix="c" %> 9
10 JSP Example The Request: <html> <body> <h3>enter your name and address: </h3> <form method="get" action="hello.jsp"> <p><input type="text" name="name" value="" size="20"/> Name </p> <p><input type="text" name=" " value="" size="20"/> </p> <p><input type="submit" name="send" value="send"/> </p> </form> </body> </html> 10
11 JSP Example JSP File: page contenttype="text/html; charset=utf-8" %> taglib uri=" " %> <html> <body> <%! String name, ; %> <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty name="hello" property="name" value='<%= request.getparameter ("name") %> /> <jsp:setproperty name="hello" property=" " value= <%= request.getparameter (" ") %> /> <% name = hello.getname(); = hello.get (); out.println ("<h3>hello, your name is " + name); out.println (" and your address is " + + ".</h3>"); %> </body></html> 11
12 JSP Example JSP File: page contenttype="text/html; charset=utf-8" %> taglib uri=" " %> <html> <body> <%! String name, ; %> %> <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty page directive. name="hello" property="name" value='<%= request.getparameter ("name") %> /> <jsp:setproperty sets the name="hello" content type property=" " returned by the page. value= <%= request.getparameter (" ") %> /> <% name = hello.getname(); = hello.get (); out.println ("<h3>hello, your name is " + name); out.println (" and your address is " + + ".</h3>"); %> </body></html> 12
13 JSP Example JSP File: page contenttype="text/html; charset=utf-8" %> taglib uri=" " %> <html> <body> <%! String name, ; %> %> <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty Tag library name="hello" directives. property="name" value='<%= import request.getparameter custom tag libraries. ("name") %> /> <jsp:setproperty name="hello" property=" " JavaServer value= <%= Pages request.getparameter Standard Tag Library (" ") (JSTL): %> /> <% JSTL extends the JSP specification by adding a tag library name = hello.getname(); of JSP tags for common tasks, such as conditional %> </body></html> = hello.get (); execution, loops, and database access. out.println ("<h3>hello, your name is " + name); out.println (" and your address is " + + ".</h3>"); 13
14 JSP Example JSP File: page contenttype="text/html; charset=utf-8" %> taglib uri=" " %> <html> <body> <%! String name, ; %> <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty name="hello" property="name" value='<%= request.getparameter <jsp:usebean ("name") >%> /> <jsp:setproperty name="hello" property=" " locales value= <%= and initializes request.getparameter an identifier that (" ") points %> to that /> object. <% name is used = hello.getname(); to locate or instantiate a bean class. = hello.get (); out.println ("<h3>hello, your name is " + name); object (the bean). out.println (" and your address is " + + ".</h3>"); %> Each JavaServer page can be associated with a Java bean. </body></html> is a standard element that creates an object containing a collection of JavaBeans are classes that encapsulate many objects into a single 14
15 JSP Example JSP File: page contenttype="text/html; charset=utf-8" %> taglib uri=" " %> <html> <body> <%! String name, ; %> <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty name="hello" property="name" value='<%= request.getparameter ("name") %> /> <jsp:setproperty name="hello" <jsp:setproperty property=" " > value= <%= request.getparameter (" ") %> /> is a standard element that sets the value of an object property. <% name = hello.getname(); = hello.get (); out.println ("<h3>hello, your name is " + name); out.println (" and your address is " + + ".</h3>"); %> </body></html> 15
16 JSP Example JSP File: Some page reserved contenttype="text/html; words (JSP charset=utf-8" Objects): %> taglib uri=" " %> <html> request an instance of HttpServletRequest. <body> response an instance of HttpServletResponse. <%! String name, ; %> out a PrintWriter object for the response. <jsp:usebean id="hello" scope="session" class="greetings.hellobean" /> <jsp:setproperty name="hello" property="name" application value='<%= request.getparameter an instance of ServletContext ("name") %> /> <jsp:setproperty name="hello" property=" " value= <%= request.getparameter (" ") %> /> <% name = hello.getname(); = hello.get (); out.println ("<h3>hello, your name is " + name); out.println (" and your address is " + + ".</h3>"); %> </body></html> session the HttpSession object associated with the session. 16
17 JSP Example The Bean: public class HelloBean { private String name = ""; private String = ""; public String getname() {return name;} public String get () {return ;} public void setname (String n) {name = n;} public void set (String e) { = e;} } // HelloBean Each Java server page is associated with a Java bean. These are Java programs and reside on the server. o The constructor has no parameters o All variables have accessor (get) and mutator (set) methods. 17
18 JSP Lifecycle 18
19 Processing JSP Files 19
20 JSP Parsing and Compilation 20
21 Let us Revisit the WelcomeServlet 21
22 Here is equivalent in JSP (welcome.jsp) 22
23 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 23
24 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 24
25 JSP Elements: JSP directives 25
26 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 26
27 JSP Elements: JSP Scripting (expression) 27
28 JSP Elements: Using the implicit objects request: the HttpServletRequest object response: the HttpServletResponse object session: the HttpSession object associated with the request out: the Writer object config: the ServletCong object application: the ServletContext object Example: <html><body> <h2>jsp expressions</h2> <ul> <li>current time is: <%= new java.util.date() %> <li>server Info: <%= application.getserverinfo() %> <li>servlet Init Info: <%= config.getinitparameter("webmaster") %> <li>this Session ID: <%= session.getid() %> <li>the value of <code>testparam</code> is: <%= request.getparameter("testparam") %> </ul> </body></html> 28
29 JSP Elements: JSP Scripting (scriptlet) JSP scriptlet, are inserted verbatim into the translated servlet code. The scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language. Within a scriptlet, you can do any of the following: Declare variables or methods to use later in the JSP page. Write expressions valid in the page scripting language. Use any of the implicit objects or any object declared with a <jsp:usebean> element. Write any other statement valid in the scripting language used in the JSP page. Remember that JSP expressions contain `(string) values', but JSP scriptlets contain `Java statements'. 29
30 Example: JSP Elements: JSP Scripting (scriptlet) <HTML> <BODY> <% // This scriptlet declares and initializes "date" java.util.date date = new java.util.date(); %> Hello! The time is: <% out.println( date ); out.println( "<BR>Your machine's address is: " ); out.println( request.getremotehost()); %> </BODY> </HTML> 30
31 JSP Elements: JSP Scripting (scriptlet) The following three examples, generate the same output 31
32 JSP Elements: JSP Scripting (scriptlet) Example, setting the background of a page (CoreServlet p.334) 32
33 JSP Elements: JSP Scripting (scriptlet) You can also use the scriptlet to conditionally generate HTML. 33
34 JSP Elements: JSP Scripting (comment) 34
35 Attributes in a JSP Recall from last week. Request attributes and RequestDispatcher: We use request attributes when we want some other component of the application take over all or part of your request. (HeadFirst) p
36 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 36
37 JSP Elements: JSP Actions (HeadFirst) p
38 JSP Elements: JSP Actions (include) 38
39 jsp:include vs. include directive (CoreServlet p.380) 39
40 JSP Elements: JSP Actions (forward) 40
41 JSP Elements: JSP Actions (usebean) 41
42 JSP Elements: JSP Actions (usebean) 42
43 JSP Elements: JSP Actions (usebean) 43
44 JSP Elements: JSP Actions (usebean) Sharing Beans: using scope attribute 44
45 JSP Elements: JSP Actions (usebean) Sharing Beans: using scope attribute 45
46 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 46
47 Expression Language (EL) in JSP 47
48 Expression Language (EL) in JSP 48
49 Expression Language (EL) in JSP Towards Script-less JSP 49
50 Expression Language (EL) in JSP (HeadFIrst) p
51 Expression Language (EL) in JSP 51
52 EL Basics: Accessing Scoped Variables 52
53 EL Basics: Accessing Scoped Variables 53
54 EL Basics: Using dot vs. Using [ ] operator 54
55 EL Basics: Using dot vs. Using [ ] operator 55
56 EL Basics: Using dot vs. Using [ ] operator 56
57 EL Basics: Using dot vs. Using [ ] operator 57
58 EL Basics: Using dot vs. Using [ ] operator 58
59 EL Basics: Using dot vs. Using [ ] operator 59
60 EL Basics: EL Implicit Objects 60
61 EL Basics: EL Implicit Objects 61
62 EL Basics: EL Implicit Objects 62
63 EL Basics: EL Operators 63
64 JSP Standard Tag Library (JSTL) 64
65 JSP Standard Tag Library (JSTL) 65
66 JSP Standard Tag Library (JSTL) 66
67 JSP Standard Tag Library (JSTL) 67
68 JSP Standard Tag Library (JSTL) 68
69 JSTL Basics: Looping collections 69
70 JSTL Basics: Looping collections 70
71 JSTL Basics: Looping collections 71
72 JSTL Basics: Conditional output 72
73 JSTL Basics: Conditional output
74 JSTL Basics: Using <c:set> 74
75 JSTL Basics: Using <c:set> 75
76 JSTL Basics: Working with URL 76
77 Other things available in JSTL 77
78 JSP Basics Scripting Elements Traditional Modern Scriptlet Expression Declaration Comments EL Scripting ${ } JSP Page JSP Elements Directive Elements Page Include Taglib Action Elements Template Text (HTML bits ) custom Standard <abc:mytag> <jsp:usebean> <jsp:getproperty> <jsp:setproperty> <jsp:include> <jsp:forward> <jsp:param> 78
79 JSP Custom Tags 79
80 JSP Custom Tags 80
81 JSP Custom Tags 81
82 JSP Custom Tags 82
83 JSP Custom Tags 83
84 JSP Custom Tags 84
85 JSP 85
86 Servlet Exercise Lab Exercises (Week 4) Environment and project Configurations Deployment of Servlet examples (week 2 and 3) Implement a servlet that displays current time Journey Exercise The Servlet Version The Simple JSP Version JSP with EL + JSTL Extensions (Journey destinations: LocationBean) 86
87 Message Board 87
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 informationCOMP9321 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 informationJavaServer 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 informationJavaServer Pages. What is JavaServer Pages?
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
More informationFast 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 informationIntroduction 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 informationCSc31800: 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 informationJava 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 informationServlets1. What are Servlets? Where are they? Their job. Servlet container. Only Http?
What are Servlets? Servlets1 Fatemeh Abbasinejad abbasine@cs.ucdavis.edu A program that runs on a web server acting as middle layer between requests coming from a web browser and databases or applications
More informationCE212 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 information112. 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 informationJava Enterprise Edition. Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 1
Java Enterprise Edition Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 1 Java Beans Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 2 Java Bean POJO class : private Attributes public
More informationFast 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 informationJSP. 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 information112-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 informationCOMP9321 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 informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Design Patterns II Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 7 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442
More informationCOMP9321 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 informationa. 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 informationUniversité 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 informationAdvance 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 informationThis 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 informationJSP - 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 informationPrinciples 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 informationJSP (Java Server Page)
JSP (Java Server Page) http://www.jsptut.com/ http://www.jpgtutorials.com/introduction-to-javaserver-pages-jsp Lab JSP JSP simply puts Java inside HTML pages. Hello!
More informationJava 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 informationDatabase Systems Lab. 11. JSP I 충남대학교컴퓨터공학과 데이타베이스시스템연구실
데이타베이스시스템연구실 Database Systems Lab. 11. JSP I 충남대학교컴퓨터공학과 데이타베이스시스템연구실 Overview http://www.tutorialspoint.com/jsp/index.htm What is JavaServer Pages? JavaServer Pages (JSP) is a server-side programming
More informationContents 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 informationA 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 informationIntroduction 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 informationPSD1B 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 informationJSP 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 informationUnit 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 informationCSC309: Introduction to Web Programming. Lecture 10
CSC309: Introduction to Web Programming Lecture 10 Wael Aboulsaadat WebServer - WebApp Communication 2. Servlets Web Browser Get servlet/serv1? key1=val1&key2=val2 Web Server Servlet Engine WebApp1 serv1
More informationADVANCED 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 informationCSC309: Introduction to Web Programming. Lecture 11
CSC309: Introduction to Web Programming Lecture 11 Wael Aboulsaadat Servlets+JSP Model 2 Architecture 2 Servlets+JSP Model 2 Architecture = MVC Design Pattern 3 Servlets+JSP Model 2 Architecture Controller
More informationWeb 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 informationWeb Programming. Lecture 11. University of Toronto
CSC309: Introduction to Web Programming Lecture 11 Wael Aboulsaadat University of Toronto Servlets+JSP Model 2 Architecture University of Toronto 2 Servlets+JSP Model 2 Architecture = MVC Design Pattern
More informationBasic 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 informationA.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 informationWriting Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.
Preface p. xiii Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p. 11 Creating the Deployment Descriptor p. 14 Deploying Servlets
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Wrap-up Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 12 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442
More informationIntroduction. This course Software Architecture with Java will discuss the following topics:
Introduction This course Software Architecture with Java will discuss the following topics: Java servlets Java Server Pages (JSP s) Java Beans JDBC, connections to RDBMS and SQL XML and XML translations
More informationIslamic 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 informationServlet 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 informationIntroduction. Literature: Steelman & Murach, Murach s Java Servlets and JSP. Mike Murach & Associates Inc, 2003
Introduction This course Software Architecture with Java will discuss the following topics: Java servlets Java Server Pages (JSP s) Java Beans JDBC, connections to RDBMS and SQL XML and XML translations
More informationAdvanced 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 informationJAVA 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 informationServlets. An extension of a web server runs inside a servlet container
Servlets What is a servlet? An extension of a web server runs inside a servlet container A Java class derived from the HttpServlet class A controller in webapplications captures requests can forward requests
More informationComponent 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 informationdirective 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 informationJSP 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 informationADVANCED 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 informationTable 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 information01KPS 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 informationJAVA SERVLET. Server-side Programming INTRODUCTION
JAVA SERVLET Server-side Programming INTRODUCTION 1 AGENDA Introduction Java Servlet Web/Application Server Servlet Life Cycle Web Application Life Cycle Servlet API Writing Servlet Program Summary 2 INTRODUCTION
More informationAN 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 informationJSP source code runs on the web server via JSP Servlet Engine. JSP files are HTML files with special Tags
JSP : Java Server Pages It is a server side scripting language. JSP are normal HTML with Java code pieces embedded in them. A JSP compiler is used to generate a Servlet from the JSP page. JavaServer Pages
More informationJava 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 informationServlets and JSP (Java Server Pages)
Servlets and JSP (Java Server Pages) XML HTTP CGI Web usability Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Servlets Generic Java2EE API for invoking and connecting to mini-servers (lightweight,
More information2. Follow the installation directions and install the server on ccc. 3. We will call the root of your installation as $TOMCAT_DIR
Installing a Web Server 1. Install a sample web server, which supports Servlets/JSPs. A light weight web server is Apache Tomcat server. You can get the server from http://tomcat.apache.org/ 2. Follow
More informationLearningPatterns, Inc. Courseware Student Guide
Fast Track to Servlets and JSP Developer's Workshop LearningPatterns, Inc. Courseware Student Guide This material is copyrighted by LearningPatterns Inc. This content shall not be reproduced, edited, or
More informationTrabalhando 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 informationCOMP201 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 informationJava 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 informationPeers 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 informationJSP 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 informationDVS 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 informationEnterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets
ID2212 Network Programming with Java Lecture 10 Enterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets Leif Lindbäck, Vladimir Vlassov KTH/ICT/SCS HT 2015
More informationServlet Basics. Agenda
Servlet Basics 1 Agenda The basic structure of servlets A simple servlet that generates plain text A servlet that generates HTML Servlets and packages Some utilities that help build HTML The servlet life
More informationCS506 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 informationAbout 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 informationModule 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 informationScope 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 informationCall 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 informationPES 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 informationChapter 2 How to structure a web application with the MVC pattern
Chapter 2 How to structure a web application with the MVC pattern Murach's Java Servlets/JSP (3rd Ed.), C2 2014, Mike Murach & Associates, Inc. Slide 1 Objectives Knowledge 1. Describe the Model 1 pattern.
More informationJava- EE Web Application Development with Enterprise JavaBeans and Web Services
Java- EE Web Application Development with Enterprise JavaBeans and Web Services Duration:60 HOURS Price: INR 8000 SAVE NOW! INR 7000 until December 1, 2011 Students Will Learn How to write Session, Message-Driven
More informationModule 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 informationIntegrating 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 informationINTRODUCTION TO SERVLETS AND WEB CONTAINERS. Actions in Accord with All the Laws of Nature
INTRODUCTION TO SERVLETS AND WEB CONTAINERS Actions in Accord with All the Laws of Nature Web server vs web container Most commercial web applications use Apache proven architecture and free license. Tomcat
More informationA 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 informationGUJARAT 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 informationJ2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.
J2EE Development Detail: Audience www.peaksolutions.com/ittraining Java developers, web page designers and other professionals that will be designing, developing and implementing web applications using
More informationJava 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 informationTrabalhando 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 informationServlet Fudamentals. Celsina Bignoli
Servlet Fudamentals Celsina Bignoli bignolic@smccd.net What can you build with Servlets? Search Engines E-Commerce Applications Shopping Carts Product Catalogs Intranet Applications Groupware Applications:
More informationSECTION I: JAVA SERVLETS AND JAVA SERVER PAGES
Chapter 4 SECTION I: JAVA SERVLETS AND JAVA SERVER PAGES Introduction To Java Server Pages Since modern enterprise applications are moving from two-tier towards three-tier and N-tier architectures, there
More information1. 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 informationSSC - Web applications and development Introduction and Java Servlet (I)
SSC - Web applications and development Introduction and Java Servlet (I) Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics What will we learn
More informationOracle 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 informationAdvanced Web Technology
Berne University of Applied Sciences Dr. E. Benoist Winter Term 2005-2006 Presentation 1 Presentation of the Course Part Java and the Web Servlet JSP and JSP Deployment The Model View Controler (Java Server
More informationCh04 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 informationJSP - 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 informationHow to structure a web application with the MVC pattern
Objectives Chapter 2 How to structure a web application with the MVC pattern Knowledge 1. Describe the Model 1 pattern. 2. Describe the Model 2 (MVC) pattern 3. Explain how the MVC pattern can improve
More informationLTBP 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 informationUnit 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 information1.264 Lecture 15. Web development environments: JavaScript Java applets, servlets Java (J2EE) Active Server Pages
1.264 Lecture 15 Web development environments: JavaScript Java applets, servlets Java (J2EE) Active Server Pages Development environments XML, WSDL are documents SOAP is HTTP extension UDDI is a directory/registry
More informationModel View Controller (MVC)
Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 11 Model View Controller (MVC) El-masry May, 2014 Objectives To be
More informationStateless -Session Bean
Stateless -Session Bean Prepared by: A.Saleem Raja MCA.,M.Phil.,(M.Tech) Lecturer/MCA Chettinad College of Engineering and Technology-Karur E-Mail: asaleemrajasec@gmail.com Creating an Enterprise Application
More information