Tag Cloud

Blogumulus by Roy Tanck and Amanda Fazani

표준기술 - J2EE(Enterprise Edition), J2SE(Standard Edition), J2ME(Micro Edition), 기타 java, javax package
준표준기술 - Library(functional), Framework(architectural)

Layered Architecture Style
1. Presentation Layer
- 표준 : JSP/Servlet
- 준표준 : MVC Framework (Struts + Webwork -> Struts2, Spring MVC)
2. Business Layer
- 표준 : EJB
- 준표준 : Container Framework (Spring Framework)
3. Data Persistence
- 표준 : JDBC
- 준표준 : Data Mapping Framework(iBatis),OR Mapping Framework(Hibernate)

Enterprise System
- 다수의 Request 발생 -> User 증가 -> web(JSP/Servlet)
- 다수의 Transaction 처리 -> Distribute 환경 -> EJB


Servlet/JSP 주요 객체

Class Name
추상화 대상
획득방법
생성/소멸 시점
데이터 공유
HttpServletRequest
client 요청 data service method의 argument 요청 시 생성 응답 시 소멸 하나의 요청이 끝날 때까지 공유
HttpServletReponse
client 응답 data
-
ServletConfig
web.xml의 Init Parameter data (runtime 시 변경되지 않으며 유지보수 시 사용하기 위한 환경설정 getServletConfig() Servlet과 동일
-
ServletContext
Web App 대표 getServletContext() Server 시작/종료 시 생성/소멸 모든 사용자의 모든 요청 시 공유
Cookie
client side 상태 정보값 new Cookie
-
-
HttpSession
server side 상태 정보값 request.getSession() 프로그램에서 제어 현 사용자의 모든 요청 시 공유
RequestDispatcher
다른 JSP/Servlet 실행 목적 context.getRequestDispatcher
-
-

Tools
Ant : XML 형식의 빌드 파일을 이용하여 Source Code 입력 이외 모든 것 자동화
Junit : 자동화된 단위 테스트 구현
Log4j : XML 또는 properties 로그 정책 명시

Custom Tag (Tag Library)
1. Script Tag : <%--, <%, <%=, <%!, <%@
2. Action Tag : <jsp:useBean [ getProperty | setProperty | forward | include...]
3. Custom Tag : 개발자들이 직접 Action tag를 정의, 여러 JSP에서 반복되는 긴 자바코드 or HTML을 Tag로 대체

Tag Comparison
1. <%@ include file="b.jsp" %> : static include (compile 단계), dynamic include에 비해 성능이 아주 약간 더 빠름
2. <jsp:incude page="b.jsp" /> : dynamic include, 변경 시 유지보수 용이, 동일 Web Application 내의 file만 참조 가능 ( ServletContext - RequestDispatcher 이용)
3. <c:import url="b.jsp" /> : dynamic include, 모든 서버 내 file 참조 가능 (Network Program으로 변경)

page redirection
forward 방식 : ServletContext - RequestDispatcher - forward, url 변경이 없으며 새로고침 시 본래 페이지로 이동, 이전 상태 데이터 획득을 위해 Request 객체에 의해 데이터 공유 가능
redirect 방식 : HttpServletResponse - sendRedirect, 브라우저가 현재 페이지의 응답을 client측에 전달하고 다른 페이지로 이동, url 주소 변경 및 새로고침 시 이동한 페이지를 다시 로딩, 이전 상태 데이터 획득을 위해 request객체 대신 Cookie 또는 Session 이용해야 함


1991
The Green Project Begins
MS DOS is the dominant operating system
Cell phones weigh half a pound
"Biosphere 2" project begins
1992
"Oak" is the language
*7 Debuts
"Duke" is featured in the Interface
Johnny Carson signs off "The Tonight Show" on NBC
1993
The Green Project becomes FirstPerson
Mosaic v1.0 is released
"Cheers" ends an 11-year run
1994
WebRunner released — the first browser that supports moving objects and dynamic executable content
The Apple QuickTake 100, the first consumer digital camera, goes on sale for less than $1,000
"Friends" debuts on NBC
1995
Java technology released to a select group on the Web site wicked.neato.org
The San Jose Mercury News runs a front-page article about Java technology
Name changed from "Oak" to "Java"
Announced at Sun World -- Java technology is officially born
1996
The first JavaOne Developer Conference
JDKtm 1.0 software is released
Chess computer Deep Blue defeats Garry Kasparov for the first time
"Dolly" the first cloned sheep is born
1997
Over 220,000 downloads of JDK 1.1 software occur in just three weeks
JavaOne draws 8,000 attendees, becoming the world's largest developer conference
Java Card 2.0 platform is unveiled
43% of U.S. families own a computer
1998
JDK 1.1 release downloads top 2 million
Visa launches world's first smart card based on Java Card technology
The Java Community Process (JCP) program formalized
"Who Wants to Be a Millionaire?" premieres in the U.K
1999
Java 2 platform source code is released
JavaOne draws 20,000
J2EE beta software is released
"Star Wars Episode I: The Phantom Menace" released
2000
Over 400 Java User Groups are established worldwide
Java Developer Connection program tops 1.5 million members
Steve Jobs joins Scott McNealy on stage at JavaOne to announce a major commitment by Apple in support of Java technology
Heavy Metal band Metallica sues Napster for copyright violations
2001
First international JavaOne conference in Yokohama Japan
Over 1 million downloads of the Java Platform, Enterprise Edition (Java EE) SDK
Google Inc. PageRank search algorithm patent awarded
"The Lord of the Rings: The Fellowship of the Ring" is released
2002
J2EE SDK downloads reach 2 million
78% of executives view J2EE technology as the most effective platform for building and deploying Web services
The Euro is introduced
"The Osbournes" becomes a surprise hit on MTV
2003
Java technology runs in almost 550 million desktops
Almost 75% of professional developers use Java programming language as their primary development language
Commercial Voice-Over-Internet (VoiP) phone service begins
"The Da Vinci Code" is published
2004
Java 2 Platform, Standard Edition 5 (Project Tiger) is released
The Java technology-powered Mars Rover (Spirit) touches down on Mars
Sun Java Studio Creator is launched
2005
Java technology celebrates its 10th birthday
Approximately 4.5 million developers use Java technology
Over 2.5 billion Java technology-enabled devices are available
java.com bundles the Google Toolbar with the JRE download
2006
Rich Green announces at the JavaOne 2006 Conference that it's not a matter of when Sun will open source Java technology, but how. The NetBeans IDE 5.0 is released. Sun open-sourced Java EE components as the Glassfish Project to java.net. Java SE and ME initial components are released as open source. Pirates of the Caribbean: Dead Man's Chest is released.

from http://www.java.com/en/javahistory/timeline.jsp

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;
import java.util.Date;
import java.text.SimpleDateFormat;

public class compareTime
{
public static void main(String[] args)
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("Driver loading success");
}
catch (ClassNotFoundException e)
{
System.out.println("Driver loading fail");
}

try
{
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@IP:PORT:SID","ID","PASSWORD");
System.out.println("Connection Success");
System.out.println("");

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select to_char(systimestamp, 'hh24:mi:ss:ff3') as time from dual");

System.out.println(getTime());

if (rs.next())
{
System.out.println("DB1 Time --> " + rs.getString("time"));
}

System.out.println(getTime());

conn.close();
System.out.println("");
System.out.println("Connection finished");
}
catch (SQLException sqle)
{
System.out.println("Connection fail");
}
catch (IllegalArgumentException ille)
{
System.out.println("IllegalArgument input");
}
}


private static String getTime()
{
SimpleDateFormat sdf = new SimpleDateFormat("kk:mm:ss:SS");

return "WAS1 Time --> " + sdf.format(new Date());
}
}