COMP9321 Web Application Engineering
|
|
- Anna Kennedy
- 5 years ago
- Views:
Transcription
1 COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1
2 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. 2
3 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");} 3
4 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> 4
5 JavaServer Pages (JSP) Technology JavaServer Pages (JSP) technology allows you to easily create web content that has both static and dynamic components. JSP technology makes available all the dynamic capabilities of Java Servlet technology; but provides a more natural approach to creating static content. JSPissimilartoPHP,butitusestheJavaprogramming language. To deploy and run JavaServer Pages, a compatible web server with a servlet container, such as Apache Tomcat, is required. 5
6 Main Features of JSP technology A language for developing JSP pages, which are 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; 6
7 JSP Page A JSP page is a text document that contains two types of text: 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. 7
8 JSP Page Kinds of tags: <%= %> 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" %> 8
9 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> 9
10 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> 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 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> 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 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>"); 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 name="hello" property="name" value='<%= request.getparameter <jsp:usebean ("name") >%> /> <jsp:setproperty is a standard element name="hello" that creates property=" " an object containing a collection of 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. JavaBeans = hello.get (); are classes that encapsulate many objects into a single 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> 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 ("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> 14
15 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. 15
16 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. 16
17 JSP 17
18 JSP 18
19 JSP 19
20 Let us Revisit the WelcomeServlet 20
21 Here is equivalent in JSP (welcome.jsp) 21
22 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> 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 Elements: JSP directives 24
25 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> 25
26 JSP Elements: JSP Scripting (expression) 26
27 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> 27
28 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'. 28
29 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> 29
30 JSP Elements: JSP Scripting (scriptlet) The following three examples, generate the same output 30
31 JSP Elements: JSP Scripting (scriptlet) Example, setting the background of a page (CoreServlet p.334) 31
32 JSP Elements: JSP Scripting (scriptlet) You can also use the scriptlet to conditionally generate HTML. 32
33 JSP Elements: JSP Scripting (comment) 33
34 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
35 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> 35
36 JSP Elements: JSP Actions (HeadFirst) p
37 JSP Elements: JSP Actions (include) 37
38 jsp:include vs. include directive (CoreServlet p.380) 38
39 JSP Elements: JSP Actions (forward) 39
40 JSP Elements: JSP Actions (usebean) 40
41 JSP Elements: JSP Actions (usebean) 41
42 JSP Elements: JSP Actions (usebean) 42
43 JSP Elements: JSP Actions (usebean) Sharing Beans: using scope attribute 43
44 JSP Elements: JSP Actions (usebean) Sharing Beans: using scope attribute 44
45 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> 45
46 Expression Language (EL) in JSP 46
47 Expression Language (EL) in JSP 47
48 Expression Language (EL) in JSP Towards Script-less JSP 48
49 Expression Language (EL) in JSP (HeadFIrst) p
50 Expression Language (EL) in JSP 50
51 EL Basics: Accessing Scoped Variables 51
52 EL Basics: Accessing Scoped Variables 52
53 EL Basics: Using dot vs. Using [ ] operator 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: EL Implicit Objects 59
60 EL Basics: EL Implicit Objects 60
61 EL Basics: EL Implicit Objects 61
62 EL Basics: EL Operators 62
63 JSP Standard Tag Library (JSTL) 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 JSTL Basics: Looping collections 68
69 JSTL Basics: Looping collections 69
70 JSTL Basics: Looping collections 70
71 JSTL Basics: Conditional output 71
72 JSTL Basics: Conditional output
73 JSTL Basics: Using <c:set> 73
74 JSTL Basics: Using <c:set> 74
75 JSTL Basics: Working with URL 75
76 Other things available in JSTL 76
77 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> 77
78 JSP Custom Tags 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 84
85 85
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 information20/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 informationMore 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 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 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 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 informationFirst 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 informationJava Server Pages. Copyright , Xiaoping Jia. 7-01/54
Java Server Pages What is Java Server Pages (JSP)? HTML or XML pages with embedded Java code to generate dynamic contents. a text-based document that describes how to process a request and to generate
More informationJAVA. Web applications Servlets, JSP
JAVA Web applications Servlets, JSP Overview most of current web pages are dynamic technologies and laguages CGI, PHP, ASP,... now we do not talk about client side dynamism (AJAX,..) core Java-based technologies
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 informationUsing Java servlets to generate dynamic WAP content
C H A P T E R 2 4 Using Java servlets to generate dynamic WAP content 24.1 Generating dynamic WAP content 380 24.2 The role of the servlet 381 24.3 Generating output to WAP clients 382 24.4 Invoking a
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 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. 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 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 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 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 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 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 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 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 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 informationChapter 10 Servlets and Java Server Pages
Chapter 10 Servlets and Java Server Pages 10.1 Overview of Servlets A servlet is a Java class designed to be run in the context of a special servlet container An instance of the servlet class is instantiated
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 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 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 informationSession 8. Introduction to Servlets. Semester Project
Session 8 Introduction to Servlets 1 Semester Project Reverse engineer a version of the Oracle site You will be validating form fields with Ajax calls to a server You will use multiple formats for the
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 information/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 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 informationServlets by Example. Joe Howse 7 June 2011
Servlets by Example Joe Howse 7 June 2011 What is a servlet? A servlet is a Java application that receives HTTP requests as input and generates HTTP responses as output. As the name implies, it runs on
More information