Cours. Client/serveur avancé en Java (servlets, RMI, etc.) M.M.F.A.I. François Bourdoncle
|
|
- Francis Bradley
- 8 years ago
- Views:
Transcription
1 Cours Système et Réseaux M.M.F.A.I. Client/serveur avancé en Java (servlets, RMI, etc.) François Bourdoncle bourdonc/ 1
2 Plan Servlets RMI Implémentation de RMI 2
3 Servlets Equivalent de scripts CGI Ecrits en Java Exécutés dans un serveur en Java Requêtes Plusieurs threads (défaut) Un seul thread (SingleThreadModel) Extension standard de Java (javax.servlet.*) Protocoles javax.servlet.servlet (interface) javax.servlet.genericservlet (générique) javax.servlet.http.httpservlet (HTTP) Accès partagé efficace à une base de données 3
4 Interface Servlet Initialisation void init(servletconfig config); Nouvelle requête void service(servletrequest req, ServletResponse res); Destruction void destroy(); Accès à l environnement ServletConfig getservletconfig(); String getservletinfo(); 4
5 Interface ServletRequest Paramètres de la requête Protocole (GET, POST, TRACE, etc.) Hôte distant Canal de lecture (POST, PUT) ServletInputStream getinputstream(); Paramètres de la requête getcontentlength (CGI = CONTENT LENGTH) getservername (CGI = SERVER NAME) getscheme (http, https, ftp, etc.) etc. 5
6 Interface ServletResponse Résultat de la requête Message au format MIME Définition du format (text/html, etc.) void setcontenttype(string type); Écriture du contenu ServletOutputStream getoutputstream(); PrintWriter getwriter(); Taille de la réponse void setcontentlength(int len); 6
7 Classe HttpServlet Méthodes spécifiques au protocole HTTP/1.1 Pas besoin de définir service ou destroy doget(httpservletrequest req, HttpServletResponse res); dopost(httpservletrequest req, HttpServletResponse res); doput(httpservletrequest req, HttpServletResponse res); dodelete(httpservletrequest req, HttpServletResponse res); dooptions(httpservletrequest req, HttpServletResponse res); dotrace(httpservletrequest req, HttpServletResponse res); 7
8 Interface HttpServletRequest Complète ServletRequest Méthodes supplémentaires Cookie[] getcookies(); String getheader(string name); String getmethod(); // GET, POST, PUT, etc. String getrequesturi(); etc. 8
9 Interface HttpServletResponse Complète ServletResponse Méthodes supplémentaires void addcookie(cookie cookie); void sendredirect(string location); void setheader(string name, String value); void senderror(int sc, String msg); etc. 9
10 Exemple (1/2) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class EchoServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { // Buffer pour écrire la réponse CharArrayWriter wr = new CharArrayWriter(); PrintWriter out = response.getwriter(); // Ecrire la réponse en mémoire wr.println("<html><body><h1>paramètres</h1><pre>"); wr.println("request method: "+request.getmethod()); wr.println("request URI: "+request.getrequesturi()); wr.println("request protocol: "+request.getprotocol()); wr.println("query string: "+request.getquerystring()); wr.println("content length: "+request.getcontentlength()); wr.println("content type: "+request.getcontenttype()); wr.println("remote user: "+request.getremoteuser()); wr.println("remote address: "+request.getremoteaddr()); wr.println("remote host: "+request.getremotehost()); wr.println("</pre></body></html>"); // Définir les champs (avant d envoyer le résultat) response.setcontenttype("text/html"); response.setcontentlength(wr.size()); // Envoyer wr.writeto(out); wr.flush(); out.close(); 10
11 Exemple (2/2) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; // Affiche les couples paramètre/valeur d un FORM public class FormServlet extends HttpServlet { public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { // Buffer pour écrire la réponse CharArrayWriter wr = new CharArrayWriter(); PrintWriter out = response.getwriter(); // Ecrire la réponse en mémoire wr.println("<html><body><h1>paramètres</h1><pre>"); Enumeration values = request.getparameternames(); while (values.hasmoreelements()) { String name = (String) values.nextelement(); if (name.compareto("submit")!= 0) { String[] values = request.getparametervalues(name); for (int i = 0 ; i < values.length() ; ++i) { wr.println(name + "=" + values[i]); wr.println("</pre></body></html>"); // Définir les champs (avant d envoyer le résultat) response.setcontenttype("text/html"); response.setcontentlength(wr.size()); // Envoyer wr.writeto(out); wr.flush(); out.close(); 11
12 RMI (Remote Method Invocation) Serveur et client en Java Invocation de méthodes à distance Pas encore compatible avec CORBA Objets réseau = références Accès aux objets réseau par nom Accès aux objets réseau via des stubs Serveurs de nommage Interface partagée I étendant java.rmi.remote Classe implémentant I (serveur) Applet appelant la méthode I.m (client) 12
13 Interface partagée (Test.java) Le type des arguments doit être sérialisable. Les objet locaux sont copiés. Les objet distants sont passés par référence. package fr.ensmp; import java.rmi.*; public interface Test extends Remote { String test() throws RemoteException; 13
14 Implémentation (TestImpl.java) package fr.ensmp; import java.rmi.*; import java.rmi.server.*; public class TestImpl extends UnicastRemoteObject implements Test { private String name; public TestImpl(String s) throws RemoteException { // Exporter l objet distant, en étant prêt à // accepter des invocations distantes. super(); name = s; public String test(string s) throws RemoteException { return "<< " + s + ">>"; public static void main(string args[]) { // Installer un nouveau security manager System.setSecurityManager(new RMISecurityManager()); try { // Créer une (ou plusieurs) instance // de l objet distant TestImpl obj = new TestImpl("TestServer"); // Enregistrer l objet auprès du service // de nommage par défaut Naming.rebind("//moo/TestServer", obj); catch (Exception e) { System.out.println("Error: " + e); e.printstacktrace(); 14
15 Client (TestApplet.java) package fr.ensmp; import java.awt.*; import java.rmi.*; public class TestApplet extends java.applet.applet { String answer = ""; public void init() { try { String host = getcodebase().gethost(); String url = "//" + host + "/TestServer"; Test obj = (Test) Naming.lookup(url); answer = obj.test("toto"); catch (Exception e) { System.out.println("Error: " + e); e.printstacktrace(); public void paint(graphics g) { g.drawstring(answer, 25, 50); 15
16 Page HTML (test.html) <HTML> <TITLE>Test</TITLE> La réponse de l objet distant est : <p> <APPLET CODEBASE="../.." CODE="fr.ensmp.TestApplet" WIDTH=500 HEIGHT=120> </APPLET> </HTML> 16
17 Création des stubs Implémentation réseau transparente de l interface Test Retourné par Naming.lookup Compilation de Test.java TestImpl.java TestApplet.java Utilisation de rmic rmic fr.ensmp.testimpl --> TestImpl_Stub.class (client) --> TestImpl_Skel.class (serveur) 17
18 Mise en place Installer les classes cp *.class /public_html/rmi/fr/ensmp/ Installer le html cp *.html /public_html/rmi/fr/ensmp/ Démarrer le service de nommage (port 1099) rmiregistry & rmiregistry 2001 & Redémarrer le service si les classes sont modifiées Démarrer le serveur java -Djava.rmi.server.codebase=\ " bourdonc/rmi/" fr.ensmp.testimpl Lancer l applet bourdonc/rmi/fr/ensmp/test.html 18
19 Implémentation de RMI Objet sérialisables Envoi d une copie de l objet sur le réseau Envoi de l instance elle-même (sérialisation) Chargement éventuel du code (à la main) Chargeur/serveur de classe réseau Exécution de ses méthodes à distances (réflexion) 19
20 Chargeur de classe class NetworkClassLoader extends ClassLoader { String host; int port; Hashtable cache = new Hashtable(); NetworkClassLoader(String host, int port) { this.host = host; this.port = port; public synchronized Class loadclass(string name, boolean resolve) throws ClassNotFoundException { Class cl; byte bytes[]; if ((cl = (Class) cache.get(name))!= null) { return cl; try { return super.findsystemclass(name); catch (ClassNotFoundException e) { try { Socket s = new Socket(host, port); ObjectInputStream ois = new ObjectInputStream(s.getInputStream()); ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream()); oos.writeobject(name); oos.flush(); bytes = (byte[]) ois.readobject(); cl = defineclass(bytes, 0, bytes.length); if (cl == null) { throw new ClassFormatError(); catch (Exception e) { throw new ClassNotFoundException(); if (resolve) { resolveclass(cl); cache.put(name, cl); return cl; 20
21 Serveur de classes class ClassServer { static final String repository = "..."; public static void main(string args[]) { try { int port = Integer.parseInt(args[0]); ServerSocket s = new ServerSocket(port); for (;;) { Socket c = s.accept(); ObjectOutputStream ois = new ObjectInputStream(c.getInputStream()); ObjectOutputStream oos = new ObjectOutputStream(c.getOutputStream()); try { String name = (String) in.readobject(); File file= new File(repository, name + ".class"); FileInputStream fi = new FileInputStream(file); int available = fi.available(); byte bytes[] = new byte[available]; if (fi.read(bytes) == available) { oos.writeobject(bytes); catch (Exception e) { oos.close(); ois.close(); c.close(); catch (Exception e) { System.err.println("Error: " + e); System.exit(1); 21
22 Exécution sur le serveur class NetworkInputStream extends ObjectInputStream { private ClassLoader loader = null; NetworkInputStream(ClassLoader loader, InputStream is) throws IOException, StreamCorruptedException { super(is); this.loader = loader; protected Class resolveclass(objectstreamclass v) { try { return loader.loadclass(v.getname()); catch (Exception e) { return null; public class RmiServer {... // Exécute la méthode "exec" de l objet lu sur "is" public void execute(inputstream is) { try { NetworkClassLoader ncl = new NetworkClassLoader("moo", 8001); NetworkInputStream nis = new NetworkInputStream(ncl, is); // On lit l objet, en chargeant les classes a la volée Object obj = nis.readobject(); // On obtient la class de l objet Class c = obj.getclass(); // On recupère et on invoque la méthode "void exec()" Method m = c.getdeclaredmethod("exec", new Class[0]); m.invoke(obj, new Object[0]); catch (Exception e) { System.out.println("Error: " + e); 22
Remote Method Invocation
1 / 22 Remote Method Invocation Jean-Michel Richer jean-michel.richer@univ-angers.fr http://www.info.univ-angers.fr/pub/richer M2 Informatique 2010-2011 2 / 22 Plan Plan 1 Introduction 2 RMI en détails
More informationWeb Programming: Announcements. Sara Sprenkle August 3, 2006. August 3, 2006. Assignment 6 due today Project 2 due next Wednesday Review XML
Web Programming: Java Servlets and JSPs Sara Sprenkle Announcements Assignment 6 due today Project 2 due next Wednesday Review XML Sara Sprenkle - CISC370 2 1 Web Programming Client Network Server Web
More informationDevelopment of Web Applications
Development of Web Applications Principles and Practice Vincent Simonet, 2013-2014 Université Pierre et Marie Curie, Master Informatique, Spécialité STL 3 Server Technologies Vincent Simonet, 2013-2014
More informationACM Crossroads Student Magazine The ACM's First Electronic Publication
Page 1 of 8 ACM Crossroads Student Magazine The ACM's First Electronic Publication Crossroads Home Join the ACM! Search Crossroads crossroads@acm.org ACM / Crossroads / Columns / Connector / An Introduction
More informationExempleRMI.java. // Fichier de defintion des droits et proprietes // System.setProperty("java.security.policy","../server.java.
ExempleRMI.java import java.lang.*; import java.rmi.registry.*; import java.rmi.server.*; import java.io.*; import java.util.*; ExempleRMI.java import pkgexemple.*; public class ExempleRMI public static
More informationJava Servlets. St. Louis Java Special Interest Group March, 1999
Java Servlets St. Louis Java Special Interest Group March, 1999 Eric M. Burke Sr. Software Engineer Object Computing, Inc. http://home.fiastl.net/ericb/ What are Applets? Web browser extensions Applets
More informationBrazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/
Brazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/ version du 26 Mai 2003 : JDBC-SQL et Brazil pré-requis : lecture de Tutorial JDBC de Sun Bibliographie Brazil [Bra00]www.sun.com/research/brazil
More informationTP1 : Correction. Rappels : Stream, Thread et Socket TCP
Université Paris 7 M1 II Protocoles réseaux TP1 : Correction Rappels : Stream, Thread et Socket TCP Tous les programmes seront écrits en Java. 1. (a) Ecrire une application qui lit des chaines au clavier
More information! "# $%&'( ) * ).) "%&' 1* ( %&' ! "%&'2 (! ""$ 1! ""3($
! "# $%&'( ) * +,'-( ).) /"0'" 1 %&' 1* ( %&' "%&'! "%&'2 (! ""$ 1! ""3($ 2 ', '%&' 2 , 3, 4( 4 %&'( 2(! ""$ -5%&'* -2%&'(* ) * %&' 2! ""$ -*! " 4 , - %&' 3( #5! " 5, '56! "* * 4(%&'(! ""$ 3(#! " 42/7'89.:&!
More informationNetwork Communication
Network Communication Outline Sockets Datagrams TCP/IP Client-Server model OSI Model Sockets Endpoint for bidirectional communication between two machines. To connect with each other, each of the client
More informationWhen the transport layer tries to establish a connection with the server, it is blocked by the firewall. When this happens, the RMI transport layer
Firewall Issues Firewalls are inevitably encountered by any networked enterprise application that has to operate beyond the sheltering confines of an Intranet Typically, firewalls block all network traffic,
More informationThursday, February 7, 2013. DOM via PHP
DOM via PHP Plan PHP DOM PHP : Hypertext Preprocessor Langage de script pour création de pages Web dynamiques Un ficher PHP est un ficher HTML avec du code PHP
More informationTP N 10 : Gestion des fichiers Langage JAVA
TP N 10 : Gestion des fichiers Langage JAVA Rappel : Exemple d utilisation de FileReader/FileWriter import java.io.*; public class Copy public static void main(string[] args) throws IOException File inputfile
More informationLangages Orientés Objet Java
Langages Orientés Objet Java Exceptions Arnaud LANOIX Université Nancy 2 24 octobre 2006 Arnaud LANOIX (Université Nancy 2) Langages Orientés Objet Java 24 octobre 2006 1 / 32 Exemple public class Example
More informationServlets. Based on Notes by Dave Hollinger & Ethan Cerami Also, the Online Java Tutorial by Sun
Servlets Based on Notes by Dave Hollinger & Ethan Cerami Also, the Online Java Tutorial by Sun 1 What is a Servlet? A Servlet is a Java program that extends the capabilities of servers. Inherently multi-threaded.
More informationPOB-JAVA Documentation
POB-JAVA Documentation 1 INTRODUCTION... 4 2 INSTALLING POB-JAVA... 5 Installation of the GNUARM compiler... 5 Installing the Java Development Kit... 7 Installing of POB-Java... 8 3 CONFIGURATION... 9
More informationIntroduction to J2EE Web Technologies
Introduction to J2EE Web Technologies Kyle Brown Senior Technical Staff Member IBM WebSphere Services RTP, NC brownkyl@us.ibm.com Overview What is J2EE? What are Servlets? What are JSP's? How do you use
More informationCSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, 2004. Java Servlets
CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, 2004 Java Servlets I have presented a Java servlet example before to give you a sense of what a servlet looks like. From the example,
More information2. Follow the installation directions and install the server on ccc
Installing a Web Server 1. Install a sample web server, which supports Servlets/JSPs. A light weight web server is Apache Tomcat server. You can get the server from http://tomcat.apache.org/ 2. Follow
More informationProgrammation RMI Sécurisée
Programmation RMI Sécurisée 5 janvier 2012 D après http ://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_based. A Code RMI de Base A.1 Les fichiers Hello.java public i n t e r f a c e Hello extends
More informationRemote Method Invocation in JAVA
Remote Method Invocation in JAVA Philippe Laroque Philippe.Laroque@dept-info.u-cergy.fr $Id: rmi.lyx,v 1.2 2003/10/23 07:10:46 root Exp $ Abstract This small document describes the mechanisms involved
More informationLecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss
Lecture 7: Java RMI CS178: Programming Parallel and Distributed Systems February 14, 2001 Steven P. Reiss I. Overview A. Last time we started looking at multiple process programming 1. How to do interprocess
More informationDifferent types of resources are specified by their scheme, each different pattern is implemented by a specific protocol:
Chapter 8 In this chapter we study the features of Java that allows us to work directly at the URL (Universal Resource Locator) and we are particularly interested in HTTP (Hyper Text Transfer Protocol).
More information2.8. Session management
2.8. Session management Juan M. Gimeno, Josep M. Ribó January, 2008 Session management. Contents Motivation Hidden fields URL rewriting Cookies Session management with the Servlet/JSP API Examples Scopes
More informationINSIDE SERVLETS. Server-Side Programming for the Java Platform. An Imprint of Addison Wesley Longman, Inc.
INSIDE SERVLETS Server-Side Programming for the Java Platform Dustin R. Callaway TT ADDISON-WESLEY An Imprint of Addison Wesley Longman, Inc. Reading, Massachusetts Harlow, England Menlo Park, California
More informationAnnexe - OAuth 2.0. 1 Introduction. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014
1 Introduction Annexe - OAuth 2.0. Xavier de Rochefort xderoche@labri.fr - labri.fr/~xderoche 15 mai 2014 Alternativement à Flickr, notre serveur pourrait proposer aux utilisateurs l utilisation de leur
More informationJava EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java
Java EE Introduction, Content Component Architecture: Why and How Java EE: Enterprise Java The Three-Tier Model The three -tier architecture allows to maintain state information, to improve performance,
More informationIntroduction au BIM. ESEB 38170 Seyssinet-Pariset Economie de la construction email : contact@eseb.fr
Quel est l objectif? 1 La France n est pas le seul pays impliqué 2 Une démarche obligatoire 3 Une organisation plus efficace 4 Le contexte 5 Risque d erreur INTERVENANTS : - Architecte - Économiste - Contrôleur
More informationClojure Web Development
Clojure Web Development Philipp Schirmacher Stefan Tilkov innoq We'll take care of it. Personally. http://www.innoq.com 2011 innoq Deutschland GmbH http://upload.wikimedia.org/wikip 2011 innoq Deutschland
More informationRemote Method Invocation
Remote Method Invocation The network is the computer Consider the following program organization: method call SomeClass AnotherClass returned object computer 1 computer 2 If the network is the computer,
More informationPrinciples and Techniques of DBMS 5 Servlet
Principles and Techniques of DBMS 5 Servlet Haopeng Chen REliable, INtelligentand Scalable Systems Group (REINS) Shanghai Jiao Tong University Shanghai, China http://reins.se.sjtu.edu.cn/~chenhp e- mail:
More informationCreating a Simple, Multithreaded Chat System with Java
Creating a Simple, Multithreaded Chat System with Java Introduction by George Crawford III In this edition of Objective Viewpoint, you will learn how to develop a simple chat system. The program will demonstrate
More informationOutline. Lecture 9: Java Servlet and JSP. Servlet API. HTTP Servlet Basics
Lecture 9: Java Servlet and JSP Wendy Liu CSC309F Fall 2007 Outline HTTP Servlet Basics Servlet Lifecycle Request and Response Session Management JavaServer Pages (JSP) 1 2 HTTP Servlet Basics Current
More informationSERVLETSTUTORIAL. Simply Easy Learning by tutorialspoint.com. tutorialspoint.com
Servlets Tutorial SERVLETSTUTORIAL by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Servlets Tutorial Servlets provide a component-based, platform-independent method for building Web-based
More informationJava Network. Slides prepared by : Farzana Rahman
Java Network Programming 1 Important Java Packages java.net java.io java.rmi java.security java.lang TCP/IP networking I/O streams & utilities Remote Method Invocation Security policies Threading classes
More information11.1 Web Server Operation
11.1 Web Server Operation - Client-server systems - When two computers are connected, either could be the client - The client initiates the communication, which the server accepts - Generally, clients
More information15-415 Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System
15-415 Database Applications Recitation 10 Project 3: CMUQFlix CMUQ s Movies Recommendation System Project Objective 1. Set up a front-end website with PostgreSQL back-end 2. Allow users to login, like
More informationDivision of Informatics, University of Edinburgh
CS1Bh Lecture Note 20 Client/server computing A modern computing environment consists of not just one computer, but several. When designing such an arrangement of computers it might at first seem that
More informationCHAPTER 5. Java Servlets
,ch05.3555 Page 135 Tuesday, April 9, 2002 7:05 AM Chapter 5 CHAPTER 5 Over the last few years, Java has become the predominant language for server-side programming. This is due in no small part to the
More informationRemote Method Invocation (RMI)
Remote Method Invocation (RMI) Remote Method Invocation (RMI) allows us to get a reference to an object on a remote host and use it as if it were on our virtual machine. We can invoke methods on the remote
More informationIntroduktion til distribuerede systemer uge 37 - fil og webserver
Introduktion til distribuerede systemer uge 37 - fil og webserver Rune Højsgaard 090678 1. delsstuderende 13. september 2005 1 Kort beskrivelse Implementationen af filserver og webserver virker, men håndterer
More informationManual. Programmer's Guide for Java API
2013-02-01 1 (15) Programmer's Guide for Java API Description This document describes how to develop Content Gateway services with Java API. TS1209243890 1.0 Company information TeliaSonera Finland Oyj
More informationAgenda. Summary of Previous Session. Application Servers G22.3033-011. Session 3 - Main Theme Page-Based Application Servers (Part II)
Application Servers G22.3033-011 Session 3 - Main Theme Page-Based Application Servers (Part II) Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical
More informationSzervletek. ANTAL Margit. Sapientia - EMTE, Pannon Forrás,,Egységes erdélyi felnőttképzés a
Sapientia - EMTE, Pannon Forrás,,Egységes erdélyi felnőttképzés a Kárpát-medencei hálózatban 2010 HTTP kérés-válasz modell A Servlet API közötti kommunikáció Megjelenítési komponens Vezérlési komponens
More informationCHAPTER 9: SERVLET AND JSP FILTERS
Taken from More Servlets and JavaServer Pages by Marty Hall. Published by Prentice Hall PTR. For personal use only; do not redistribute. For a complete online version of the book, please see http://pdf.moreservlets.com/.
More informationHow to program Java Card3.0 platforms?
How to program Java Card3.0 platforms? Samia Bouzefrane CEDRIC Laboratory Conservatoire National des Arts et Métiers samia.bouzefrane@cnam.fr http://cedric.cnam.fr/~bouzefra Smart University Nice, Sophia
More informationJava 2 Web Developer Certification Study Guide Natalie Levi
SYBEX Sample Chapter Java 2 Web Developer Certification Study Guide Natalie Levi Chapter 8: Thread-Safe Servlets Copyright 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights
More informationTP : Système de messagerie - Fichiers properties - PrepareStatement
TP : Système de messagerie - Fichiers properties - PrepareStatement exelib.net Une société souhaite mettre en place un système de messagerie entre ses employés. Les travaux de l équipe chargée de l analyse
More informationINTRODUCTION TO WEB TECHNOLOGY
UNIT-I Introduction to Web Technologies: Introduction to web servers like Apache1.1, IIS, XAMPP (Bundle Server), WAMP Server(Bundle Server), handling HTTP Request and Response, installation of above servers
More informationQuestion1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime?
CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Working as a group. Working in small gruops of 2-4 students. When you work as a group, you have to return only one home assignment per
More informationArjun V. Bala Page 20
12) Explain Servlet life cycle & importance of context object. (May-13,Jan-13,Jun-12,Nov-11) Servlet Life Cycle: Servlets follow a three-phase life cycle, namely initialization, service, and destruction.
More informationAn introduction to web programming with Java
Chapter 1 An introduction to web programming with Java Objectives Knowledge Objectives (continued) The first page of a shopping cart application The second page of a shopping cart application Components
More informationPenetration from application down to OS
April 8, 2009 Penetration from application down to OS Getting OS access using IBM Websphere Application Server vulnerabilities Digitаl Security Research Group (DSecRG) Stanislav Svistunovich research@dsecrg.com
More informationWeb Container Components Servlet JSP Tag Libraries
Web Application Development, Best Practices by Jeff Zhuk, JavaSchool.com ITS, Inc. dean@javaschool.com Web Container Components Servlet JSP Tag Libraries Servlet Standard Java class to handle an HTTP request
More informationIntroduction Les failles les plus courantes Les injections SQL. Failles Web. Maxime Arthaud. net7. Jeudi 03 avril 2014.
Maxime Arthaud net7 Jeudi 03 avril 2014 Syllabus Introduction Exemple de Requête Transmission de données 1 Introduction Exemple de Requête Transmission de données 2 3 Exemple de Requête Transmission de
More informationLesson: All About Sockets
All About Sockets http://java.sun.com/docs/books/tutorial/networking/sockets/index.html Page 1 sur 1 The Java TM Tutorial Start of Tutorial > Start of Trail Trail: Custom Networking Lesson: All About Sockets
More informationPlease send your comments to: KZrobok@Setfocus.com
Sun Certified Web Component Developer Study Guide - v2 Sun Certified Web Component Developer Study Guide...1 Authors Note...2 Servlets...3 The Servlet Model...3 The Structure and Deployment of Modern Servlet
More informationEssentials of the Java(TM) Programming Language, Part 1
Essentials of the Java(TM) Programming Language, Part 1 http://developer.java.sun.com/developer...ining/programming/basicjava1/index.html Training Index Essentials of the Java TM Programming Language:
More informationCreating Java EE Applications and Servlets with IntelliJ IDEA
Creating Java EE Applications and Servlets with IntelliJ IDEA In this tutorial you will: 1. Create IntelliJ IDEA project for Java EE application 2. Create Servlet 3. Deploy the application to JBoss server
More informationServlet and JSP Filters
2009 Marty Hall Servlet and JSP Filters Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/
More informationBAPI. Business Application Programming Interface. Compiled by Y R Nagesh 1
BAPI Business Application Programming Interface Compiled by Y R Nagesh 1 What is BAPI A Business Application Programming Interface is a precisely defined interface providing access process and data in
More informationJava Servlet Tutorial. Java Servlet Tutorial
Java Servlet Tutorial i Java Servlet Tutorial Java Servlet Tutorial ii Contents 1 Introduction 1 1.1 Servlet Process.................................................... 1 1.2 Merits.........................................................
More information«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08)
«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08) Mathieu Lemoine 2008/02/25 Craig Chambers : Professeur à l Université de Washington au département de Computer Science and Engineering,
More informationIntroduction to Java. Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233. ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1
Introduction to Java Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233 ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1 What Is a Socket? A socket is one end-point of a two-way
More informationLicence Informatique Année 2005-2006. Exceptions
Université Paris 7 Java Licence Informatique Année 2005-2006 TD n 8 - Correction Exceptions Exercice 1 La méthode parseint est spécifiée ainsi : public static int parseint(string s) throws NumberFormatException
More informationCh-03 Web Applications
Ch-03 Web Applications 1. What is ServletContext? a. ServletContext is an interface that defines a set of methods that helps us to communicate with the servlet container. There is one context per "web
More informationNote concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)
Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Veuillez vérifier les éléments suivants avant de nous soumettre votre accord : 1. Vous avez bien lu et paraphé
More informationCIS 455/555: Internet and Web Systems
CIS 455/555: Internet and Web Systems Fall 2015 Assignment 1: Web and Application Server Milestone 1 due September 21, 2015, at 10:00pm EST Milestone 2 due October 6, 2015, at 10:00pm EST 1. Background
More informationThe Java Series Introduction to Java RMI and CORBA. The Java Series. Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1
The Java Series Introduction to Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1 What are RMI and CORBA for? Usually, in your application, once you instantiate objects, you can invoke methods
More informationAn Overview of Java. overview-1
An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2
More informationPiotr Nowicki's Homepage. Java EE 6 SCWCD Mock Exam. "Simplicity is the ultimate sophistication." Important!
Piotr Nowicki's Homepage "Simplicity is the ultimate sophistication." Java EE 6 SCWCD Mock Exam Posted on March 27, 2011 by Piotr 47 Replies Edit This test might help to test your knowledge before taking
More informationPure server-side Web Applications with Java, JSP. Application Servers: the Essential Tool of Server-Side Programming. Install and Check Tomcat
Pure server-side Web Applications with Java, JSP Discussion of networklevel http requests and responses Using the Java programming language (Java servlets and JSPs) Key lesson: The role of application
More informationAnnouncements. Comments on project proposals will go out by email in next couple of days...
Announcements Comments on project proposals will go out by email in next couple of days... 3-Tier Using TP Monitor client application TP monitor interface (API, presentation, authentication) transaction
More informationConfigure a SOAScheduler for a composite in SOA Suite 11g. By Robert Baumgartner, Senior Solution Architect ORACLE
Configure a SOAScheduler for a composite in SOA Suite 11g By Robert Baumgartner, Senior Solution Architect ORACLE November 2010 Scheduler for the Oracle SOA Suite 11g: SOAScheduler Page 1 Prerequisite
More informationCS 1302 Ch 19, Binary I/O
CS 1302 Ch 19, Binary I/O Sections Pages Review Questions Programming Exercises 19.1-19.4.1, 19.6-19.6 710-715, 724-729 Liang s Site any Sections 19.1 Introduction 1. An important part of programming is
More informationIn this chapter the concept of Servlets, not the entire Servlet specification, is
falkner.ch2.qxd 8/21/03 4:57 PM Page 31 Chapter 2 Java Servlets In this chapter the concept of Servlets, not the entire Servlet specification, is explained; consider this an introduction to the Servlet
More informationWeb Application Programmer's Guide
Web Application Programmer's Guide JOnAS Team ( Florent BENOIT) - March 2009 - Copyright OW2 consortium 2008-2009 This work is licensed under the Creative Commons Attribution-ShareAlike License. To view
More informationwww.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk
CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling
More informationIntroduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme
GEAL 1.2 Generic Evolutionary Algorithm Library http://dpt-info.u-strasbg.fr/~blansche/fr/geal.html 1 /38 Introduction GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires Objectifs Généricité
More informationReport of the case study in Sistemi Distribuiti A simple Java RMI application
Report of the case study in Sistemi Distribuiti A simple Java RMI application Academic year 2012/13 Vessio Gennaro Marzulli Giovanni Abstract In the ambit of distributed systems a key-role is played by
More informationHow to use JavaMail to send email
Chapter 15 How to use JavaMail to send email Objectives Applied Knowledge How email works Sending client Mail client software Receiving client Mail client software SMTP Sending server Mail server software
More informationAssignment 4 Solutions
CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Solutions Working as a pair Working in pairs. When you work as a pair you have to return only one home assignment per pair on a round.
More informationJava and Web. WebWork
Java and Web WebWork Client/Server server client request HTTP response Inside the Server (1) HTTP requests Functionality for communicating with clients using HTTP CSS Stat. page Dyn. page Dyn. page Our
More informationCours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr
Cours de Java Sciences-U Lyon Java - Introduction Java - Fondamentaux Java Avancé http://www.rzo.free.fr Pierre PARREND 1 Octobre 2004 Sommaire Java Introduction Java Fondamentaux Java Avancé GUI Graphical
More informationUsability. Usability
Objectives Review Usability Web Application Characteristics Review Servlets Deployment Sessions, Cookies Usability Trunk Test Harder than you probably thought Your answers didn t always agree Important
More informationThe Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits)
Binary I/O streams (ascii, 8 bits) InputStream OutputStream The Java I/O System The decorator design pattern Character I/O streams (Unicode, 16 bits) Reader Writer Comparing Binary I/O to Character I/O
More informationB.Sc (Honours) - Software Development
Galway-Mayo Institute of Technology B.Sc (Honours) - Software Development E-Commerce Development Technologies II Lab Session Using the Java URLConnection Class The purpose of this lab session is to: (i)
More informationTP JSP : déployer chaque TP sous forme d'archive war
TP JSP : déployer chaque TP sous forme d'archive war TP1: fichier essai.jsp Bonjour Le Monde JSP Exemple Bonjour Le Monde. Après déploiement regarder dans le répertoire work de l'application
More informationPA165 - Lab session - Web Presentation Layer
PA165 - Lab session - Web Presentation Layer Author: Martin Kuba Goal Experiment with basic building blocks of Java server side web technology servlets, filters, context listeners,
More informationManaging Data on the World Wide-Web
Managing Data on the World Wide-Web Sessions, Listeners, Filters, Shopping Cart Elad Kravi 1 Web Applications In the Java EE platform, web components provide the dynamic extension capabilities for a web
More informationLearning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP
CP4044 Lecture 7 1 Networking Learning Outcomes To understand basic network terminology To be able to communicate using Telnet To be aware of some common network services To be able to implement client
More informationPersonnalisez votre intérieur avec les revêtements imprimés ALYOS design
Plafond tendu à froid ALYOS technology ALYOS technology vous propose un ensemble de solutions techniques pour vos intérieurs. Spécialiste dans le domaine du plafond tendu, nous avons conçu et développé
More informationJava Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol).
Java Network Programming The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). The DatagramSocket class uses UDP (connectionless protocol). The java.net.socket
More informationDesign and Evaluation of an Extensible Web & Telephony Server (J-K Kernel)
Design and Evaluation of an Extensible Web & Telephony Server based on the J-Kernel Daniel Spoonhower, Grzegorz Czajkowski, Chris Hawblitzel, Chi-Chao Chang, Deyu Hu, and Thorsten von Eicken Department
More information7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,...
7 Web Databases Access to Web Databases: Servlets, Applets Java Server Pages PHP, PEAR Languages: Java, PHP, Python,... Prof. Dr. Dietmar Seipel 837 7.1 Access to Web Databases by Servlets Java Servlets
More informationInterfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008)
Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008) Ce document répertorie les interfaces de programmation que les développeurs peuvent utiliser pour créer des applications
More informationCSS : petits compléments
CSS : petits compléments Université Lille 1 Technologies du Web CSS : les sélecteurs 1 au programme... 1 ::before et ::after 2 compteurs 3 media queries 4 transformations et transitions Université Lille
More informationThe Collaborative Information Portal and NASA s Mars Rover Mission
The Collaborative Information Portal and NASA s Mars Rover Mission Bildquelle: Ronald Mak, University of California, Santa Cruz Joan Walton, NASA Ames Research Center Qualitative Anfoderungen Message-Service
More informationWeb Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE
Enterprise Application Development using J2EE Shmulik London Lecture #6 Web Programming II JSP (Java Server Pages) How we approached it in the old days (ASP) Multiplication Table Multiplication
More informationApplication Security
2009 Marty Hall Declarative Web Application Security Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/
More information