Web. 2 Web. A Data Dependency Graph for Web Applications. Web Web Web. Web. Web. Java. Web. Web HTTP. Web

Similar documents
Integrating Servlets and JavaServer Pages Lecture 13

INTRODUCTION TO SERVLETS AND WEB CONTAINERS. Actions in Accord with All the Laws of Nature

JavaServer Pages (JSP)

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

CE212 Web Application Programming Part 3

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

A.1 JSP A.2 JSP JSP JSP. MyDate.jsp page contenttype="text/html; charset=windows-31j" import="java.util.calendar" %>

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering

Java Server Page (JSP)

Ch04 JavaServer Pages (JSP)

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

Integrating Servlets and JSP: The MVC Architecture

Struts. P. O. Box Austin, TX Fax: +1 (801) (877) 866-JAVA

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

Welcome To PhillyJUG. 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation

Module 3 Web Component

COMP9321 Web Application Engineering

Component Based Software Engineering

This course is intended for Java programmers who wish to write programs using many of the advanced Java features.

Accessing EJB in Web applications

CIS 3952 [Part 2] Java Servlets and JSP tutorial

Fast Track to Java EE 5 with Servlets, JSP & JDBC

ADVANCED JAVA COURSE CURRICULUM

Database Applications Recitation 6. Project 3: CMUQFlix CMUQ s Movies Recommendation System

Java Enterprise Edition. Java EE Oct Dec 2016 EFREI/M1 Jacques André Augustin Page 1

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

Building Web Applications With The Struts Framework

J2EE Web Development 13/1/ Application Servers. Application Servers. Agenda. In the beginning, there was darkness and cold.

Advance Java. Configuring and Getting Servlet Init Parameters per servlet

CHAPTER 4 WORKING WITH FORMS

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

Université du Québec à Montréal

Servlets by Example. Joe Howse 7 June 2011

Jakarta Struts: An MVC Framework

********************************************************************

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

Principles and Techniques of DBMS 6 JSP & Servlet

112. Introduction to JSP

Three hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 21 st May Time:

ICOM 5016 Database Systems. Database Users. User Interfaces and Tools. Chapter 8: Application Design and Development.

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

JavaServer Pages. What is JavaServer Pages?

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

LTBP INDUSTRIAL TRAINING INSTITUTE

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

112-WL. Introduction to JSP with WebLogic

11.1 Introduction to Servlets

LTBP INDUSTRIAL TRAINING INSTITUTE

Servlet and JSP Review

CISH-6510 Web Application Design and Development. JSP and Beans. Overview

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER

JavaServer Pages. Juan Cruz Kevin Hessels Ian Moon

01KPS BF Progettazione di applicazioni web

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

2. Follow the installation directions and install the server on ccc. 3. We will call the root of your installation as $TOMCAT_DIR

CHAPTER 4 WORKING WITH FORMS

a. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22.

The Struts MVC Design. Sample Content

Model View Controller (MVC)

20/08/56. Java Technology, Faculty of Computer Engineering, KMITL 1

JSP MOCK TEST JSP MOCK TEST IV

Trabalhando com JavaServer Pages (JSP)

JAVA SERVLET. Server-side Programming INTRODUCTION

Fast Track to Java EE

AJP. CHAPTER 5: SERVLET -20 marks

JdbcResultSet.java. import java.sql.*;

Database Systems Lab. 11. JSP I 충남대학교컴퓨터공학과 데이타베이스시스템연구실

Trabalhando com JavaServer Pages (JSP)

Introduction to JSP and Servlets Training 5-days

Scope and State Handling in JSP

Web Application Services Practice Session #2

CSc31800: Internet Programming, CS-CCNY, Spring 2004 Jinzhong Niu May 9, JSPs 1

ADVANCED JAVA TRAINING IN BANGALORE

Kamnoetvidya Science Academy. Object Oriented Programming using Java. Ferdin Joe John Joseph. Java Session

Web based Applications, Tomcat and Servlets - Lab 3 -

JavaEE Interview Prep

A Quick Introduction to Struts

A Novel Technique to Improve the Performance of Licensed Software in Client/Server Network Environment

DEZVOLTAREA APLICATIILOR WEB CURS 7. Lect. Univ. Dr. Mihai Stancu

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum

4.1 The Life Cycle of a Servlet 4.2 The Java Servlet Development Kit 4.3 The Simple Servlet: Creating and compile servlet source code, start a web

Java Server Pages JSP

Advanced Internet Technology Lab # 6

Session 10. Form Dataset. Lecture Objectives

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

Java Server Pages. JSP Part II

The Basic Web Server CGI. CGI: Illustration. Web based Applications, Tomcat and Servlets - Lab 3 - CMPUT 391 Database Management Systems 4

Module 5 Developing with JavaServer Pages Technology

IBD Intergiciels et Bases de Données

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

Advanced Java Programming

Servlets and JSP (Java Server Pages)

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

INTERNET PROGRAMMING TEST-3 SCHEME OF EVALUATION 1.A 3 LIFE CYCLE METHODS - 3M 1.B HTML FORM CREATION - 2 M

Java TM. JavaServer Faces. Jaroslav Porubän 2008

Unit-4: Servlet Sessions:

Frameworks & Security

Contents. 1. JSF overview. 2. JSF example

Beans and HTML Forms. Usually Beans are used to represent the data of HTML forms

Transcription:

Web A Data Dependency Graph for Web Applications Summary. In this paper, we propose a data dependency graph for web applications. Since web applications consist of many components, data are delivered among these components. Data flow analysis is useful for debugging when errors occurred. Traditional methods are, however, insufficient for data flow analysis in web applications. We define data dependence relations between components and inside components and integrate these relations as data dependency for web applications. Our target web applications are constructed using Servlet and JSP. We show a data dependency graph for a simple web application as example. 1 Web Web Web Web Web Web [2] JSP [3] Web Java Web Web 2 Web Web Web HTTP HTTP Web Sho Kurokawa, Hiroaki Kuwabara, Shinichiro Yamamoto, Kiyoshi Agusa,

FOSE2005 HTML HTTP ASP JSP PHP Web Web JSP MVC Web Web JSP Web 1 ( ) JSP Web Java [6] 2 Web 3 A B B A B A B C 1 1. A C 2. A B 3. B C 3 1 C C C C A B 1

A Data Dependency Graph for Web Applications 2 1. 2. 1. Web Struts [1] Web Struts Web Web 3.1 2 1. HTTP 2. 1. URI POST?name0=value0&name1=value1& HTML 1. 2. ServletRequest setattribute( name,obj) getattribute( name ) setattribute obj name name obj 2. 3.2 3.1 2 ( ) name namespace (name, namespace) namespace = P arameter namespace c = (name, namespace) c = (name, namespace ) c = c name = name namespace = namespace

FOSE2005 1 1 re- 1 request.getparameter( name ) request.getparametervalues( name ) request.getattribute( name ) jsp:usebean id= name scope= request class= BeanClass / samplebean.getname() jsp:getproperty name= SampleBean property= name / form action= url method= post input type= text name= name / /form a href= url?name=value request.setattribute( name, expr) samplebean.setname(expr) jsp:setproperty name= SampleBean property= name value= %= expr % / ( name, Parameter ) ( name, HttpServletRequest ) ( name, SampleBean ) ( name, Parameter ) ( name, HttpServletRequest ) ( name, SampleBean ) quest HttpServletRequest samplebean SampleBean Bean 1 HTML Bean 1 Bean JSP 1 4 4.1 2 3 ( ) A B A B A CA out B CB in c a = c b CA out c a C B in c b

A Data Dependency Graph for Web Applications 4.2 Java 1 Java 2 1 2 2 OSDG [6] OSDG Java OSDG x 2 e 1, e 2 3 Def-Use e 1 x e 2 x e 1 e 2 x e 1 e 2 String expr = request.getparameter("name"); 1 ( name, Parameter ) expr expr ( name, Parameter ) 4 ( ) S 1 S 2 S S =S 1 S2 4.3 Web Web 5 (Web ) Web W W = S(RS) i i R S A e a B e b e a e b 5 Web 6 (Web ) G G = (V, E) V = C E x 1 JSP JSP Java

FOSE2005 E = {(e a, e b ) e a, e b E x. (e a, e b ) S 1 } {(c, e) c C. e E x. (c, e) S 2 } {(e, c) e E x. c C. (e, c) S 2 } {(c a, c b ) c a, c b C. (c a, c b ) R} C E x R S 1 S 2 5 Web Web index.jsp CalCircle.java result.jsp Web index.jsp CalCircle.java result.jsp 2 Web 5.1 Web index.jsp CalCircle.java CalCircle.java result.jsp 3 index.jsp CalCircle.java CalCircle.java result.jsp <form action="calcircle" method="post"> <input type="text" name="radius" /><br /> (1) <input type="radio" name="option" value="round" checked /> (2) <input type="radio" name="option" value="area" /><br /><br /> <input type="submit" value="submit" /> </form> 3 index.jsp 3 4 5 2 Web (1) (12) 2 (1) (12) c 1 c 12 2 3 R = {(c 1, c 3 ), (c 2, c 4 ), (c 8, c 9 ), (c 5, c 10 ), (c 6, c 11 ), (c 7, c 12 )}

A Data Dependency Graph for Web Applications 01: public void dopost(httpservletrequest request, 02: HttpServletResponse response) 03: throws IOException, ServletException { 04: RadiusBeans bean = new RadiusBeans(); 05: String radius = request.getparameter("radius"); (3) 06: double r = Integer.parseInt(radius); 07: String option = request.getparameter("option"); (4) 08: double result = 0; 09: if (option.equals("round")) { 10: result = 2 * r * Math.PI; 11: } else { 12: result = r * r * Math.PI; 13: } 14: bean.setradius(r); (5) 15: bean.setoption(option); (6) 16: bean.setresult(result); (7) 17: request.setattribute("beanobj",bean); (8) 18: } 4 CalCircle.java <jsp:usebean id="beanobj" scope="request" class="radiusbeans" /> (9). <jsp:getproperty name="beanobj" property="radius" /> (10) <jsp:getproperty name="beanobj" property="option" /> (11) : <jsp:getproperty name="beanobj" property="result" /> (12) 5 result.jsp 2 index.jsp (1) ( radius, Parameter ) (2) ( option, Parameter ) CalCircle.java (3) ( radius, Parameter ) (4) ( option, Parameter ) (5) ( radius, RadiusBeans ) (6) ( option, RadiusBeans ) (7) ( result, RadiusBeans ) (8) ( beanobj, HttpServletRequest ) result.jsp (9) ( beanobj, HttpServletRequest ) (10) ( radius, RadiusBeans ) (11) ( option, RadiusBeans ) (12) ( result, RadiusBeans ) 5.2 Web 6 Web 6 4 : S S 1 S 2 S 1 10

FOSE2005 r ( 10:r ) 10:r 06:r 06:r 10:r 10:r 10:result 10:r 10:result S 2 17 bean ( 17:bean ) 17 (8) setattribute (8) 17:bean 17:bean (8) CalCircle.java Java index.jsp ( 6 (1)) CalCircle.java result result result.jsp CalCircle.java result.jsp result.jsp index.jsp 2 Web Option Option (2) (4) Radius 07:option 15:option (6) (11) Radius (1) (3) index.jsp 05:radius 06:radius 06:r 04:bean 14:r 17:bean (5) (8) (10) Bean (9) Result R 16:result (7) (12) S1 S2 10:r 12:r 12:r result.jsp Component Variable 08:result 12:result expression 10:result CalCircle.java 6 2 Web 6 CASE Sapid [7] Strus Web 1. Web 2. JSP struts-config.xml 3.

A Data Dependency Graph for Web Applications 4. 2,3 5. OSDG 6. 4,5 Web Web 7 Web 8 8 result.jsp result Web result result Web index Input two data Add or Sub 7 Calc Action error result Output Result 8 result.jsp CalcAction result CalcAction result.jsp result CalcAction index.jsp arg1 CalcAction index.jsp arg2 index.jsp CalcAction arg1 index.jsp CalcAction arg2 7 7.1 Web Web 2 Web Struts Web Web Web Web Web

FOSE2005 7.2 Ricca Web [4] Web HTML Taguchi Web Web [5] Web Web Web 7.3 JSP Web EJB DBMS JSP Web EJB EJB e-society WebWare [1] The Apache Software Foundation. The Apache Struts Web Application Framework. http://struts.apache.org/. [2] Sun Microsystems. Java Servlet Technology. http://java.sun.com/products/servlet/. [3] Sun Microsystems. JavaServer Pages Technology. http://java.sun.com/products/jsp/. [4] Filippo Ricca and Paolo Tonella. Web Application Slicing. In ICSM 01, pages 148 157. IEEE Computer Society, 2001. [5] Mitsuhisa Taguchi, Tetsuya Suzuki, and Takehiro Tokuda. A Visual Approach for Generating Server Page Type Web Applications Based on Template Method. In Proceedings of the 2003 IEEE Symposium on Visual and Multimedia Software Engineering, pages 248 250. IEEE Computer Society, 2003. [6],,.., 40(4):1851 1860, 1999. [7],,. CASE Sapid., 39(6):1990 1998, 1998.