Making applica+ons with Java. Text Technologies 2013 Chris Culy

Size: px
Start display at page:

Download "Making applica+ons with Java. Text Technologies 2013 Chris Culy"

Transcription

1 Making applica+ons with Java

2 Desktop applica+on aka executable jar file Commandline: java jar myapplica+on.jar Or, if you have a GUI interface, doubleclick on the jar file Easiest solu+on: Let the IDE do it for you e.g. Netbeans New Project Java - > JavaApplica+on OR Maven - > JavaApplica+on

3 Do it yourself executable jar (1) h\p://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html h\p://docs.oracle.com/javase/tutorial/deployment/jar/manifes+ndex.html Need a MANIFEST file which says What the main class is Where the classpath is for external classes (jars)

4 Do it yourself executable jar (2) Create a text file that has these two lines Main- Class: full package and class name Class- Path: rela0ve path to other jars The file must end with newline or carriage return Omit Class- Path if there are no external classes/jars

5 Do it yourself executable jar (3) Build your project You can extract the default MANIFEST like this: jar xvf myjar.jar META- INF/MANIFEST.MF Update the MANIFEST with the correct informa+on from the text file jar ufm myjar.jar pathtoinfofile Now you can run your program from the commandline java jar myjar.jar

6 Web applica+ons 2 common approaches (not just in Java) Web page templates combined with code Java Server Pages (JSP); ASP, PHP, etc. Web page + Web services

7 JSP (1) h\p:// An IDE makes this much easier It will set up a test server for you (e.g. Tomcat) E.g. Netbeans: Make New Project - > Java Web - > Web Applica+on NB: Need Java EE, Web tools

8 JSP basics Expression: <%= java_expression %> java_expression is evaluated (once) when the page loads and subs+tuted in the html Scriptlet: <% java_code %> java_code is evaluated, but not subs+tuted To insert a value into the page, use: out.println(...) Direc+ve: <%@ page... %> At the top, used e.g. for import <%@ page import="java.u+l.*,java.text.*" %>

9 JSP and Java classes (1) h\ps://netbeans.org/kb/docs/web/quickstart- webapps.html h\p:// We can use classes in a JSP page Simple beans can do things with proper+es, e.g. from forms Other classes can do whatever we want But: everything is evaluated when we load the page

10 JSP and Java classes (2) We can use classes in scriptlets as we normally would Need to import the class in the page... %> direc+ve

11 JSP, bean classes and forms (1) Beans are a special conven+onalized class Bean needs a no- argument constructor Any fields (instance variables) we want to access, need to have a ge\er and a se\er of the forms: type getvariablename() void setvariablename(type valname) Where the field/variable is variablename Note the capitaliza+on in getx, setx We can have other public and private func+ons as well

12 JSP, bean classes and forms (2) To use a bean with a form, In the form, set the handler jsp page as the ac+on <form name="name Input Form" ac+on="response.jsp"> The name a\ributes of the form input elements must correspond to the fields in the bean e.g. for <input type="text" name="name" /> We would have a field name, with getname() and setname()

13 JSP, bean classes and forms (3) To use a bean with a form, In the handler jsp page At the top of the body, add <jsp:usebean id="beannameinpage" scope="session" class="packageandnameofbean" /> NB: this works for any bean, not just ones for forms For each field in the form that we are interested in <jsp:setproperty name="beannameinpage" property="propname" /> Get the values like this <jsp:getproperty name="beannameinpage" property="propname" />

14 JSP and Java classes (3) Any bean that we have with <jsp:usebean> we can use just like any other class Having it as a bean just lets us use it to get the submi\ed form values We can access public fields and func+ons of classes in javascript e.g. var thename = '${ccbean.getname()}'; NB: can t pass javascript variable to Java(???)

15 Managing client state (1) Client state is informa+on that is specific to a par+cular use- session of the applica+on i.e., not applica+on- wide informa+on That we can handle, e.g. in sta+c fields, database, etc.

16 Managing client state (2) h\p:// h\p:// Tutorial/Servlet- Tutorial- Session- Tracking.html We can use sessions to help us manage the client state for us Uses cookies by default. Supposed to work even if cookies are disabled, but... On one page: <%... session.seta\ribute(aername, aerval)... %> On another page: <%.. session.geta\ribute(a\rname)... %>

17 Managing client state (3) Special func+ons available in session: getid() isnew() getcrea+ontime() Just a number use it with Date getlastaccessedtime() How long is the session valid? getmaxinac+veinterval() setmaxinac+veinterval()

18 Deploying the JSP files (1) You will create a WAR file similar to a jar file, but for web applica+ons You can use jar to examine and change a WAR file You need to specify the Context Path, which is the directory where the app is located In Netbeans, you can do it in Project Proper+es Run More generally, it is in the context.xml file, which gets put into the META- INF directory (same directory as the manifest) in the WAR file

19 Deploying the JSP files (2) Then upload to an appropriate server There are commercial services that provide web servers e.g. h\ps:// has plans that should be free for low usage (CuC has not tried it) For a Tomcat server/container, you would look for the manager page.

20 Web services Idea: server provides some computa+on which is returned to the client Desktop applica+on Server applica+on Web browser (via a web page) Limita+on: the web service has to be on the same domain as the web page which calls it Some work- arounds, e.g. JSONP, CORS, etc. Ouen machine- oriented rather human- oriented i.e. returning XML, or JSON rather than HTML or text

21 JSON (1) Javascript Object Nota+on Originally from javascript, but now (also) a general data exchange format Replacing XML in some instances More compact h\p://json.org/ But, we cannot (yet) define the structure Cf. DTDs, Schema, etc. for XML Upcoming: h\p://json- schema.org/

22 JSON (2) 4 Kinds of informa+on: Objects, Arrays, Keys, Values Objects: {key1:value1, key2:value2...} Arrays: [value1, value2,...] Keys are strings Values can be objects, arrays, numbers, strings, true, false, null

23 JSON (3) {"np": {"tokens":[{"token": "an"}, {"token":"espresso" }], "count":3}} [{},true,null]

24 Constructors: JSON (3) h\p:// h\p:// JSONObject(java.u+l.Map map) JSONObject(java.lang.Object bean) JSONObject(java.lang.String JSONtextString) JSONArray(java.u+l.Collec+on collec+on) JSONArray(java.lang.Object array) JSONArray(java.lang.String JSONtextString)

25 JSON (4) Gezng info from a JSONObject Object get(string key) int getint(string key) boolean getboolean(string key)... JSONObject getjsonobject(string key) JSONArray getjsonarray(string key) Iterator keys() int length() //number of keys

26 JSON (5) Gezng info from a JSONArray Object get(int index) int getint(int index) boolean getboolean(int index)... JSONObject getjsonobject(int index) JSONArray getjsonarray(int index) int length() //number of elements String join(string separator)

27 REST- ful Web Services There are a variety of techniques (e.g. SOAP, XML- RPC), but REST (aka REST- ful) is most common now REST = Representa+onal State Transfer Key ideas: everything (including queries) becomes a "resource" with a URL use HTTP opera+ons to provide database- like opera+ons over the internet

28 REST: HTTP and DB opera+ons DB CREATE RETRIEVE UPDATE DELETE HTTP PUT GET POST DELETE Not a perfect correspondance, since POST is also used when we have a large amount of data GET is ouen limited to ~2K characters Ideal: GET (and POST used for RETRIEVE) should not change the state of the server applica+on

29 How to make REST web services Can use any programming language We ll use Java s Jersey

30 REST service with Jersey (1) h\p://docs.oracle.com/javaee/6/tutorial/doc/gilik.html h\p://vichargrave.com/res~ul- web- service- development- with- netbeans- and- tomcat- tutorial/ h\p://

31 REST service with Jersey (2) Use an IDE! In Netbeans, when making a new project Java Web - > Web Applica+on (same as for JSP) New (same menu as for new Class) - > RESTful Web Services from Pa\erns - > Simple Root Resource - > Path = the path under the main applica+on directory The Context Path, same as with JSP - > Class name (the java class) - > Use Jersey specific features

32 Making web service handlers (1) Handler: the java code that is called when we do GET, POST, etc. Key idea: we use annota0ons to indicate the role that different pieces of the code play in the web service Always preceded Immediately precede the relevant code

33 Basic annota+ons What rela+ve path on the server will call this func+onality Rela+ve to Context Path AND then servlet mapping Specified in WEB- INF/web.xml e.g. <url- pa\ern>/webresources/*</url- pa\ern> => at the class gives the base for the methods /service at method gives the end point for the URL text ) (with previous class- => h\p:/host/contextpath/webresources/service/text

34 Basic The type of h\p request that the method The MIME type of the input data Use the constants: Mediatype.XXXXXX e.g. for (can also be MediaType.TEXT_PLAIN if no parameters) Op+onal for GET Omit if there is no data

35 Basic annota+ons The MIME type of the response, + "; charset=utf- (for GET) The following argument gets its value from the named query param e.g. myfunc+on(@queryparam( name ) String who) {} h\p://../?...name=somename the variable who is assigned SomeName You may need to call URLDecode.decode(who, UTF- 8 )

36 Basic annota+ons UriInfo var (for GET) All the query paramaters together in var, e.g. UriInfo ui) { Mul+valuedMap<String, String> queryparams = ui.getqueryparameters(); } String who = queryparams.getfirst( name"); h\p://../?...name=somename the variable who is assigned SomeName You may need to call URLDecode.decode(who, UTF- 8 )

37 Basic annota+ons (for POST, when form- encoded) The following argument gets its value from the named query param e.g. name ) String who) {} POSTed with name=somename the variable who is assigned SomeName You may need to call URLDecode.decode(who, UTF- 8 ) There are other annota+ons, more details

38 Managing client state REST- ful web services themselves do not (typically) handle client state But we can use JSP and sessions Or manually do cookies, etc

39 Deploying the web services Use a WAR file, as with JSPs

40 How to make a REST client How do we use REST- ful web services? Simplest is just load the URL May or may not be useful Can call web services from a web page On the same site Or using JSONP, CORS, etc, depending on service and server configura+on Can call web services from applica+ons Desktop OR server

41 Observa+on JSP- sites tend to have mul+ple pages The Java expressions are evaluated just once when the page loads Web service based sites tend to update the informa+on on a page more ouen than going to a separate page Web services can be called without (re)loading a page

42 Calling a web service from page (1) Web services are called using Javascript Idea: Use XMLH\pRequest Can do directly, but There are many libraries which make it easier e.g. jquery: h\p://jquery.com

43 Calling a web service from page (2) jquery.get(url, handleresult); jquery.post(url, params, handleresult); Parameters: For GET, the url will contain any paramaters: p1=v1&p2=v2 For POST, the paramters are passed to jquery

44 Calling a web service from page (3) jquery.get(url, handleresult); jquery.post(url, params, handleresult); handleresult is (the name of) a func+on you write (it can be called anything) that will be called when the web service is done. It has 3 arguments: func+on handleresult(data, status, jqxhr) {} data: the data that is returned (may be an Object) status: h\p status, e.g. success jqxhr: jquery object with the results, especially jqxhr. responsetext

45 Calling a web service from Java (1) Simplest way: Use H\pURLConnec+on from URL See WeblichtClient But there are also libraries to help

46 Calling a web service from Java (2) h\ps://blogs.oracle.com/enterprisetech+ps/entry/consuming_res~ul_web_services_with The Jersey way WeblichtClientJersey (web client, POST) FAAGET (desktop app, GET)

47 Calling a web service from Java (3) What we need: Jersey Client This calls the web service Client myclient = Client.create(); Jersey WebResource(s) These are descrip+ons of the web services we ll call WebResource someresource = myclient.resource(urlforwebservice); ClientResponse This has the informa+on that is returned from the web service (and the h\p informa+on)

48 Calling a web service from Java (4) ClientResponse: GET Mul+valuedMap queryparams = new Mul+valuedMapImpl(); queryparams.add( param", value"); ClientResponse response = mywebresource.queryparams (queryparams).get(clientresponse.class); Other op+ons possible, e.g..type() for the return MIME type

49 Calling a web service from Java (5) ClientResponse: POST ClientResponse response = mywebresource.type(...").post(clientresponse.class, input); Notes: If we have parameters, we use Mul+valuedMap, as with GET Type: MediaType.APPLICATION_FORM_URLENCODED_TYPE Input: the Mul+valuedMap object If we do not have parameters (e.g. as in Weblicht services) Type: whatever is appropriate (e.g. tcf+xml ) Input: the data to be processed

50 Calling a web service from Java (6) Dealing with the response int status = response.getstatus(); 200 is OK, 404 is not found, etc. Type result = response.geten+ty(type.class); e.g. String results = response.geten+ty(string.class) JSONObject jsresults = response.geten+ty(jsonobject.class)

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

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

More information

Session 12. RESTful Services. Lecture Objectives

Session 12. RESTful Services. Lecture Objectives Session 12 RESTful Services 1 Lecture Objectives Understand the fundamental concepts of Web services Become familiar with JAX-RS annotations Be able to build a simple Web service 2 10/21/2018 1 Reading

More information

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

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

More information

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

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

First Simple Interactive JSP example

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

More information

Life Without NetBeans

Life Without NetBeans Life Without NetBeans Part C Web Applications Background What is a WAR? A Java web application consists a collection of Java servlets and regular classes, JSP files, HTML files, JavaScript files, images,

More information

COMP REST Programming in Eclipse

COMP REST Programming in Eclipse COMP 4601 REST Programming in Eclipse 1 The Context Need to understand how to pass objects between a client and server. Using JAXB In the following slides, code is taken from the COMP4601SecondBank and

More information

COMP9321 Web Application Engineering

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

More information

COMP9321 Web Application Engineering

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

More information

Session 21. Expression Languages. Reading. Java EE 7 Chapter 9 in the Tutorial. Session 21 Expression Languages 11/7/ Robert Kelly,

Session 21. Expression Languages. Reading. Java EE 7 Chapter 9 in the Tutorial. Session 21 Expression Languages 11/7/ Robert Kelly, Session 21 Expression Languages 1 Reading Java EE 7 Chapter 9 in the Tutorial 2 11/7/2018 1 Lecture Objectives Understand how Expression Languages can simplify the integration of data with a view Know

More information

Java Server Page (JSP)

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

More information

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

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

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

JAVA 2 ENTERPRISE EDITION (J2EE)

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

More information

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

Objec&ves. Servlets Review JSPs Web Applica&on Organiza&on Version Control. May 3, 2016 Sprenkle - CS335 1

Objec&ves. Servlets Review JSPs Web Applica&on Organiza&on Version Control. May 3, 2016 Sprenkle - CS335 1 Objec&ves Servlets Review JSPs Web Applica&on Organiza&on Version Control May 3, 2016 Sprenkle - CS335 1 Servlets Review How do we access a servlet s init parameter? Why do we use init parameters? Where

More information

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/- www.javabykiran. com 8888809416 8888558802 Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/- Java by Kiran J2EE SYLLABUS Servlet JSP XML Servlet

More information

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

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

More information

Advanced Java Programming

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

More information

Jakarta Struts: An MVC Framework

Jakarta Struts: An MVC Framework Jakarta Struts: An MVC Framework Overview, Installation, and Setup. Struts 1.2 Version. Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet/JSP/Struts/JSF Training: courses.coreservlets.com

More information

JSP. Basic Elements. For a Tutorial, see:

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

More information

WA2018 Programming REST Web Services with JAX-RS WebLogic 12c / Eclipse. Student Labs. Web Age Solutions Inc.

WA2018 Programming REST Web Services with JAX-RS WebLogic 12c / Eclipse. Student Labs. Web Age Solutions Inc. WA2018 Programming REST Web Services with JAX-RS 1.1 - WebLogic 12c / Eclipse Student Labs Web Age Solutions Inc. Copyright 2012 Web Age Solutions Inc. 1 Table of Contents Lab 1 - Configure the Development

More information

Mobile Computing. Logic and data sharing. REST style for web services. Operation verbs. RESTful Services

Mobile Computing. Logic and data sharing. REST style for web services. Operation verbs. RESTful Services Logic and data sharing Mobile Computing Interface Logic Services Logic Data Sync, Caches, Queues Data Mobile Client Server RESTful Services RESTful Services 2 REST style for web services REST Representational

More information

Web applications and JSP. Carl Nettelblad

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

More information

JavaServer Pages (JSP)

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

More information

Java E-Commerce Martin Cooke,

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

More information

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

112. Introduction to JSP

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

More information

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features

More information

Scope and State Handling in JSP

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

More information

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

Model View Controller (MVC)

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

112-WL. Introduction to JSP with WebLogic

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

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

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

More information

CE212 Web Application Programming Part 3

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

More information

A synchronous J avascript A nd X ml

A synchronous J avascript A nd X ml A synchronous J avascript A nd X ml The problem AJAX solves: How to put data from the server onto a web page, without loading a new page or reloading the existing page. Ajax is the concept of combining

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

How to Publish Any NetBeans Web App

How to Publish Any NetBeans Web App How to Publish Any NetBeans Web App (apps with Java Classes and/or database access) 1. OVERVIEW... 2 2. LOCATE YOUR NETBEANS PROJECT LOCALLY... 2 3. CONNECT TO CIS-LINUX2 USING SECURE FILE TRANSFER CLIENT

More information

Enterprise Architecture CS 4720 Web & Mobile Systems

Enterprise Architecture CS 4720 Web & Mobile Systems Enterprise Architecture Web & Mobile Systems The Concept of a Web Service Each service is built around a func=on/feature That func=on is surrounded by a specified set of protocols (SOAP, POX, WSDL, WSD,

More information

Frequently Asked Questions

Frequently Asked Questions Frequently Asked Questions This PowerTools FAQ answers many frequently asked questions regarding the functionality of the various parts of the PowerTools suite. The questions are organized in the following

More information

Packaging Data for the Web

Packaging Data for the Web Packaging Data for the Web EN 605.481 Principles of Enterprise Web Development Overview Both XML and JSON can be used to pass data between remote applications, clients and servers, etc. XML Usually heavier

More information

INFO/CS 4302 Web Informa6on Systems

INFO/CS 4302 Web Informa6on Systems INFO/CS 4302 Web Informa6on Systems FT 2012 Week 5: Web Architecture: Structured Formats Part 4 (DOM, JSON/YAML) (Lecture 9) Theresa Velden Haslhofer & Velden COURSE PROJECTS Q&A Example Web Informa6on

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

Signicat Connector for Java Version 2.6. Document version 3

Signicat Connector for Java Version 2.6. Document version 3 Signicat Connector for Java Version 2.6 Document version 3 About this document Purpose Target This document is a guideline for using Signicat Connector for Java. Signicat Connector for Java is a client

More information

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336 CSE 336 Introduction to Programming for Electronic Commerce Why You Need CSE336 Concepts like bits and bytes, domain names, ISPs, IPAs, RPCs, P2P protocols, infinite loops, and cloud computing are strictly

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

SESM Components and Techniques

SESM Components and Techniques CHAPTER 2 Use the Cisco SESM web application to dynamically render the look-and-feel of the user interface for each subscriber. This chapter describes the following topics: Using SESM Web Components, page

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

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

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

More information

Jakarta Struts: An MVC Framework

Jakarta Struts: An MVC Framework 2010 Marty Hall Jakarta Struts: An MVC Framework Overview, Installation, and Setup Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate,

More information

Java Programming Language

Java Programming Language Java Programming Language Additional Material SL-275-SE6 Rev G D61750GC10 Edition 1.0 D62603 Copyright 2007, 2009, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary

More information

Java Training Center, Noida - Java Expert Program

Java Training Center, Noida - Java Expert Program Java Training Center, Noida - Java Expert Program Database Concepts Introduction to Database Limitation of File system Introduction to RDBMS Steps to install MySQL and oracle 10g in windows OS SQL (Structured

More information

The project is conducted individually The objective is to develop your dynamic, database supported, web site:

The project is conducted individually The objective is to develop your dynamic, database supported, web site: Project The project is conducted individually The objective is to develop your dynamic, database supported, web site: n Choose an application domain: music, trekking, soccer, photography, etc. n Manage

More information

Tapestry. Code less, deliver more. Rayland Jeans

Tapestry. Code less, deliver more. Rayland Jeans Tapestry Code less, deliver more. Rayland Jeans What is Apache Tapestry? Apache Tapestry is an open-source framework designed to create scalable web applications in Java. Tapestry allows developers to

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

JSP MOCK TEST JSP MOCK TEST IV

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

More information

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program?

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program? Objec+ves Basics of Java Syntax Java fundamentals Ø Primi+ve data types Ø Sta+c typing Ø Arithme+c operators Ø Rela+onal operators 1 Review What are quali+es of good sooware? What is Java? Ø Benefits to

More information

Java Server Pages. JSP Part II

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

More information

Deployment Manual. SAP J2EE Engine 6.20

Deployment Manual. SAP J2EE Engine 6.20 Deployment Manual SAP J2EE Engine 6.20 Contents About This Manual... 4 Target Audience... 4 Structure... 4 Deployment Tasks...5 Overview... 6 Generate J2EE Components... 7 Generate J2EE Components Using

More information

CSC 8205 Advanced Java

CSC 8205 Advanced Java Please read this first: 1) All the assignments must be submitted via blackboard account. 2) All the assignments for this course are posted below. The due dates for each assignment are announced on blackboard.

More information

Configuring and Using Osmosis Platform

Configuring and Using Osmosis Platform Configuring and Using Osmosis Platform Index 1. Registration 2. Login 3. Device Creation 4. Node Creation 5. Sending Data from REST Client 6. Checking data received 7. Sending Data from Device 8. Define

More information

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

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

More information

RESTful -Webservices

RESTful -Webservices International Journal of Scientific Research in Computer Science, Engineering and Information Technology RESTful -Webservices Lalit Kumar 1, Dr. R. Chinnaiyan 2 2018 IJSRCSEIT Volume 3 Issue 4 ISSN : 2456-3307

More information

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER

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

More information

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

Object Oriented Design (OOD): The Concept

Object Oriented Design (OOD): The Concept Object Oriented Design (OOD): The Concept Objec,ves To explain how a so8ware design may be represented as a set of interac;ng objects that manage their own state and opera;ons 1 Topics covered Object Oriented

More information

Document Databases: MongoDB

Document Databases: MongoDB NDBI040: Big Data Management and NoSQL Databases hp://www.ksi.mff.cuni.cz/~svoboda/courses/171-ndbi040/ Lecture 9 Document Databases: MongoDB Marn Svoboda svoboda@ksi.mff.cuni.cz 28. 11. 2017 Charles University

More information

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 06 (Haup-ach)

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 06 (Haup-ach) Mul$media im Netz (Online Mul$media) Wintersemester 2014/15 Übung 06 (Haup-ach) Ludwig- Maximilians- Universität München Online Mul6media WS 2014/15 - Übung 06-1 Today s Agenda Flashback: 5 th Tutorial

More information

Web Application Architecture (based J2EE 1.4 Tutorial)

Web Application Architecture (based J2EE 1.4 Tutorial) Web Application Architecture (based J2EE 1.4 Tutorial) Dr. Kanda Runapongsa (krunapon@kku.ac.th) Department of Computer Engineering Khon Kaen University 1 Agenda Web application, components and container

More information

Web Architecture and Development

Web Architecture and Development Web Architecture and Development SWEN-261 Introduction to Software Engineering Department of Software Engineering Rochester Institute of Technology HTTP is the protocol of the world-wide-web. The Hypertext

More information

Component Based Software Engineering

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

More information

Topics Augmenting Application.cfm with Filters. What a filter can do. What s a filter? What s it got to do with. Isn t it a java thing?

Topics Augmenting Application.cfm with Filters. What a filter can do. What s a filter? What s it got to do with. Isn t it a java thing? Topics Augmenting Application.cfm with Filters Charles Arehart Founder/CTO, Systemanage carehart@systemanage.com http://www.systemanage.com What s a filter? What s it got to do with Application.cfm? Template

More information

Oracle ADF 11gR2 Development Beginner's Guide

Oracle ADF 11gR2 Development Beginner's Guide Oracle ADF 11gR2 Development Beginner's Guide Vinod Krishnan Chapter No.10 "Deploying the ADF Application" In this package, you will find: A Biography of the author of the book A preview chapter from the

More information

AIM. 10 September

AIM. 10 September AIM These two courses are aimed at introducing you to the World of Web Programming. These courses does NOT make you Master all the skills of a Web Programmer. You must learn and work MORE in this area

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

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

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

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

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

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

More information

Developing RESTful Web services with JAX-RS. Sabyasachi Ghosh, Senior Application Engneer Oracle

Developing RESTful Web services with JAX-RS. Sabyasachi Ghosh, Senior Application Engneer Oracle Developing RESTful Web services with JAX-RS Sabyasachi Ghosh, Senior Application Engneer Oracle India, @neilghosh Java API for RESTful Web Services (JAX-RS) Standard annotation-driven API that aims to

More information

ADVANCED JAVA COURSE CURRICULUM

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

More information

JAVA 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

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

CIS 3308 Logon Homework

CIS 3308 Logon Homework CIS 3308 Logon Homework Lab Overview In this lab, you shall enhance your web application so that it provides logon and logoff functionality and a profile page that is only available to logged-on users.

More information

Distributed Multitiered Application

Distributed Multitiered Application Distributed Multitiered Application Java EE platform uses a distributed multitiered application model for enterprise applications. Logic is divided into components https://docs.oracle.com/javaee/7/tutorial/overview004.htm

More information

18 Final Submission and Essay

18 Final Submission and Essay 18 Final Submission and Essay CERTIFICATION OBJECTIVE Preparing the Final Submission Copyright 2008 by The McGraw-Hill Companies. This SCJD bonus content is part of ISBN 978-0-07-159106-5, SCJP Sun Certified

More information

HTTP Communication on Tizen

HTTP Communication on Tizen HTTP Communication on Tizen Spring 2015 Soo Dong Kim, Ph.D. Professor, Department of Computer Science Software Engineering Laboratory Soongsil University Office 02-820-0909 Mobile 010-7392-2220 sdkim777@gmail.com

More information

Controller/server communication

Controller/server communication Controller/server communication Mendel Rosenblum Controller's role in Model, View, Controller Controller's job to fetch model for the view May have other server communication needs as well (e.g. authentication

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

Ch04 JavaServer Pages (JSP)

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

More information

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

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

More information

Module 5 Developing with JavaServer Pages Technology

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

More information

DOC // JAVA TOMCAT WEB SERVICES TUTORIAL EBOOK

DOC // JAVA TOMCAT WEB SERVICES TUTORIAL EBOOK 26 April, 2018 DOC // JAVA TOMCAT WEB SERVICES TUTORIAL EBOOK Document Filetype: PDF 343.68 KB 0 DOC // JAVA TOMCAT WEB SERVICES TUTORIAL EBOOK This tutorial shows you to create and deploy a simple standalone

More information

Care & Feeding of Programmers: Addressing App Sec Gaps using HTTP Headers. Sunny Wear OWASP Tampa Chapter December

Care & Feeding of Programmers: Addressing App Sec Gaps using HTTP Headers. Sunny Wear OWASP Tampa Chapter December Care & Feeding of Programmers: Addressing App Sec Gaps using HTTP Headers Sunny Wear OWASP Tampa Chapter December Mee@ng 1 About the Speaker Informa@on Security Architect Areas of exper@se: Applica@on,

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

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

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

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

More information

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

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

More information