J2EE Concepts

Similar documents
Intro to Servlet, EJB, JSP, WS

JavaGeneralProgramming.PDF

No Slide Title

10.ppt

14-Servlet

Corporate PPT Template

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

KYO_SCCD.PDF

Cache_cny.ppt [읽기 전용]

J2EE & Web Services iSeminar

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

<4D F736F F F696E74202D20B5A5C0CCC5CDBAA3C0CCBDBA5F3130C1D6C2F75F31C2F7BDC32E >

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint Presentation

Analyst Briefing

歯JavaExceptionHandling.PDF

Portal_9iAS.ppt [읽기 전용]

Chap7.PDF

Microsoft PowerPoint - GUI _DB연동.ppt [호환 모드]

Voice Portal using Oracle 9i AS Wireless

Analyze Connection Failover Options.ppt

교육2 ? 그림

91 // 물리적으로닫지않고 cache에반환만한다. opstmt.close(); } opstmt.setint(3, lowerlimit); opstmt.setint(4, upperlimit); // Execute query rset = opstmt.executequery

歯Writing_Enterprise_Applications_2_JunoYoon.PDF

본 강의에 들어가기 전

Interstage5 SOAP서비스 설정 가이드

04장

Microsoft PowerPoint - 18-DataSource.ppt

15_3oracle

chapter1,2.doc

FileMaker ODBC and JDBC Guide

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가

rmi_박준용_final.PDF

Intra_DW_Ch4.PDF


Apache2 + Tomcat 5 + JK2 를 사용한 로드밸런싱과 세션 복제 클러스터링 사이트 구축

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

2장 변수와 프로시저 작성하기

Gartner Day

개요오라클과티베로에서 JDBC 를통해접속한세션을구분할수있도록 JDBC 접속시 ConnectionProperties 를통해구분자를넣어줄수있다. 하나의 Node 에다수의 WAS 가있을경우 DB 에서 Session Kill 등의동작수행시원하는 Session 을선택할수있다.

untitled

IBM blue-and-white template

슬라이드 제목 없음


The Self-Managing Database : Automatic Health Monitoring and Alerting

歯 Final.PDF

Microsoft PowerPoint - Tech-iSeminar_9iAS_OAS10g_PBT.ppt

untitled

서블릿의라이프사이클 뇌를자극하는 JSP & Servlet

뇌를 자극하는 JSP & Servlet 슬라이드

초보자를 위한 ADO 21일 완성

FileMaker ODBC 및 JDBC 가이드

PCServerMgmt7

쉽게 풀어쓴 C 프로그래밊

중간고사

ecorp-프로젝트제안서작성실무(양식3)

PowerPoint 프레젠테이션

웹연동 } 웹 (Web) 환경에서데이터베이스시스템을연동하는방법은다음과같다 } Server Client 구조의통신 (2-Tier) } Server Middleware Client 구조의통신 (3-Tier) 2

Microsoft PowerPoint - file

1217 WebTrafMon II

Oracle Apps Day_SEM

PowerPoint 프레젠테이션

vm-웨어-01장

03여준현과장_삼성SDS.PDF

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

Data Provisioning Services for mobile clients

Model Investor MANDO Portal Site People Customer BIS Supplier C R M PLM ERP MES HRIS S C M KMS Web -Based

Microsoft PowerPoint - Smart CRM v4.0_TM 소개_ pptx

Chap12

mytalk

PowerPoint 프레젠테이션

FileMaker ODBC and JDBC Guide

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

MySQL-Ch05

FileMaker 15 ODBC 및 JDBC 설명서

Interstage4 설치가이드

ETL_project_best_practice1.ppt

歯통신41호.PDF

thesis

슬라이드 1

Service-Oriented Architecture Copyright Tmax Soft 2005

Microsoft PowerPoint - JasperReports 개발자 매뉴얼.ppt

컴퓨터과학과 교육목표 컴퓨터과학과의 컴퓨터과학 프로그램은 해당분야 에서 학문적 기술을 창의적으로 연구하고 산업적 기술을 주도적으로 개발하는 우수한 인력을 양성 함과 동시에 직업적 도덕적 책임의식을 갖는 IT인 육성을 교육목표로 한다. 1. 전공 기본 지식을 체계적으로

단계

PowerPoint 프레젠테이션

<param-value> 파라미터의값 </param-value> </init-param> </servlet> <servlet-mapping> <url-pattern>/ 매핑문자열 </url-pattern> </servlet-mapping> - 위의예에서 ServletC

뇌를 자극하는 JSP & Servlet 슬라이드


CMS-내지(서진이)

Microsoft Word - s.doc

자바-11장N'1-502

ibmdw_rest_v1.0.ppt

요약 1

- 다음은 Statement 객체를사용해서삽입 (insert) 작업의예 String sql = "insert into member(code, name, id, pwd, age) values ("; int id = 10; sql = sql + id +, ;// 항목사이에

Copyright 2004 Tmax Soft Co., Ltd. All Rights Reserved. JEUS

Mstage.PDF

13주-14주proc.PDF

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에

Transcription:

! Introduction to J2EE (1) - J2EE Servlet/JSP/JDBC iseminar.. 1544-3355 ( ) iseminar Chat. 1

Who Are We? Business Solutions Consultant Oracle Application Server 10g Business Solutions Consultant Oracle10g 2

J2EE iseminar Series Agenda Day 1 J2EE Servlet JSP (JavaServer Pages) Day 2 Enterprise JavaBean Web Services J2EE 3

Java 2 Java 2 (J2SE) API J2EE J2SE Tools/Utilities/Deployment User Interface Kits (Swing, AWT) Core API s Integration API s J2SE Java Virtual Machine 4

Java 2 (J2EE) J2SE (Java 2 Standard Edition) API 5

J2EE Client Tier Web Tier Business Tier Enterprise Information System (EIS) Tier Web Browser Applets JSP Pages Servlets Enterprise JavaBeans Database and legacy systems Application Clients 6

Application Applet HTML Web Browser Applets Web Tier Business Tier EIS/Database Tier Application Clients 7

JSP (JavaServer Pages) (CSS, ) Client Tier JSP Pages Servlets Business Tier EIS/Database Tier 8

Enterprise JavaBeans (EJB) Client Tier Web Tier Enterprise JavaBeans EIS/Database Tier 9

J2EE J2EE J2EE Lifecycle 10

J2EE Client Machine J2EE Server Browser Servlets JSP Pages Application Client Application Client Container Web Container EJB EJB EJB Container Database 11

J2EE J2EE J2EE (deployment descriptor) 12

J2EE myj2eeapp.ear appclient.jar webapp.war ejb.jar applicationclient.xml web.xml ejb-jar.xml application.xml 13

D E M O N S T R A T I O N J2EE Application 14

J2EE Benefits, 15

J2EE iseminar Series Agenda J2EE Concepts Java 2 / J2EE Platform Architecture Benefits JSP (JavaServer Pages) 16

JSP - J2EE 17

API HTML ( ) XML, WML, GIF JSP (JavaServer Pages) public class HelloServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getwriter(); out.setcontenttype( text/html ); out.println("<html><body>"); out.println( <h1>hello There!</h1>"); out.println("</body></html>"); out.close(); } 18

Http Client HttpServlet Request Response request ; response ; Session public class HelloServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getwriter(); out.setcontenttype("text/html"); out.println("<html><body>"); out.println("<h1>hello "+request.getparameter("name")+"</h1>"); out.println("</body></html>"); out.close(); } 19

(Life Cycle) 1 2 3 Load Initialize Server Operations Client (Browser) Requests 0 N Destroy 4 20

JSP (JavaServer Pages) HTML cf. HTML <HTML> <BODY> <P>Hello! <BR> Today is: <%= new java.util.date() %> </BODY> </HTML> 21

JavaServer Pages JSP Scriptlets <% %> Directives <%@... %> Expressions <%= %> Declarations <%! %> <jsp:usebean />, <jsp:setproperty />... JSP HTML 22

D E M O N S T R A T I O N Java Servlets and JavaServer Pages (JSP) 23

Agenda J2EE Servlet JSP (JavaServer Pages) JDBC SQL PL/SQL Java Stored Procedures 24

JDBC JDBC JDBC calls Driver Database commands Database Database java.sql javax.sql JDBC 25

JDBC URL Thin driver: jdbc:oracle:thin:@<host>:<port>:<sid> jdbc:oracle:thin:@dbdev.acme.com:1521:orcl OCI driver: jdbc:oracle:oci:@<tnsnames entry> jdbc:oracle:oci:@dbdev Server-Side internal driver: jdbc:oracle:kprb: 26

JNDI DB URL flexible, portable JNDI API J2EE LDAP CORBA/COS RMI DNS File System JNDI Lookup JDBC Connection Database Context ctx = new InitialContext(); OracleDataSource ods = (OracleDataSource)ctx.lookup("jdbc/TestDB"); Connection conn = ods.getconnection(); 27

connection Stateless PooledConnection PooledConnection JDBC Connection Database PooledConnection 28

Connect Issue statement Process results Close DriverManager.registerDriver (new oracle.jdbc.oracledriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@myhost:1521:orcl", scott","tiger"); Statement stmt = conn.createstatement(); ResultSet rset = stmt.executequery ("SELECT employee_id, last_name FROM employees"); while (rset.next()) { } int empid = rset.getint("employee_id"); String empname = rset.getstring("last_name"); System.out.println(empId + : + empname); rset.close(); stmt.close(); conn.close(); 29

: PreparedStatement 1. : (? ) 2. value 3. Statement int empid = 101; PreparedStatement pstmt = conn.preparestatement("update employees SET job_title =? WHERE employee_id =? "); pstmt.setstring(1, "Sales Rep"); pstmt.setint(2, empid); pstmt.executeupdate(); 30

PL/SQL : CallableStatement 1. : (? ) 2. Output 3. Input 4. Statement 5. CallableStatement cstmt = conn.preparecall("{call? := MYFUNC(?)}"); cstmt.registeroutparameter(1, Types.VARCHAR); cstmt.setint(2, 1001); cstmt.execute(); var = cstmt.getstring(1); 31

PL/SQL : CallableStatement 1. : (? ) 2. Output 3. Input 4. Statement 5. CallableStatement cstmt = conn.preparecall("{call? := MYFUNC(?)}"); cstmt.registeroutparameter(1, Types.VARCHAR); cstmt.setint(2, 1001); cstmt.execute(); var = cstmt.getstring(1); 32

Java Stored Procedures stored procedure PL/SQL stored procedure 33

D E M O N S T R A T I O N JDBC 34

Enterprise JavaBeans CMP JavaServer Pages J2EE (ADF ) TopLink JPublisher JDBC JNDI,, 35

Summary J2EE Servlets J2EE JSP JDBC SQL PL/SQL Java Stored Procedure 36

For More Information http://launch.oracle.com PIN: 7505395, http://java.sun.com/j2ee, API Documentation http://otn.oracle.com/sample_code http://otn.oracle.com/tech/java/java_db, Documentation Discussion Forum 37

J2EE iseminar Series Agenda Day 1 J2EE Servlet JSP (JavaServer Pages) Day 2 Enterprise JavaBean Web Services J2EE 38

Q U E S T I O N S A N S W E R S 39

otn.oracle.com, otn.oracle.co.kr Join Over 3,000,000 Developers! Free Technical Advice Free Software Downloads otn.oracle.com/tech/java, otn.oracle.co.kr/tech/java 40