Servletek, J2EE. Több réteg! architektúrák

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Servletek, J2EE. Több réteg! architektúrák"

Transcription

1 Servletek, J2EE 2 Több réteg! architektúrák Kommunikációs minták Client- Server 3-Tier Web Application Web Services Hybrid P2P Fractal

2 3 Web alkalmazások Business Systems DB Server App Server Web Server Browser Client J2EE J2SE/ J2ME Web Application 4 Web services Bus. Sys. DB App Web Browser XML (UDDI, SOAP) Context and Identity (LDAP, Policy, Liberty) J2EE J2SE/ J2ME Web Service

3 5 Servletek dinamikus html tartalom generálás üzleti alkalmazás web interfészének kialakítása servletek Java technológia webszerver kiterjesztése 6 Servletek vs. CGI Servlet el!nyök Hatékonyság Kényelem Platform és szerver független Session management Request Request CGI1 CGI1 Biztonságos Request CGI2 Request CGI2 Request Request CGI1 CGI1 CGI CGI Based Webserver Child Child for for CGI1 CGI1 Child Child for for CGI2 CGI2 Child Child for for CGI1 CGI1 Request Request Servlet1 Servlet1 Request Request Servlet2 Servlet2 Request Servlet1 Servlet Servlet Based Based Webserver Webserver Servlet1 Servlet1 JVM JVM Servlet2 Servlet2

4 7 J2EE konténerek Komponensek végrehajtási környezete Egyszer" API Transzparensek Enterprise API biztosítása Applet Container Web Container EJB Container Applet HTTP/ JSP Servlet EJB HTTPS RMI J2SE App Client Container App Client HTTP/ HTTPS JNDI J2SE RMI JNDI JMS RMI/IIOP JMS JDBC JTA JavaMail JAF RMI/IIOP JDBC JNDI JMS JTA JavaMail JAF RMI/IIOP JDBC J2SE J2SE Database 76 8 Servlet m!ködése Server Machine Servlet Java Class Client Machine Web Browser HTML doget or dopost HTML Web Server Init Service HTML HTML doget dopost Destroy

5 9 Servlet osztályok Servlet Basic Servlet Layer Method: service ServletRequest ServletResponse HttpServlet Methods: Service doget dopost init destroy etc. Http Servlet Layer HttpServletRequest HttpServletResponse MyServlet Methods: doget dopost init destroy etc. Your Servlet Code 10 doget, dopost public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException public void doput(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException HttpServletRequest kérés paraméterei, http fejléc mez!k, post adatok HttpServletResponse válasz fejléc, html tartalom

6 11 Servlet output public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title>first Servlet program</title></head>"); out.println("<body>"); out.println("<h1>welcome to Servlets</H1>"); out.println("</body>"); out.println("</html>"); out.close(); 12 Servlet konténerek Apache Tomcat (referencia implementáció) Allaire JRun Gefion LiteWebServer Sun Java Web Server

7 13 Servlet kód template import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ServletTemplate extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { // Use "request" to read incoming HTTP headers // (e.g. cookies) and HTML form data (e.g. data the user // entered and submitted). // Use "response" to specify the HTTP response status // code and headers (e.g. the content type, cookies). PrintWriter out = response.getwriter(); // Use "out" to send content to browser 14 Servlet példa import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head>"); out.println("<title>hola</title>"); out.println("</head>"); out.println("<body bgcolor=\"white\">"); out.println("<h1> Hi </h1>"); out.println("</body>"); out.println("</html>");

8 15 A servlet telepítése Context web application <inst.dir>/conf/server.xml <inst.dir>/webapps dir mine mine/web-inf mine/web-inf/classes mine/web-inf/lib mine/web-inf/web.xml <inst.dir>/tomcat-docs/appdev/ web.xml.txt 16 web.xml <display-name>my Web Application</display-name> <description> Examples by Me </description> [...] <context-param> <param-name>webmaster</param-name> <description> The address of the administrator to whom questions and comments about this application should be addressed. </description> </context-param> <servlet> <servlet-name>hi</servlet-name> <description> Testing </description> <servlet-class>hi</servlet-class> </servlet> <servlet-mapping> <servlet-name>hi</servlet-name> <url-pattern>/hi</url-pattern> </servlet-mapping>

9 17 Servlet életciklus // load the servlet class and setup request, response objects Servlet servlet = ServletRequest request = ServletResponse response = // initialise servlet ServletConfig config = servlet.getservletconfig(); servlet.init(config); // service zero or more requests while ( more requests ) // invoke servlet to process request servlet.service(request, service); Call to methods doget(), dopost() in the user defined servlet class // cleanup after service servlet.destroy(); Unlike CGI a single servlet can service several requests. In CGI, server invokes a separate process for each request. Servlets therefore reduce server load CCTM: Course material developed by James King 18 Inicializálás import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Example using servlet initialization. Here, the message * to print and the number of times the message should be * repeated is taken from the init parameters. */ public class ShowMessage extends HttpServlet { private String message; private String defaultmessage = "No message."; private int repeats = 1; public void init(servletconfig config) throws ServletException { // Always call super.init super.init(config); message = config.getinitparameter("message"); if (message == null) { message = defaultmessage; try { String repeatstring = config.getinitparameter("repeats"); repeats = Integer.parseInt(repeatString); catch(numberformatexception nfe) { // NumberFormatException handles case where repeatstring // is null *and* case where it is something in an // illegal format. Either way, do nothing in catch, // as the previous value (1) for the repeats field will // remain valid because the Integer.parseInt throws // the exception *before* the value gets assigned // to repeats. <?xml version="1.0" encoding="iso "?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2// EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"> <web-app> <servlet> <servlet-name> ShowMsg </servlet-name> <servlet-class> coreservlets.showmessage </servlet-class> <init-param> <param-name> message </param-name> <param-value> Shibboleth </param-value> </init-param> <init-param> <param-name> repeats </param-name> <param-value> 5 </param-value> </init-param> </servlet> </web-app> web.xml

10 19 Inicializálás (példa) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Example using servlet initialization and the * getlastmodified method. */ public class LotteryNumbers extends HttpServlet { private long modtime; private int[] numbers = new int[10]; /** The init method is called only when the servlet * is first loaded, before the first request * is processed. */ public void init() throws ServletException { // Round to nearest second (ie 1000 milliseconds) modtime = System.currentTimeMillis()/1000*1000; for(int i=0; i<numbers.length; i++) { numbers[i] = randomnum(); public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); String title = "Your Lottery Numbers"; out.println(servletutilities.headwithtitle(title) +"<BODY BGCOLOR=\"#FDF5E6\">\n" + "<H1 ALIGN=CENTER>" + title + "</H1>\n" + "<B>Based upon extensive research of " + "astro-illogical trends, psychic farces, " + "and detailed statistical claptrap, " + "we have chosen the " + numbers.length + " best lottery numbers for you.</b>" + "<OL>"); for(int i=0; i<numbers.length; i++) { out.println(" <LI>" + numbers[i]); out.println("</ol>" + "</BODY></HTML>"); 20 Inicializálás (példa folyt.) /** The standard service method compares this date * against any date specified in the If-Modified-Since * request header. If the getlastmodified date is * later, or if there is no If-Modified-Since header, * the doget method is called normally. But if the * getlastmodified date is the same or earlier, * the service method sends back a 304 (Not Modified) * response, and does <B>not</B> call doget. * The browser should use its cached version of * the page in such a case. */ public long getlastmodified(httpservletrequest request) { return(modtime); // A random int from 0 to 99. private int randomnum() { return((int)(math.random() * 100));

11 21 HttpServletRequest osztály String getmethod() obtain the HTTP request is it a GET or POST String getparameter(string name) - get a parameter (covered later) String getremotehost() - client s host name String getremoteaddr() - IP address of client String getservername() - servers name int getserverport() - port on which server was initially contacted on (8080 is usually intranet only and not accessible from outside) String getheader("user-agent") - name of client s web browser String getheader("referer") - URL of page that called the servlet some more methods HttpServletRequest példa import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ServEnvData extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title>environment Data</TITLE></HEAD>"); out.println("<body>"); out.println("<h1>servlet Environment</H1>"); out.println("<b>method:</b>"+request.getmethod()+"<br>"); out.println("<b>client Host:</B>"+request.getRemoteHost()+"<BR>"); out.println("<b>client's IP Address:</B>"+request.getRemoteAddr()+"<BR>"); out.println("<b>server Name:</B>"+request.getServerName()+"<BR>"); out.println("<b>server Port:</B>"+request.getServerPort()+"<BR>"); out.println("<b>client's Browser:</B>"+request.getHeader("User-Agent")+"<BR>"); out.println("<b>client's URL:</B>"+request.getHeader("Referer")+"<BR>"); out.println("</body>"); out.println("</html>"); out.close();

12 23 HttpServletRequest példa (folyt.) 24 HttpServletResponse osztály void response.addcookie(cookie cookie) void response.senderror(int status) - standard HTTP status codes void response.sendstatus(int status) - send HTTP status codes that are not errors void response.sendredirect(string location) - sends a redirect response to the client some more methods...

13 25 URL és form paraméterek <a href="http://www3.unl.ac.uk:8186/kingj1/servlet/param?p1=hello"> click here for a parameter example! </a> String parameter=request.getparameter("p1"); <a href="http://www3.unl.ac.uk:8186/kingj1/servlet/param? p1=hello&p2=goodbye"> click here for a parameter example! </a> Enumeration p=request.getparameternames(); while (p.hasmoreelements()) { String n=(string)p.nextelement(); String v=request.getparameter(n); out.println("parameter name is "+n+" parameter value" +v+"<br>"); 26 Kiszolgálás több szálon servlet meghívása konkurrens kérésekb!l globális változók kezelése?

14 27 Nem megfelel" megoldás (pl.) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class multi extends HttpServlet { int count=0; public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title> Thread UNSAFE example </TITLE> </HEAD> "); out.println("<body>"); out.println("<h1> old count is "+count+"</h1>"); count=count+1; try { Thread.sleep(4000); catch (Exception e) { out.println("<h1> new count is "+count+"</h1>"); out.println("</body>"); out.println("</html>"); 28 Megoldások nincsenek globális adatok session és cookie kezelés tárolás kliens oldalon kritikus szakasz megvalósítás szinkronizálás

15 29 Synchronized (pl.) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class multi extends HttpServlet { int count=0; Object s=new Object(); public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title> Thread UNSAFE example </TITLE> </HEAD> "); out.println("<body>"); synchronized (s) { out.println("<h1> old count is "+count+"</h1>"); 30 Perzisztens adatok Állapot meg!rzése servlet újratöltések és inicializálások között Szerver részér!l meghatározatlan újratöltési id!pontok

16 31 Probléma (pl.) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class global extends HttpServlet { int count=0; public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title> Global Data Example </TITLE> </HEAD> "); out.println("<body>"); out.println("<h1> old count is "+count+"</h1>"); 32 Megoldás HttpServletContext attribútumok requestben elérhet!k újra fordításkor elveszik

17 33 Megoldás (pl.) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class context extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException { Integer count=new Integer(0); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>"); out.println("<head><title> Global Data Example </TITLE> </HEAD> "); out.println("<body>"); Date d=new Date(); out.println("current time is "+d); ServletContext s=getservletcontext(); count=(integer)s.getattribute("count"); if (count==null) { count=new Integer(0); s.setattribute("count",count); int c=count.intvalue(); out.println("<h1> old count is "+c+"</h1>"); c=c+1; out.println("<h1> new count is "+c+"</h1>"); count=new Integer(c); s.setattribute("count",count); out.println("</body>"); out.println("</html>"); 34 Kliens oldali állapottárolás session kliens életciklus több kérés-válasz páron keresztül szerver adminisztálja egyedi azonosító törlés, élettartam lejárta

18 35 Session ID kezelés URL generálás rejtett form mez! cookie SSL session id 36 Cookie HTML header név, érték (URL) Set-cookie: FavColours=Blue; Max-age=60; Domain=.unl.ac.uk ; Path= / ; korlátozások 20 cookie per webszerver 4 KB méret

19 37 HttpSession nagy mennyiség" struktúrált adat tárolása attribútumok Java objects HttpServletRequest 38 HttpSession (folyt.)... HttpSession s= request.getsession(true); s.setmaxinactiveinterval(60); Integer value=new Integer(0); value=(integer)s.getattribute("value"); if (value==null) { value=new Integer(0); s.setattribute("value",value); out.println("<h1> The session has id "+s.getsessionid()+"</h1>"); out.println("<h1> old value is "+value+"</h1>"); value=new Integer(value.intValue()+1); out.println("<h1> new count is "+ s.getattribute("value") +"</H1>"); s.setattribute("value",value);...

20 39 Cookie kezelés Lekérdezés public void doget(httpservletrequest request, HttpServletResponse response) {. Cookie cookie = null; Cookie[] cookies = request.getcookies(); if (cookiearr!= null) { for (int i = 0; i < cookies.length; i++) { cookie = cookies[i]; String name = cookie.getname(); if (name.equals( FavColours")) { out.println(cookie.value());. Beállítás cookie = new Cookie( FavColours, Blue ); cookie.setmaxage(600); response.addcookie(cookie); 40 Servlet debuggolás wget curl WebClient

First Servlets. Chapter. Topics in This Chapter

First Servlets. Chapter. Topics in This Chapter First Servlets Chapter Topics in This Chapter The basic structure of servlets A simple servlet that generates plain text The process of compiling, installing, and invoking servlets A servlet that generates

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

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

Introduction to Web applications with Java Technology 3- Servlets

Introduction to Web applications with Java Technology 3- Servlets Introduction to Web applications with Java Technology 3- Servlets Juan M. Gimeno, Josep M. Ribó January, 2008 Contents Introduction to web applications with Java technology 1. Introduction. 2. HTTP protocol

More information

SERVLETS INTERVIEW QUESTIONS

SERVLETS INTERVIEW QUESTIONS SERVLETS INTERVIEW QUESTIONS http://www.tutorialspoint.com/servlets/servlets_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Servlets Interview Questions have been designed especially

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

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

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

CHAPTER 2: A FAST INTRODUCTION TO BASIC SERVLET PROGRAMMING

CHAPTER 2: A FAST INTRODUCTION TO BASIC SERVLET PROGRAMMING 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 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

Servlets by Example. Joe Howse 7 June 2011

Servlets by Example. Joe Howse 7 June 2011 Servlets by Example Joe Howse 7 June 2011 What is a servlet? A servlet is a Java application that receives HTTP requests as input and generates HTTP responses as output. As the name implies, it runs on

More information

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA Setting up Java Development Kit This step involves downloading an implementation of the Java Software Development

More information

3 The Servlet Life Cycle

3 The Servlet Life Cycle 3 The Servlet Life Cycle In this chapter: The Servlet Alternative Servlet Reloading Init and Destroy Single-Thread Model Background Processing Last Modified Times The servlet life cycle is one of the most

More information

JdbcResultSet.java. import java.sql.*;

JdbcResultSet.java. import java.sql.*; 1)Write a program to display the current contents of the tables in the database where table name is Registration and attributes are id,firstname,lastname,age. JdbcResultSet.java import java.sql.*; public

More information

J2EE Packaging and Deployment

J2EE Packaging and Deployment Summary of Contents Introduction 1 Chapter 1: The J2EE Platform 9 Chapter 2: Directory Services and JNDI 39 Chapter 3: Distributed Computing Using RMI 83 Chapter 4 Database Programming with JDBC 157 Chapter

More information

Servlets Pearson Education, Inc. All rights reserved.

Servlets Pearson Education, Inc. All rights reserved. 1 26 Servlets 2 A fair request should be followed by the deed in silence. Dante Alighieri The longest part of the journey is said to be the passing of the gate. Marcus Terentius Varro If nominated, I will

More information

Oracle Containers for J2EE

Oracle Containers for J2EE Oracle Containers for J2EE Servlet Developer's Guide 10g (10.1.3.1.0) B28959-01 October 2006 Oracle Containers for J2EE Servlet Developer s Guide, 10g (10.1.3.1.0) B28959-01 Copyright 2002, 2006, Oracle.

More information

ProgramvaruUtveckling för Stora System F2

ProgramvaruUtveckling för Stora System F2 ProgramvaruUtveckling för Stora System F2 Lecture 2 First hour requirements engineering Second Hour webservers and Tomcat 1 A nice video http://www.youtube.com/watch?v=x2wdvg0dvne Stop after two minutes

More information

CIS 3952 [Part 2] Java Servlets and JSP tutorial

CIS 3952 [Part 2] Java Servlets and JSP tutorial Java Servlets Example 1 (Plain Servlet) SERVLET CODE import java.io.ioexception; import java.io.printwriter; import javax.servlet.servletexception; import javax.servlet.annotation.webservlet; import javax.servlet.http.httpservlet;

More information

IBM WebSphere Application Server. J2EE Programming Model Best Practices

IBM WebSphere Application Server. J2EE Programming Model Best Practices IBM WebSphere Application Server J2EE Programming Model Best Practices Requirements Matrix There are four elements of the system requirements: business process and application flow dynamic and static aspects

More information

GENERATING THE SERVER RESPONSE: HTTP STATUS CODES

GENERATING THE SERVER RESPONSE: HTTP STATUS CODES GENERATING THE SERVER RESPONSE: HTTP STATUS CODES Topics in This Chapter Format of the HTTP response How to set status codes What the status codes are good for Shortcut methods for redirection and error

More information

Wireless Java Technology

Wireless Java Technology Wireless Java Technology Pao-Ann Hsiung National Chung Cheng University Ref: http://developers.sun.com/techtopics/mobility/learning/tutorial/ 1 Contents Overview of Java 2 Platform Overview of J2ME Scope

More information

Updates. stmt.executeupdate( update... ); For updates/inserts/deletes, use. con.commit();

Updates. stmt.executeupdate( update... ); For updates/inserts/deletes, use. con.commit(); Web Programming with Java Servlets Leonidas Fegaras University of Texas at Arlington Web Data Management and XML L3: Web Programming with Servlets 1 Working with ResultSet ResultSet: a table of data representing

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

HTTP. HTTP HTML Parsing. Java

HTTP. HTTP HTML Parsing. Java ђѕђяѡъ ьэющ HTTP HTTP TCP/IP HTTP HTTP HTML Parsing HTTP HTTP GET < > web servers GET HTTP Port 80 HTTP GOOGLE HTML HTTP Port 80 HTTP URL (Uniform Resource Locator) HTTP URL http://www.cs.tau.ac.il:80/cs/index.html

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Chapter 29 Servlets: Bonus for Java Developers 1041

Chapter 29 Servlets: Bonus for Java Developers 1041 Chapter 29 Servlets: Bonus for Java Developers 1041 29 Servlets: Bonus for Java Developers Method Description void init( ServletConfig config ) This method is automatically called once during a servlet

More information

Jawaharlal Nehru Engineering College

Jawaharlal Nehru Engineering College Jawaharlal Nehru Engineering College Laboratory Manual Web Information System For Final Year Students Dept: Information Technology FOREWORD It is my great pleasure to present this laboratory manual for

More information

UNIVERSITY OF CINCINNATI

UNIVERSITY OF CINCINNATI UNIVERSITY OF CINCINNATI Date: I,, hereby submit this work as part of the requirements for the degree of: in: It is entitled: This work and its defense approved by: Chair: AN XML-BASED COURSE REGISTRATION

More information

Java Servlet Specification Version 2.3

Java Servlet Specification Version 2.3 Java Servlet Specification Version 2.3 Please send technical comments to: servletapi-feedback@eng.sun.com Please send business comments to: danny.coward@sun.com Final Release 8/13/01 Danny Coward (danny.coward@sun.com)

More information

Java 2 Platform, Enterprise Edition: Platform and Component Specifications

Java 2 Platform, Enterprise Edition: Platform and Component Specifications Table of Contents Java 2 Platform, Enterprise Edition: Platform and Component Specifications By Bill Shannon, Mark Hapner, Vlada Matena, James Davidson, Eduardo Pelegri-Llopart, Larry Cable, Enterprise

More information

Servlets.

Servlets. Servlets Servlets Servlets are modules that extend Java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used

More information

(Objective-CS506 Web Design and Development)

(Objective-CS506 Web Design and Development) Question No: 1 ( Marks: 1 ) - Please choose one allow the websites to store information on a client machine and later retrieve it. 1. Cookies (Page: 297) 2. Sessions 3. Panel 4. Servlet Question No: 2

More information

Web Based Solutions. Gerry Seidman. IAM Consulting

Web Based Solutions. Gerry Seidman. IAM Consulting Web Based Solutions Gerry Seidman Internet Access Methods seidman@iamx.com http://www.iam-there.com 212-580-2700 IAM Consulting seidman@iamx.com http://www.iamx.com 212-580-2700 (c) IAM Consulting Corp.

More information

Deccansoft Software Services. J2EE Syllabus

Deccansoft Software Services. J2EE Syllabus Overview: Java is a language and J2EE is a platform which implements java language. J2EE standard for Java 2 Enterprise Edition. Core Java and advanced java are the standard editions of java whereas J2EE

More information

Internet Technologies 5-Dynamic Web. F. Ricci 2010/2011

Internet Technologies 5-Dynamic Web. F. Ricci 2010/2011 Internet Technologies 5-Dynamic Web F. Ricci 2010/2011 Content The "meanings" of dynamic Building dynamic content with Java EE (server side) HTML forms: how to send to the server the input PHP: a simpler

More information

SECTION 1 ADVANCED INTERNET TECHNOLOGIES LAB

SECTION 1 ADVANCED INTERNET TECHNOLOGIES LAB SECTION 1 ADVANCED INTERNET TECHNOLOGIES LAB Advanced Internet Technologies Lab Structure Page Nos. 1.0 Introduction 5 1.1 Objectives 5 1.2 Tomcat Installations and Setting 6 1.3 Running JSP Programs 14

More information

Enterprise Development

Enterprise Development Enterprise Development with What needs to be done to run JEE like applications inside Karaf? @anierbeck - Karaf PMC, Apache Member - OPS4j Pax Web Project Lead - Senior IT Consultant @codecentric - co-author

More information

Java Finite State Machine Framework

Java Finite State Machine Framework 1. Requirements JDK 1.4.x (http://java.sun.com/j2se/1.4.2/download.html) 2. Overview Java Finite State Machine Framework contains classes that define FSM meta-model, allows to manipulate with model, compile

More information

Public Draft. Java Servlet Specification v2.3 PUBLIC REVIEW DRAFT 1 PUBLIC REVIEW DRAFT 1

Public Draft. Java Servlet Specification v2.3 PUBLIC REVIEW DRAFT 1 PUBLIC REVIEW DRAFT 1 PUBLIC REVIEW DRAFT 1 Java Servlet Specification v2.3 Please send technical comments to: Please send business comments to: servletapi-feedback@eng.sun.com danny.coward@sun.com Public Draft Public Review

More information

Chapter 2 How to structure a web application with the MVC pattern

Chapter 2 How to structure a web application with the MVC pattern Chapter 2 How to structure a web application with the MVC pattern Murach's Java Servlets/JSP (3rd Ed.), C2 2014, Mike Murach & Associates, Inc. Slide 1 Objectives Knowledge 1. Describe the Model 1 pattern.

More information

Enterprise JavaBeans. Layer:01. Overview

Enterprise JavaBeans. Layer:01. Overview Enterprise JavaBeans Layer:01 Overview Agenda Course introduction & overview. Hardware & software configuration. Evolution of enterprise technology. J2EE framework & components. EJB framework & components.

More information

Using the Jersey JAX-RS Reference Implementation 11g Release 1 (10.3.6)

Using the Jersey JAX-RS Reference Implementation 11g Release 1 (10.3.6) [1]Oracle Fusion Middleware Using the Jersey JAX-RS Reference Implementation 11g Release 1 (10.3.6) E41958-02 April 2015 Documentation for software developers that describes how to use the Jersey JAX-RS

More information

Chapter 9: Application Design and Development

Chapter 9: Application Design and Development Chapter 9: Application Design and Development 9.1 Chapter 9: Application Design and Development Application Programs and User Interfaces Web Fundamentals Servlets and JSP Application Architectures Rapid

More information

IBD Intergiciels et Bases de Données

IBD Intergiciels et Bases de Données Overview of lectures and practical work IBD Intergiciels et Bases de Données Multi-tier distributed web applications Fabien Gaud, Fabien.Gaud@inrialpes.fr http://www-ufrima.imag.fr/ Placard électronique

More information

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1 PRODUCT DOCUMENTATION Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1 Document and Software Copyrights Copyright 1998 2009 ShoreTel, Inc. All rights reserved. Printed in the United

More information

Application Servers in E-Commerce Applications

Application Servers in E-Commerce Applications Application Servers in E-Commerce Applications Péter Mileff 1, Károly Nehéz 2 1 PhD student, 2 PhD, Department of Information Engineering, University of Miskolc Abstract Nowadays there is a growing demand

More information

Quick Introduction to Java Servlets/NSJSP in the NonStop Environment HH676S B.00. Student guide

Quick Introduction to Java Servlets/NSJSP in the NonStop Environment HH676S B.00. Student guide Quick Introduction to Java Servlets/NSJSP in the NonStop Environment Student guide Contents Module 0 - Course Overview Course Objectives... Overview-2 Pathway The Way It Has Been... Overview-3 Pathway

More information

Portlet Development Guide Working with the Portlet API 1.1 Java Server Pages in Portlets Portlet Design Guidelines Security and Single Sign On

Portlet Development Guide Working with the Portlet API 1.1 Java Server Pages in Portlets Portlet Design Guidelines Security and Single Sign On Portlet Development Guide Working with the Portlet API 1.1 Java Server Pages in Portlets Portlet Design Guidelines Security and Single Sign On First Edition April 2, 2002 Authors: Stephan Hesmer Peter

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

Introduction to Java EE (J2EE)

Introduction to Java EE (J2EE) Introduction to Java EE (J2EE) 1 Session Objectives Understanding the value propositions of J2EE Getting a big picture of J2EE architecture and platform Getting high-level exposure of APIs and Technologies

More information

Outline. Servlets. Functions of Servlets. Overview. The Advantages of Servlets Over. Why Build Pages Dynamically? Traditional CGI

Outline. Servlets. Functions of Servlets. Overview. The Advantages of Servlets Over. Why Build Pages Dynamically? Traditional CGI Outline Servlets Overview of servlet technology First servlets Handling the client request Form data HTTP request headers Generating the server response HTTP status codes HTTP response headers Handling

More information

Jakarta Struts: Declarative Exception Handling

Jakarta Struts: Declarative Exception Handling Jakarta Struts: Declarative Exception Handling Struts 1.2 Version Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet, JSP, Struts, JSF, and Java Training Courses: courses.coreservlets.com

More information

ddfffddd CS506 FINAL TERMS SOLVED BY MCQS GHAZAL FROM IEMS CAMPUS SMD CS506 Mcqs file solved by ghazal

ddfffddd CS506 FINAL TERMS SOLVED BY MCQS GHAZAL FROM IEMS CAMPUS SMD CS506 Mcqs file solved by ghazal ddfffddd CS506 FINAL TERMS SOLVED BY MCQS GHAZAL FROM IEMS CAMPUS SMD CS506 Mcqs file solved by ghazal Question:1 JSP action element is used to obtain a reference to an existing JavaBean object. usebean

More information

OpenClinica: Towards Database Abstraction, Part 1

OpenClinica: Towards Database Abstraction, Part 1 OpenClinica: Towards Database Abstraction, Part 1 Author: Tom Hickerson, Akaza Research Date Created: 8/26/2004 4:17 PM Date Updated: 6/10/2005 3:22 PM, Document Version: v0.3 Document Summary This document

More information

Java Servlet Specification

Java Servlet Specification Java Servlet Specification Version 3.0 Rajiv Mordani December 2008 PROPOSED FINAL DRAFT Sun Microsystems, Inc. www.sun.com Part No. 8xx-xxxx-xx December 2008, Revision 02 Submit comments about this document

More information

Oracle Corporation

Oracle Corporation 1 2012 Oracle Corporation Exploring Java EE 6 and WebLogic 12c Arun Gupta blogs.oracle.com/arungupta, @arungupta 2 2012 Oracle Corporation The following is intended to outline our general product direction.

More information

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach Chapter 4 How to develop JavaServer Pages 97 TRAINING & REFERENCE murach s Java servlets and (Chapter 2) JSP Andrea Steelman Joel Murach Mike Murach & Associates 2560 West Shaw Lane, Suite 101 Fresno,

More information

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java. [Course Overview] The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming,

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

Architecting Java solutions for CICS

Architecting Java solutions for CICS Architecting Java solutions for CICS Architecting Java solutions for CICS Course introduction Course introduction Reasons for hosting Java in CICS Requirements: Knowledge of transaction processing Experience

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

Lab 10. Google App Engine. Tomas Lampo. November 11, 2010

Lab 10. Google App Engine. Tomas Lampo. November 11, 2010 Lab 10 Google App Engine Tomas Lampo November 11, 2010 Today, we will create a server that will hold information for the XML parsing app we created on lab 8. We will be using Eclipse and Java, but we will

More information

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

Web Fundamentals. Typical Current Web Architecture. Web Server HTTP interface. HTML, Images, cookies, JSON, etc. 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

More information

Chapter 2 Introduction

Chapter 2 Introduction Chapter 2 Introduction PegaRULES Process Commander applications are designed to complement other systems and technologies that you already have in place for doing work. The Process Commander integration

More information

Java Servlet Specification Version 2.4

Java Servlet Specification Version 2.4 Java Servlet Specification Version 2.4 Please send technical comments to: servletapi-feedback@eng.sun.com Please send business comments to: danny.coward@sun.com Public Draft Public Draft June 24th 2002

More information

Cisco Unity Express JSP, Servlet, and VoiceXML Web Application Development Guide

Cisco Unity Express JSP, Servlet, and VoiceXML Web Application Development Guide Cisco Unity Express JSP, Servlet, and VoiceXML Web Application Development Guide First Published: July 13, 2007, With the addition of Interactive Voice Response (IVR) features, Cisco Unity Express 3.0

More information

WebSphere Application Server V7: Session Management

WebSphere Application Server V7: Session Management Chapter 12 of WebSphere Application Server V7 Administration and Configuration Guide, SG24-7615 WebSphere Application Server V7: Session Management Session support allows a Web application developer to

More information

Java Technology Overview JC, J2ME, J2SE, J2EE

Java Technology Overview JC, J2ME, J2SE, J2EE Java Technology Overview JC, J2ME, J2SE, J2EE Bruno Ferreira de Souza Java Technologist Sun Microsystems, Inc. 2 Java 2 Platform Editions Java Technology Enabled Devices Java Technology Enabled Desktop

More information

INVOKING JAVA CODE WITH JSP SCRIPTING ELEMENTS. Topics in This Chapter

INVOKING JAVA CODE WITH JSP SCRIPTING ELEMENTS. Topics in This Chapter INVOKING JAVA CODE WITH JSP SCRIPTING ELEMENTS Topics in This Chapter Static vs. dynamic text Dynamic code and good JSP design The importance of packages for JSP helper/utility classes JSP expressions

More information

1. Introduction. 2. Life Cycle Why JSP is preferred over Servlets? 2.1. Translation. Java Server Pages (JSP) THETOPPERSWAY.

1. Introduction. 2. Life Cycle Why JSP is preferred over Servlets? 2.1. Translation. Java Server Pages (JSP) THETOPPERSWAY. 1. Introduction Java Server Pages (JSP) THETOPPERSWAY.COM Java Server Pages (JSP) is used for creating dynamic web pages. Java code can be inserted in HTML pages by using JSP tags. The tags are used for

More information

Unit 4 Java Server Pages

Unit 4 Java Server Pages Q1. List and Explain various stages of JSP life cycle. Briefly give the function of each phase. Ans. 1. A JSP life cycle can be defined as the entire process from its creation till the destruction. 2.

More information

Integrating Servlets and JSP: The MVC Architecture

Integrating Servlets and JSP: The MVC Architecture Integrating Servlets and JSP: The MVC Architecture Core Servlets & JSP book: More Servlets & JSP book: www.moreservlets.com Servlet and JSP Training Courses: courses.coreservlets.com 2 Slides Marty Hall,

More information

Enterprise Java Security Fundamentals

Enterprise Java Security Fundamentals Pistoia_ch03.fm Page 55 Tuesday, January 6, 2004 1:56 PM CHAPTER3 Enterprise Java Security Fundamentals THE J2EE platform has achieved remarkable success in meeting enterprise needs, resulting in its widespread

More information

Administering the JBoss 5.x Application Server

Administering the JBoss 5.x Application Server Administering the JBoss 5.x Application Server JBoss Application Server (AS) is one of the most popular open source Java application server on the market. The latest release, JBoss 5, is a Java EE 5 certified

More information

WebSphere Application Server V6.1: Web container problem determination

WebSphere Application Server V6.1: Web container problem determination Carla Sadtler Rob Larsen Giribabu Paramkusham WebSphere Application Server V6.1: Web container problem determination The runtime environment for Web components is called the Web container. If users receive

More information

The Presentation Tier of the Java EE Architecture

The Presentation Tier of the Java EE Architecture The Presentation Tier of the Java EE Architecture Authors: Address: Version: 1.0 Simon Pickin Natividad Martínez Madrid Florina Almenárez Mendoza Departamento de Ingeniería Telemática Universidad Carlos

More information

ServletExec TM 4.1 User Guide. for Microsoft Internet Information Server Netscape Enterprise Server iplanet Web Server and Apache HTTP Server

ServletExec TM 4.1 User Guide. for Microsoft Internet Information Server Netscape Enterprise Server iplanet Web Server and Apache HTTP Server ServletExec TM 4.1 User Guide for Microsoft Internet Information Server Netscape Enterprise Server iplanet Web Server and Apache HTTP Server NEW ATLANTA COMMUNICATIONS, LLC ServletExec TM 4.1 User Guide

More information

RQs + PEs: More Servlets

RQs + PEs: More Servlets RQs + PEs: More Servlets Advanced Topics in Java Khalid Azim Mughal khalid@ii.uib.no http://www.ii.uib.no/~khalid/atij/ Version date: 2006-09-04 ATIJ 1/7 REVIEW QUESTIONS - More Servlets 1. Explain the

More information

Distributed Systems COMP 212. Lecture 8 Othon Michail

Distributed Systems COMP 212. Lecture 8 Othon Michail Distributed Systems COMP 212 Lecture 8 Othon Michail HTTP Protocol Hypertext Transfer Protocol Used to transmit resources on the WWW HTML files, image files, query results, Identified by Uniform Resource

More information

Java WebStart, Applets & RMI

Java WebStart, Applets & RMI Java WebStart, Applets & RMI 11-13-2013 Java WebStart & Applets RMI Read: Java Web Start Tutorial Doing More with Rich Internet Applications Java Web Start guide Exam#2 is scheduled for Tues., Nov. 19,

More information

/ / JAVA TRAINING

/ / JAVA TRAINING www.tekclasses.com +91-8970005497/+91-7411642061 info@tekclasses.com / contact@tekclasses.com JAVA TRAINING If you are looking for JAVA Training, then Tek Classes is the right place to get the knowledge.

More information

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents How to use Apache FOP in a Servlet $Revision: 505235 $ Table of contents 1 Overview...2 2 Example Servlets in the FOP distribution...2 3 Create your own Servlet...2 3.1 A minimal Servlet...2 3.2 Adding

More information

Chapter 8: Application Design and Development

Chapter 8: Application Design and Development Chapter 8: Application Design and Development Database System Concepts See www.db-book.com for conditions on re-use Database System Concepts Chapter 8: Application Design and Development User Interfaces

More information

Specialized - Mastering JEE 7 Web Application Development

Specialized - Mastering JEE 7 Web Application Development Specialized - Mastering JEE 7 Web Application Development Code: Lengt h: URL: TT5100- JEE7 5 days View Online Mastering JEE 7 Web Application Development is a five-day hands-on JEE / Java EE training course

More information

SYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H

SYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H JAVA COURSE DETAILS DURATION: 60 Hours With Live Hands-on Sessions J P I N F O T E C H P U D U C H E R R Y O F F I C E : # 4 5, K a m a r a j S a l a i, T h a t t a n c h a v a d y, P u d u c h e r r y

More information

MAX 2006 Beyond Boundaries

MAX 2006 Beyond Boundaries Overview MAX 2006 Beyond Boundaries Jason Delmore Developing ColdFusion-Java Hybrid Applications October 24 th 2006 ColdFusion is a productivity layer built on the strong foundation of J2EE. ColdFusion

More information

Java EE Patterns 176

Java EE Patterns 176 Java EE Patterns 176 What are Java EE Patterns?! " A collection of Java EE based solutions to common problems! " Address reoccurring problems found in enterprise class systems! " Intended to meet quality

More information

UNIT 6:CH:14 INTEGRATING SERVLETS AND JSPTHE MVC ARCHITECTURE

UNIT 6:CH:14 INTEGRATING SERVLETS AND JSPTHE MVC ARCHITECTURE UNIT 6:CH:14 INTEGRATING SERVLETS AND JSPTHE MVC ARCHITECTURE NAME: CHAUHAN ARPIT S ENROLLMENT NO: 115250693055 Obtaining a RequestDispatcher Forwarding requests from servlets to dynamic resources Forwarding

More information

JSP Scripting Elements

JSP Scripting Elements 2009 Marty Hall Invoking Java Code with JSP Scripting Elements Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/csajsp2.html 2 Customized Java EE Training:

More information

J2EE: Best Practices for Application Development and Achieving High-Volume Throughput. Michael S Pallos, MBA Session: 3567, 4:30 pm August 11, 2003

J2EE: Best Practices for Application Development and Achieving High-Volume Throughput. Michael S Pallos, MBA Session: 3567, 4:30 pm August 11, 2003 J2EE: Best Practices for Application Development and Achieving High-Volume Throughput Michael S Pallos, MBA Session: 3567, 4:30 pm August 11, 2003 Agenda Architecture Overview WebSphere Application Server

More information

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents How to use Apache FOP in a Servlet $Revision: 493717 $ Table of contents 1 Overview...2 2 Example Servlets in the FOP distribution...2 3 Create your own Servlet...2 3.1 A minimal Servlet...2 3.2 Adding

More information

(9A05803) WEB SERVICES (ELECTIVE - III)

(9A05803) WEB SERVICES (ELECTIVE - III) 1 UNIT III (9A05803) WEB SERVICES (ELECTIVE - III) Web services Architecture: web services architecture and its characteristics, core building blocks of web services, standards and technologies available

More information

WebSphere Application Server - Overview

WebSphere Application Server - Overview IBM Italia SpA WebSphere Application Server - Overview Marco Dragoni IBM Software Group Technical Sales Specialist IBM Italia S.p.A. Milan, 26 November 2008 2007 IBM Corporation Agenda Course and speaker

More information

CodeCharge Studio Java Deployment Guide Table of contents

CodeCharge Studio Java Deployment Guide Table of contents CodeCharge Studio Java Deployment Guide Table of contents CodeCharge Studio requirements for Java deployment... 2 Class Path requirements (compilation-time and run-time)... 3 Tomcat 4.0 deployment... 4

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

Java Servlet Specification

Java Servlet Specification Java Servlet Specification Version 4.0 Shing Wai Chan Ed Burns July 2017 Oracle Corporation www.oracle.com Submit comments to: servlet-spec@javaee.groups.io ORACLE AMERICA, INC. IS WILLING TO LICENSE THIS

More information

Simplifying Migrations with the WebSphere Application Server Migration Toolkit

Simplifying Migrations with the WebSphere Application Server Migration Toolkit IBM Software Group Simplifying Migrations with the WebSphere Application Server Migration Toolkit Mohammad Al-Bedaiwi (malbedaiwi@us.ibm.com) Advisory Software Engineer 9 February WebSphere Support Technical

More information

Platform as a Service lecture 2

Platform as a Service lecture 2 Politecnico di Milano Platform as a Service lecture 2 Building an example application in Google App Engine Cloud patterns Elisabetta Di Nitto Developing an application for Google App Engine (GAE)! Install

More information