Web Fundamentals. Typical Current Web Architecture. Web Server HTTP interface. HTML, Images, cookies, JSON, etc.

Size: px
Start display at page:

Download "Web Fundamentals. Typical Current Web Architecture. Web Server HTTP interface. HTML, Images, cookies, JSON, etc."

Transcription

1 Web Fundamentals 1 Typical Current Web Architecture Web Container Browser HTML, CSS, MIME Type Display URL / Query string / HTTP data, cookies, etc. HTML, Images, cookies, JSON, etc. Web Server HTTP interface req res Application Server Servlet handler WWW resources, each named with a URL WWW data classes, each with a type Standard content formats (e.g., HTML) Standard network protocols connecting any browser with any server Persistence Layer Database 2 2/19/2018 1

2 Server Scripting Web Architecture Clients servlet Web Container Bean Session JSP Page JSP Page Bean Other shared objects Web applications are usually constructed with the Model, View, Controller pattern 3 Client Scripting Web Architecture Clients Web Container 1 or more servlets Session Other shared objects JavaScript objects are returned to the client, and JavaScript code is used to update the page 4 2/19/2018 2

3 Server Scripting Vs. Client Scripting Server scripting advantages Protecting intellectual property Server side libraries and APIs Robust development environments Client scripting advantages More intuitive programming Much better fit with Ajax technology 5 Http HyperText Transfer Protocol defines communications between a browser and a server Defined in 2 specs (http 1.0 and http 1.1) Defines: Types of messages exchanged (request and response) Syntax of the messages Semantics of the message content Rules for determining how and when a process sends and responds to a message 6 2/19/2018 3

4 Http Hypertext Transfer Protocol Primary Web application layer protocol uses TCP Implemented as Client program in browser (request message formatting) Server program in Web server (parsing the request method and preparing the response message) Http defines the structure of messages sent between the client and the server Http Http Web server 7 Http Protocol HTTP is a request/response (stateless) protocol A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content The server responds with a status line, including the message's protocol version and a success (or error) code, followed by a MIME-like message containing server information, entity meta-information, and possible entity-body content. 8 2/19/2018 4

5 Request Message Format The http request is specified by the request line, a variable number of header fields, and the entity body method sp URL sp Version cr lf header field name sp value cr lf header field name sp value cr lf header field name sp value cr lf cr lf request line header lines Entity body 9 Http Methods OPTIONS request for information concerning communications options (e.g., support of http 1.1) GET retrieve information HEAD identical to GET, except the server does not return a message body POST modify a server resource PUT store the enclosed entity DELETE request that the resource be deleted TRACE response contains the entire message request in the response body CONNECT used in SSL tunneling 10 2/19/2018 5

6 Http Request From Browser Request line contains the method, URL, and http version Header lines contain http data For the POST method, the form data set is transmitted in the Http entity body, not in the URL 11 Http Response From Server Status line contains version, code and code text Response Mime type Http header info 12 2/19/2018 6

7 Http Request Message Http messages (other than the body) are written in ASCII text Http request messages consist of: Request line (method, URL, version) Header lines (connection, user-agent, accept-language, etc) Entity body Not used for GET requests Used for uploading files (as in WDG HTML validator) 13 Http Request Headers Accept Accept-charset Accept-encoding Accept-language Authorization Cache-control Connection Content-length Content-type Cookie Expect From Host If-match If-modified-since If-none-match If-range If-unmodified-since Pragma Proxy-authorization Range Referer Upgrade User-agent Via 14 2/19/2018 7

8 Http Response Message Http response messages consist of: Status line (protocol version, status code, status message) Header lines (date, server, last-modified, content-length, content-type) Entity body 15 Http Status Codes Examples: 200 OK 100 Continue 404 Not found You will see this code in your browser if the Web Application cannot find your servlet 16 2/19/2018 8

9 Http Response Headers Accept-Ranges Age Allow Cache-Control Connection Content-Encoding Content-Language Content-Length Content-MD5 Content-Type Date Etag Expires Last-Modified Location Refresh Server Set-Cookie Via Warning 17 Typical Client/Server Interaction Clients Web Container HTTP 1 or more servlets Session Other shared objects For client side scripting, JavaScript objects (JSON) are returned to the client, for server side scripting, html is usually returned 18 2/19/2018 9

10 What is a Servlet? A Java class that can be loaded dynamically to expand the capability of the Web server Runs inside the Java Virtual Machine on the server (safe and portable) Tools (e.g., Spring) usually implement a single servlet to respond to user requests 19 Hello WWW Servlet Class package lectures; import java.io.*;import java.net.*;import javax.servlet.*; import javax.servlet.http.*; processrequest is a method used by convention in NetBeans public class HelloWWW extends HttpServlet { protected void processrequest(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doget(httpservletrequest request, HttpServletResponse response) The Web container calls either doget or dopost, which then calls processrequest throws ServletException, IOException { processrequest(request, response); } protected void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { processrequest(request, response); } 20 2/19/

11 Web Application Your Web application is stored in a directory (and deployed as a war file) Top level directory of the Web application is the document root of the application, containing JSP pages and static Web resources (or subdirectories of JSP, etc.) Document root contains a sub-directory called WEB-INF, containing web.xml the deployment descriptor classes a directory containing server classes (e.g., servlets) lib a directory that contains JAR archives of libraries Package directories can be either in the document root or the WEB-INF/classes directory Take a look at your Web App in your NetBeans or Eclipse project pane 21 How to Specify the Servlet in Your HTML A URL is used to request that the container run your servlet (in an anchor tag or form tag) URL contains the host name, port (optional), and path In a servlet container, the path can be mapped (what you see is not always what you get) There is no hellowww file 22 2/19/

12 How URLs Run Servlets Context name The servlet container evaluates the URL request to see if the first part of the path matches a context name If the path matches a context name, the context name is mapped to a Web application root directory (using the web.xml deployment descriptor) 23 JavaServer Page (JSP) Used to rapidly create dynamically-generated Web pages Separates web presentation from Web page content (and allows for differing programming skills to work on a project) A JSP is: A text-based document (filename extension of.jsp) that processes a request and constructs a response Translated into a servlet 24 2/19/

13 Servlet Vs. JSP JSP (helloworld.jsp) <!DOCTYPE HTML PUBLIC "- //W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>hello WWW</title> </head> <body> <h1>hello WWW</h1> </body> </html> Which one (servlet or JSP) is easier to read and write? Servlet (HelloWorld.java) public class HelloWorld extends HttpServlet { public void doget( HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setcontenttype( "text/html"); PrintWriter out = response.getwriter(); String doctype = "<!DOCTYPE HTML PUBLIC \"- //W3C//DTD HTML 4.0 " + "Transitional//EN\">\n"; out.println(doctype); out.println("<html>"); out.println("<head><title> Hello WWW</title></head>"); out.println("<body>"); out.println( "<h1>hello WWW</h1>"); out.println("</body></html>")}} 25 JSP Translation The Web container translates the JSP into the equivalent servlet (and compiles it into a servlet class) Can include any MyJSP.jsp static text MyJSP_jsp.java (e.g., XML) html EL scriptlets JSP elements Translation Generated code is placed in a GlassFish sub-directory and available on a NetBeans context menu Java code 26 2/19/

14 EL in a Nutshell EL (Expression Language) Resembles Java (but a little different and, of course, much simpler) EL expressions can be used in static text and in any standard or custom tag attribute that can accept an expression Fully supported with JSP 2.0 Extended in JSP 2.1 Syntax ${ } The value of an expression in static text is computed and inserted into the current output The EL expression is contained within the brackets 27 Example... <p>the counter is initially: ${b.count} </p> How does EL find the bean? How does EL get the value of count? 28 2/19/

15 Abstracting Control Logic from a JSP Clients Web layer Data sources servlet JSP Page JSP Page Bean JSTL Tag Custom Tag XML JDBC EJB 29 Example Form Debug JSP <%@ taglib uri=" prefix="c" %> <html> <head> <title>formtester</title> <link rel="stylesheet" type="text/css href=" </head> <body> <h2>testing the Input Form</h2> <table> <tr> <th>parameter Name</th> <th>parameter Value</th></tr> <c:foreach var="p" items="${param}"> <tr> <td> <c:out value="${p.key}"/> </td> <td> <c:out value="${p.value}"/> </td> </tr> </c:foreach> </table> </body> </html> EL expression Declares the JSTL core tag library Variable is a named reference to an object (explicit or implicit) 30 2/19/

16 When Do You Need to Share Data on the Server? Among servlets cooperating on an application Among servlets cooperating to satisfy the requests from a single user (e.g., shopping cart) Usually on the same workstation and browser Remember that a Cloud application usually involves multiple simultaneous users in which some data is shared and some data is kept private from other users access 31 Shared Scopes Web components share information through private objects (e.g., JavaBeans components). Attributes of a public scope Database Invoking other web resources Shared scopes setattribute and getattribute ServletContext Session Request Page 32 2/19/

17 How Do The Shared Scopes Differ? Visibility Different browsers Different computers Lifetime ServletContext life of the container Request Duration of the request Session until timeout or destroy Page life of the servlet invocation Visibility and lifetime define the scope of the object 33 Server Side Storage request Web Container Servlet 1 Servlet 2 Server object Servlet 3 Data stored on the server is usually contained in an object visible to the servlet To access the shared object, you need to obtain a reference (handle) to the object Objects for sharing ServletContext is the object that acts like HttpServletRequest a global repository ServletContext Session You can invoke a method when the application starts, and Other predefined and private objects place a handle to the objects you need in the ServletContext 34 2/19/

18 Shared Objects attribute The shared objects are referred to as scopes The shared scopes are contained in other objects For example, the request object contains the request scope HttpServletRequest contenttype method etc. 35 Why Do We Need a Session? The ServletContext object allows you to store servlet data beyond a single request, but: The life of the ServletContext object is too long for a user transaction You probably want to limit the sharing to one user For example, data for a shopping application (a shopping cart) has a life that is only as long as the user is shopping and you want the shopping cart to only be visible to servlet executions for that user 36 2/19/

19 The Web container provides (and manages) session objects Session Object Note that there are many session objects, but only one associated with a single computer/browser You can store information in a session object using name-value pairs, but the session object only exists for the life of the session A session usually corresponds to one user, who may visit a site many times where the interval between visits is small How does the Web Container identify a user? 37 Session Life Cycle API You can set the duration of a session (e.g., 20 minutes) Or you can invalidate the session when you are finished (e.g., when the user logs out) Session invalidate() isnew() getcreationtime() getlastaccessedtime() setmaxinactiveinterval(int) getattribute(string) setattribute(string, Object) getattributenames() removeattribute(string) 38 2/19/

20 Steps in Session Management Request a session object. This can be either: A session object that was previously created and may contain data inserted by another servlet A new session object when there is no existing session object matching this user Store information in the session object Invalidate the session - or allow the session to time out when maxinactiveinterval (time in seconds) is exceeded setmaxinactiveinterval(int interval) Objects attached to the session can receive notification when they are unbound through a listener interface 39 What is Ajax? Asynchronous JavaScript Technology and XML Allows incremental update of Web pages within the browser Not dependent on any given language or data exchange format, but works well with Xhtml JavaScript 40 2/19/

21 Classic Browser/Server Interaction browser click wait click wait click request request Html page Html page server processing processing 41 Ajax Browser/Server Interaction browser browser UI User events UI updates Ajax engine Client engine is key to Ajax model by allowing asynchronous operation request text request text server processing processing 42 2/19/

22 XMLHttpRequest Object Transport object for communication between client and server Methods allow Specify request details Extract response data Subject to some cross-domain limitations 43 Common XMLHttpRequest Properties onreadystatechange - Event handler (function) for an event that fires at every state change readystate -Object status integer: 0 = uninitialized Depends on the 1 = loading content-type of your 2 = loaded response 3 = interactive 4 = complete responsetext - String version of data returned from server process responsexml - DOM-compatible document object of data returned from server process status - Numeric code returned by server (e.g., 404) statustext - String message accompanying the status code 44 2/19/

23 Common XMLHttpRequest Methods open("method", "URL"[, asyncflag]) Initializes the request parameters (destination URL, method, and asynchronous flag) send(content) - Transmits the request, optionally with postable string or DOM object data setrequestheader("label", "value") - Assigns a label/value pair to the header to be sent with a request abort() - Stops the current request getallresponseheaders() - Returns complete set of headers (labels and values) as a string getresponseheader("headerlabel") - Returns the string value of a single header label Interaction using XMLHttpRequest is very low-level and complicated 45 Typical Ajax Interaction 1. Client event occurs 2. XMLHttpRequest object is created 3. XMLHttpRequest object calls the server 4. Server request is processed by server code (usually a servlet) 5. Server returns data (usually a text document-html, JSON, or XML) containing the result 6. XMLHttpRequest object calls the callback() function and processes the result 7. The browser document (html) is updated 46 2/19/

24 DOM JavaScript begins to be useful when you can access and modify the html in the document DOM can mean different things Approaches Legacy DOM (Document Object Model) Defined by Netscape in the early days of the WWW IE 4 DOM still in use, although Microsoft now supports W3C DOM W3C DOM (level 3) well supported on modern browsers Includes the legacy DOM (known as Level 0 DOM) W3C DOM (level 4) You may see the use of many of the supported DOMs in current code 47 What is DOM? Document Object Model Convention for representing and interacting with objects (HTML, XHTML and XML) Cross platform Binding with various languages Implemented as an API in JavaScript 48 2/19/

25 Legacy DOM Does not take full advantage of the tree structure of html documents Tends to reference html elements as members of an array, for example images[], links[] and forms[] Naming document.forms[0] document.forms.f1 document.forms[ f1 ] <form name= f1 > Assuming the order of elements in an html document can cause maintenance problems 49 Defines W3C DOM a standard set of objects (object tree) for an html document Set of methods (language independent) to access the html object Your Java and JavaScript (and other) programs can Access a given node (element) Walk the tree Search for particular nodes or data (e.g., img tags) Modify the nodes and insert sub-trees 50 2/19/

26 JavaScript/DOM When a web page is loaded, the browser creates a Document Object Model of the page. With the object model, JavaScript is fully enabled to create dynamic HTML: JavaScript can add, change, and remove all the HTML elements and attributes in the page. JavaScript can change all the CSS styles in the page. JavaScript can react to all existing events in the page. JavaScript can create new events in the page. From WIkipedia DOM Access to html Note that the root of the html document is not the same as the root element 52 2/19/

27 Node Object HTML elements are of type Node/Element/HTMLElement (inheritance hierarchy) You can get a handle to a node, and modify its appearance Methods of Document can return An Element object (e.g., getelementbyid) A NodeList object (e.g., getelementsbytagname) Notice whether the method uses singular or plural 53 Example Changing Styles An easy way to change the appearance of an element is to change its class attribute... <style type="text/css">.blue {color:blue;}.red {color:red;} </style> <script> function change() { var y = document.getelementbyid("x4"); y.classname="red"; } </script>... <p id="x4" class="blue">hello World</p> class is a reserved name in JavaScript, so the class property is classname HTMLElement is a subclass of Element 54 2/19/

28 Illustrates Response to an event Example Hello DOM Modification of the style property of a node Actions Obtain a handle to an html element Modify the html element 55 Html Hello DOM Example y is a Node object (not an array) <head>... <script> function change() { var y = document.getelementbyid("x1"); y.style.color="red"; } </script> Level 2 CSS2Properties object </head> <body style="color:blue;"> <form method= get" action= HelloDOM > <h2 id="x1" style="color:blue;">hello World</h2> <input type="button" onclick="change()" value="change appearance" /> </form> Clicking the button invokes the change() function </body> Attributes are usually set as properties 56 2/19/

29 Example Changing Element Contents function change() { var y = document.getelementbyid("x3"); y.innerhtml="hello Text"; } innerhtml is an element property that corresponds to all the markup and content within the element Setting an innerhtml property parses html text into the html tree Same html as last example Do not use innerhtml when inserting plain text; instead, use node.textcontent innerhtml is a useful relic of older DOM specs DOM-HelloText.html 57 Instantiate a sub-tree Manipulate the sub-tree Insert into the HTML tree Example Insert a Sub-Tree 58 2/19/

30 Pure DOM HTML Change DOM provides methods to delete, create, clone, and insert branches within the DOM tree function change() { var y = document.getelementbyid("x6"); var text = document.createtextnode( DOM text"); y.appendchild(text); } p... <p id="x6" class="blue"> Hello World</p> Hello world DOM text DOM-HelloDOMText.html 59 jquery Did you notice that the combination of DOM and JavaScript is not elegant? With the emergence of Ajax, the importance of client side scripting is greatly increased Solution jquery Cross-browser JavaScript library jquery name is misleading it has little to do with queries 60 2/19/

31 What is jquery A JavaScript client-side library (most popular) Used by over 72% of the most popular Web sites (over 96% of sites with known JS libraries) Free (MIT license) Open source Provides for plug-ins (many libraries available) 61 jquery Library Options Refer to the latest Web version of the library Refer to a particular library in the same directory as your html Download a copy of the most recent library from the jquery Web site Place the downloaded file in your NetBeans application top-level directory or the directory holding your jquery htm files Reference it in your JSP or htm <script src="jquery min.js"> </script> jquery 2.x may not be compatible with IE 62 2/19/

32 Hello jquery World <head> <script src=" </script> <script> $(document).ready(function() { $("a").click(function() { alert("hello world!"); }); }); </script> </head> <body> <a href="">link</a> </body> Event (e.g., ready) function parameter is typically an anonymous function $ is a valid JavaScript identifier, and represents the jquery function (i.e., $( ) constructs a new jquery object) The jquery ready function provides a handler to execute when the page is ready to be manipulated (although maybe not fully loaded) 63 jquery Versions You can reference the jquery version you have downloaded in a script tag, as in <script </script> src="jquery min.js"> Alternatively, you can reference the latest jquery version, as in <script src=" </script> Using the latest version is OK for this class, but not for a production environment (QA before using a new release) 64 2/19/

33 A Closer Look <head> <script src=" "></script> <script> $(document).ready( function() { $("a").click(function() { alert("hello world!"); }); }); </script> </head> <body> <a href="">link</a> </body> </html> Anonymous handler function $( ), a jquery selector, constructs a new jquery object that contains html elements: $(document) document object $( a ) - all anchor elements in the page The click() and ready() functions are methods of the jquery object that define events. click() binds a click event to all selected elements The click function replaces the use of the JavaScript onclick event handler (and we do not need onclick for every anchor tag) 65 Binding of Handler to All Selected Elements <script> $(document).ready(function() { $("a").click(function() { alert("hello world!"); }); }); </script> </head> <body> <a href="">link</a> <br /> <a href="">2nd Link</a>... jquery statement binds the alert dialog to a click on any of the anchor tags Clicking on either link results in the dialog box appearing 66 2/19/

34 jquery Manipulation A jquery manipulation statement consists of jquery selector jquery manipulation method (usually to manipulate the DOM) $("#orderedlist").addclass("red"); Adds a class attribute to each of the matched elements as in <xxxx class= red > 67 Event Handlers Bound to Events You bind an event handler to a JavaScript event for a collection of elements For every onxxx event, there is a jquery equivalent Check jquery events JavaScript Event jquery Collection of elements JS event Event handler blur change click focus load submit etc. blur() change() click() focus() hover() 2 handlers load() submit() $("a").click(function() { alert("hello world!"); }); 68 2/19/

35 Binding Events to Functions $("a").click(function() { alert("hello world!"); }); The example above uses an event helper method (anonymous function) Full syntax (which you would probably not use): $("a").bind( click, function); 69 jquery - AJAX jquery allows easy, browser-consistent use of Ajax Example $('#result').load('test.html'); Fetches data from a server Sets the html contents of the matched element to the return data Optional parameters for 1) data sent to server and 2) callback function Note that the call is asynchronous, and in this case there is an implicit callback function that inserts the result in the selected elements 70 2/19/

36 Example Insert the html below (test.html) into the page <br /><h3>this is a test</h3><br /> Access the page and try the example (and look at test.html) Example at: 71 Example <script> $(document).ready(function() { $("#driver").click(function(event){ $("#stage").load("test.html"); }); }); </script> </head> <body> test.html contains <br /><h3>this is a test</h3><br /> <p id="p1">click on the button to load test.html file:</p> <div id="stage" style="background-color:blue;">stage</div> <input type="button" id="driver" value="load Data" /> </body> 72 2/19/

37 jquery load() Method Loads data from a server and puts the returned data into the selected element Syntax: $(selector).load(url, [data], [callback]); URL - the URL you wish to load (required) data - a set of query string key/value pairs to send with the request (optional) callback - name of a function to be executed after the load() method is completed (optional) You may not need the callback function if you are just loading an error message into a component Some filtering of the returned data might be done (e.g., remove <html> tag 73 Callback Function The optional callback parameter to the load function specifies a callback function to run when the load() method is completed Callback function parameters: responsetxt - contains the resulting content if the call succeeds statustxt - contains the status of the call xhr - contains the XMLHttpRequest object 74 2/19/

38 jquery Ajax Style Note that the jquery handler can (and usually does) include an anonymous function that also includes more jquery $(document).ready(function() { $("#driver").click(function(event){ $("#stage").load("test.html"); }); }); Event object 75 Let s Try That Example Again <script> $(document).ready(function() { $("#driver").click(function(event){ $("#stage").load(" }); }); </script> </head> <body> <p id="p1">click on the button to load the html file:</p> <div id="stage" style="background-color:blue;">stage</div> <input type="button" id="driver" value="load Data" /> </body> The load failed 76 2/19/

39 Same Origin Policy The same origin policy is an important security concept for browser-side programming languages, such as JavaScript The policy permits scripts running on pages originating from the same site to access each other's methods and properties with no specific restrictions prevents access to most methods and properties across pages on different sites Reference: 77 jquery Same Origin Example <body> URL to load is in the same directory as this html <b>successful Response (should be blank):</b> <div id="success ></div> <b>error Response:</b> <div id="error">no error</div> <script> $("#success").load("test.html", function(response, status, xhr) { XmlHttpRequest object if (status == "error") { var msg = "Sorry but there was an error: "; $("#error").html(msg + "Status:" + xhr.status + " " + "StatusText:"+ xhr.statustext); } }); </script> </body> Result of call to load Callback function invoked after response is inserted /19/

40 Same Origin Example <body> <b>successful Response (should be blank):</b> <div id="success"></div> <b>error Response:</b> <div id="error"></div> <script> $("#success").load( " function(response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; $("#error").html(msg + "Status:" + xhr.status + " " + "StatusText:"+ xhr.statustext); } }); </script> </body> First, access this page in your browser. Then download and Invoke the html locally to see the error Insert not allowed because inserted html on different site 79 Sample jquery Ajax Methods Approximately equivalent to the load function Method $.get( ) $.post( ) serialize() $.getjson() Description Loads data from a server using an AJAX HTTP GET request Loads data from a server using an AJAX HTTP POST request Encodes a set of form elements as a string for submission (method of the jquery form object) Loads JSON-encoded data from a server using an AJAX HTTP GET request get and post functions include an optional data parameter (2 nd parameter) 80 2/19/

41 To request data from the server Sending an Ajax Request Compose a query string Append the query string to the URL or specify the query string as the second parameter to the function (load, get, or post) Ajax request sent when the enclosing event is triggered 81 Example 82 2/19/

42 Example JSP AjaxJqueryExample.jsp <script> $(document).ready(function() { $("#driver").click(function(event) { var querystring = $("#i").prop("value"); var url = " input=" + querystring; $("#p").load(url); Note the prop method will return the changed value, attr method will not });}); </script> </head> <body> <p id="p1">enter text and click the button</p> <input id="i" type="text" value="default" /> <input type="button" id="driver" value="load Data" /> <br /><div id="p"></div> </body> 83 Example - Servlet JqueryAjaxParameterExample.java... PrintWriter out = response.getwriter(); try { String s2 = request.getparameter("input"); if (s2 == null) { out.println( null ); } else { out.println( The parameter value is + s2); } 84 2/19/

43 Sequence Diagram Simplifications Do not show client DOM manipulations in your sequence diagrams 85 2/19/

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly,

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly, Session 18 jquery - Ajax 1 Tutorials Reference http://learn.jquery.com/ajax/ http://www.w3schools.com/jquery/jquery_ajax_intro.asp jquery Methods http://www.w3schools.com/jquery/jquery_ref_ajax.asp 2 10/31/2018

More information

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes Session 8 Deployment Descriptor 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/_status_codes

More information

Session 8. Introduction to Servlets. Semester Project

Session 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 information

Session 7. JavaScript Part 2. W3C DOM Reading and Reference

Session 7. JavaScript Part 2. W3C DOM Reading and Reference Session 7 JavaScript Part 2 W3C DOM Reading and Reference Background and introduction developer.mozilla.org/en-us/docs/dom/dom_reference/introduction en.wikipedia.org/wiki/document_object_model www.w3schools.com/js/js_htmldom.asp

More information

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers Session 9 Deployment Descriptor Http 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/http_status_codes

More information

Session 20 Data Sharing Session 20 Data Sharing & Cookies

Session 20 Data Sharing Session 20 Data Sharing & Cookies Session 20 Data Sharing & Cookies 1 Reading Shared scopes Java EE 7 Tutorial Section 17.3 Reference http state management www.ietf.org/rfc/rfc2965.txt Cookies Reading & Reference en.wikipedia.org/wiki/http_cookie

More information

Session 9. Introduction to Servlets. Lecture Objectives

Session 9. Introduction to Servlets. Lecture Objectives Session 9 Introduction to Servlets Lecture Objectives Understand the foundations for client/server Web interactions Understand the servlet life cycle 2 10/11/2018 1 Reading & Reference Reading Use the

More information

Session 11. Ajax. Reading & Reference

Session 11. Ajax. Reading & Reference Session 11 Ajax Reference XMLHttpRequest object Reading & Reference en.wikipedia.org/wiki/xmlhttprequest Specification developer.mozilla.org/en-us/docs/web/api/xmlhttprequest JavaScript (6th Edition) by

More information

Session 17. JavaScript Part 2. W3C DOM Reading and Reference. Background and introduction.

Session 17. JavaScript Part 2. W3C DOM Reading and Reference. Background and introduction. Session 17 JavaScript Part 2 1 W3C DOM Reading and Reference Background and introduction www.w3schools.com/htmldom/default.asp Reading a good tutorial on the use of W3C DOM to modify html www.builderau.com.au/program/javascript/soa/ac

More information

Session 17. jquery. jquery Reading & References

Session 17. jquery. jquery Reading & References Session 17 jquery 1 Tutorials jquery Reading & References http://learn.jquery.com/about-jquery/how-jquery-works/ http://www.tutorialspoint.com/jquery/ http://www.referencedesigner.com/tutorials/jquery/jq_1.php

More information

Session 8. JavaBeans. Reading & Reference. Reading. Reference. Session 8 Java Beans. 2/27/2013 Robert Kelly, Head First Chapter 3 (MVC)

Session 8. JavaBeans. Reading & Reference. Reading. Reference. Session 8 Java Beans. 2/27/2013 Robert Kelly, Head First Chapter 3 (MVC) Session 8 JavaBeans 1 Reading Reading & Reference Head First Chapter 3 (MVC) Reference JavaBeans Tutorialdocs.oracle.com/javase/tutorial/javabeans/ 2 2/27/2013 1 Lecture Objectives Understand how the Model/View/Controller

More information

Session 9. Data Sharing & Cookies. Reading & Reference. Reading. Reference http state management. Session 9 Data Sharing

Session 9. Data Sharing & Cookies. Reading & Reference. Reading. Reference http state management. Session 9 Data Sharing Session 9 Data Sharing & Cookies 1 Reading Reading & Reference Chapter 5, pages 185-204 Reference http state management www.ietf.org/rfc/rfc2109.txt?number=2109 2 3/1/2010 1 Lecture Objectives Understand

More information

Chapter 10 Servlets and Java Server Pages

Chapter 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 information

Servlet Basics. Agenda

Servlet 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 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

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

AJAX Programming Chris Seddon

AJAX Programming Chris Seddon AJAX Programming Chris Seddon seddon-software@keme.co.uk 2000-12 CRS Enterprises Ltd 1 2000-12 CRS Enterprises Ltd 2 What is Ajax? "Asynchronous JavaScript and XML" Originally described in 2005 by Jesse

More information

Java 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 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 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

AJAX: Introduction CISC 282 November 27, 2018

AJAX: Introduction CISC 282 November 27, 2018 AJAX: Introduction CISC 282 November 27, 2018 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the

More information

Servlets. An extension of a web server runs inside a servlet container

Servlets. 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 information

Chapter 10 Web-based Information Systems

Chapter 10 Web-based Information Systems Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 10 Web-based Information Systems Role of the WWW for IS Initial

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

Servlets1. What are Servlets? Where are they? Their job. Servlet container. Only Http?

Servlets1. 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 information

Java SE7 Fundamentals

Java SE7 Fundamentals Java SE7 Fundamentals Introducing the Java Technology Relating Java with other languages Showing how to download, install, and configure the Java environment on a Windows system. Describing the various

More information

Ajax Ajax Ajax = Asynchronous JavaScript and XML Using a set of methods built in to JavaScript to transfer data between the browser and a server in the background Reduces the amount of data that must be

More information

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module7: Objectives/Outline Objectives Outline Understand the role of Learn how to use in your web applications Rich User Experience

More information

To follow the Deitel publishing program, sign-up now for the DEITEL BUZZ ON-

To follow the Deitel publishing program, sign-up now for the DEITEL BUZZ ON- Ordering Information: Advanced Java 2 Platform How to Program View the complete Table of Contents Read the Preface Download the Code Examples To view all the Deitel products and services available, visit

More information

Fall Semester (081) Module7: AJAX

Fall Semester (081) Module7: AJAX INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module7: AJAX Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals alfy@kfupm.edu.sa

More information

Servlets and JSP (Java Server Pages)

Servlets 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 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

Introduction. This course Software Architecture with Java will discuss the following topics:

Introduction. 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 information

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject

More information

ive JAVA EE C u r r i c u l u m

ive JAVA EE C u r r i c u l u m C u r r i c u l u m ive chnoworld Development Training Consultancy Collection Framework - The Collection Interface(List,Set,Sorted Set). - The Collection Classes. (ArrayList,Linked List,HashSet,TreeSet)

More information

Stateless -Session Bean

Stateless -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

Introduction to Servlets. After which you will doget it

Introduction to Servlets. After which you will doget it Introduction to Servlets After which you will doget it Servlet technology A Java servlet is a Java program that extends the capabilities of a server. Although servlets can respond to any types of requests,

More information

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.

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. 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 information

Introduction. Literature: Steelman & Murach, Murach s Java Servlets and JSP. Mike Murach & Associates Inc, 2003

Introduction. 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 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

JAVA SERVLET. Server-side Programming INTRODUCTION

JAVA 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 information

SSC - Web applications and development Introduction and Java Servlet (I)

SSC - 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 information

Ajax Ajax Ajax = Asynchronous JavaScript and XML Using a set of methods built in to JavaScript to transfer data between the browser and a server in the background Reduces the amount of data that must be

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

Enterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets

Enterprise 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 information

An Introduction to AJAX. By : I. Moamin Abughazaleh

An Introduction to AJAX. By : I. Moamin Abughazaleh An Introduction to AJAX By : I. Moamin Abughazaleh How HTTP works? Page 2 / 25 Classical HTTP Process Page 3 / 25 1. The visitor requests a page 2. The server send the entire HTML, CSS and Javascript code

More information

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats Session 11 Calling Servlets from Ajax 1 Lecture Objectives Understand servlet response formats Text Xml Html JSON Understand how to extract data from the XMLHttpRequest object Understand the cross domain

More information

Vendor: SUN. Exam Code: Exam Name: Sun Certified Web Component Developer for J2EE 5. Version: Demo

Vendor: SUN. Exam Code: Exam Name: Sun Certified Web Component Developer for J2EE 5. Version: Demo Vendor: SUN Exam Code: 310-083 Exam Name: Sun Certified Web Component Developer for J2EE 5 Version: Demo QUESTION NO: 1 You need to store a Java long primitive attribute, called customeroid, into the session

More information

HttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests

HttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests What is the servlet? Servlet is a script, which resides and executes on server side, to create dynamic HTML. In servlet programming we will use java language. A servlet can handle multiple requests concurrently.

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

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP 2013 Empowering Innovation DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP contact@dninfotech.com www.dninfotech.com 1 JAVA 500: Core JAVA Java Programming Overview Applications Compiler Class Libraries

More information

Servlet Fudamentals. Celsina Bignoli

Servlet 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 information

INTRODUCTION 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 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 information

Handout 31 Web Design & Development

Handout 31 Web Design & Development Lecture 31 Session Tracking We have discussed the importance of session tracking in the previous handout. Now, we ll discover the basic techniques used for session tracking. Cookies are one of these techniques

More information

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

J2EE 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 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

Web Programming. Lecture 11. University of Toronto

Web 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 information

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies CNIT 129S: Securing Web Applications Ch 3: Web Application Technologies HTTP Hypertext Transfer Protocol (HTTP) Connectionless protocol Client sends an HTTP request to a Web server Gets an HTTP response

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

CSC309: Introduction to Web Programming. Lecture 11

CSC309: 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 information

sessionx Desarrollo de Aplicaciones en Red A few more words about CGI CGI Servlet & JSP José Rafael Rojano Cáceres

sessionx Desarrollo de Aplicaciones en Red A few more words about CGI CGI Servlet & JSP José Rafael Rojano Cáceres sessionx Desarrollo de Aplicaciones en Red José Rafael Rojano Cáceres http://www.uv.mx/rrojano A few more words about Common Gateway Interface 1 2 CGI So originally CGI purpose was to let communicate a

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

Java Servlets. Preparing your System

Java Servlets. Preparing your System Java Servlets Preparing to develop servlets Writing and running an Hello World servlet Servlet Life Cycle Methods The Servlet API Loading and Testing Servlets Preparing your System Locate the file jakarta-tomcat-3.3a.zip

More information

Notes General. IS 651: Distributed Systems 1

Notes General. IS 651: Distributed Systems 1 Notes General Discussion 1 and homework 1 are now graded. Grading is final one week after the deadline. Contract me before that if you find problem and want regrading. Minor syllabus change Moved chapter

More information

Lab session Google Application Engine - GAE. Navid Nikaein

Lab session Google Application Engine - GAE. Navid Nikaein Lab session Google Application Engine - GAE Navid Nikaein Available projects Project Company contact Mobile Financial Services Innovation TIC Vasco Mendès Bluetooth low energy Application on Smart Phone

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components Module 5 JavaScript, AJAX, and jquery Module 5 Contains 2 components Both the Individual and Group portion are due on Monday October 30 th Start early on this module One of the most time consuming modules

More information

AJAX: The Basics CISC 282 March 25, 2014

AJAX: The Basics CISC 282 March 25, 2014 AJAX: The Basics CISC 282 March 25, 2014 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the browser

More information

Ajax in Oracle JDeveloper

Ajax in Oracle JDeveloper Ajax in Oracle JDeveloper Bearbeitet von Deepak Vohra 1. Auflage 2008. Taschenbuch. xiv, 224 S. Paperback ISBN 978 3 540 77595 9 Format (B x L): 15,5 x 23,5 cm Gewicht: 373 g Weitere Fachgebiete > EDV,

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

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

AJAX: The Basics CISC 282 November 22, 2017

AJAX: The Basics CISC 282 November 22, 2017 AJAX: The Basics CISC 282 November 22, 2017 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the

More information

JavaServer Pages. What is JavaServer Pages?

JavaServer 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 information

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4.

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4. IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4. Why are the protocols layered? 5. Define encapsulation.

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

User Interaction: jquery

User Interaction: jquery User Interaction: jquery Assoc. Professor Donald J. Patterson INF 133 Fall 2012 1 jquery A JavaScript Library Cross-browser Free (beer & speech) It supports manipulating HTML elements (DOM) animations

More information

CS 5142 Scripting Languages

CS 5142 Scripting Languages CS 5142 Scripting Languages 10/16/2015 Web Applications Databases 1 Outline Stateful Web Applications AJAX 2 Concepts Scope in Server-Side Scripts Request $_GET, $_POST global $g; Session $_SESSION Application

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

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

Advanced Web Technology

Advanced 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 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

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

RKN 2015 Application Layer Short Summary

RKN 2015 Application Layer Short Summary RKN 2015 Application Layer Short Summary HTTP standard version now: 1.1 (former 1.0 HTTP /2.0 in draft form, already used HTTP Requests Headers and body counterpart: answer Safe methods (requests): GET,

More information

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module Java Platform, Enterprise Edition 5 (Java EE 5) Core Java EE Java EE 5 Platform Overview Java EE Platform Distributed Multi tiered Applications Java EE Web & Business Components Java EE Containers services

More information

web.xml Deployment Descriptor Elements

web.xml Deployment Descriptor Elements APPENDIX A web.xml Deployment Descriptor s The following sections describe the deployment descriptor elements defined in the web.xml schema under the root element . With Java EE annotations, the

More information

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programming for Digital Media Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 Topics Ajax (Asynchronous JavaScript and XML) What it is and

More information

1Z Java EE 6 Web Component Developer Certified Expert Exam Summary Syllabus Questions

1Z Java EE 6 Web Component Developer Certified Expert Exam Summary Syllabus Questions 1Z0-899 Java EE 6 Web Component Developer Certified Expert Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-899 Exam on Java EE 6 Web Component Developer Certified Expert... 2 Oracle

More information

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments. Web Development WEB101: Web Development Fundamentals using HTML, CSS and JavaScript $2,495.00 5 Days Replay Class Recordings included with this course Upcoming Dates Course Description This 5-day instructor-led

More information

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introducing Object Oriented Programming... 2 Explaining OOP concepts... 2 Objects...3

More information

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Java- 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 information

Get the cookies from the service request: Cookie[] HttpServletRequest.getCookies() Add a cookie to the service response:

Get the cookies from the service request: Cookie[] HttpServletRequest.getCookies() Add a cookie to the service response: Managing Cookies Cookies Cookies are a general mechanism which server side applications can use to both store and retrieve information on the client side Servers send cookies in the HTTP response and browsers

More information

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes Java CORE JAVA Core Java Programing (Course Duration: 40 Hours) Introduction to Java What is Java? Why should we use Java? Java Platform Architecture Java Virtual Machine Java Runtime Environment A Simple

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

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN AJAX ASYNCHRONOUS JAVASCRIPT AND XML Laura Farinetti - DAUIN Rich-client asynchronous transactions In 2005, Jesse James Garrett wrote an online article titled Ajax: A New Approach to Web Applications (www.adaptivepath.com/ideas/essays/archives/000

More information

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2 Java Servlets Adv. Web Technologies 1) Servlets (introduction) Emmanuel Benoist Fall Term 2016-17 Introduction HttpServlets Class HttpServletResponse HttpServletRequest Lifecycle Methods Session Handling

More information

Introduction to Java Servlets. SWE 432 Design and Implementation of Software for the Web

Introduction to Java Servlets. SWE 432 Design and Implementation of Software for the Web Introduction to Java Servlets James Baldo Jr. SWE 432 Design and Implementation of Software for the Web Web Applications A web application uses enabling technologies to 1. make web site contents dynamic

More information

Developing Applications with Java EE 6 on WebLogic Server 12c

Developing Applications with Java EE 6 on WebLogic Server 12c Developing Applications with Java EE 6 on WebLogic Server 12c Duration: 5 Days What you will learn The Developing Applications with Java EE 6 on WebLogic Server 12c course teaches you the skills you need

More information

Enterprise Java Unit 1- Chapter 4 Prof. Sujata Rizal Servlet API and Lifecycle

Enterprise Java Unit 1- Chapter 4 Prof. Sujata Rizal Servlet API and Lifecycle Introduction Now that the concept of servlet is in place, let s move one step further and understand the basic classes and interfaces that java provides to deal with servlets. Java provides a servlet Application

More information

UNIT-VI. HttpServletResponse It extends the ServletResponse interface to provide HTTP-specific functionality in sending a response.

UNIT-VI. HttpServletResponse It extends the ServletResponse interface to provide HTTP-specific functionality in sending a response. UNIT-VI javax.servlet.http package: The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a Servlet class running under the HTTP protocol

More information

NetBeans IDE Field Guide

NetBeans IDE Field Guide NetBeans IDE Field Guide Copyright 2005 Sun Microsystems, Inc. All rights reserved. Table of Contents Extending Web Applications with Business Logic: Introducing EJB Components...1 EJB Project type Wizards...2

More information

Introduction to Ajax

Introduction to Ajax Introduction to Ajax with Bob Cozzi What is AJAX? Asynchronous JavaScript and XML A J a X Asynchronous data retrieval using the XMLHttpRequest object from JavaScript Data is retrieved from the server as

More information

CS7026. Introduction to jquery

CS7026. Introduction to jquery CS7026 Introduction to jquery What is jquery? jquery is a cross-browser JavaScript Library. A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based

More information