${} - 즉시 적용 (immediate evalution)
- 객체의 프로퍼티 값을 꺼내거나 메서드를 호출

#{} - 지연 적용{deferred evaluation)
- 사용자가 입력한 값을 객체의 프로퍼티에 담는 용도로 주로 사용
- JSF(javaServer Faces)에서 UI를 만들때 사용

- 사용 예 :
${ 스코프.객체명.프로퍼티 }
${ 객체명.프로퍼티 }

- 스코프가 없을 때 보관소 찾는 순서
1) pageScope   => JspContext
2) requestScope  => ServletRequest
3) sessionScope  => HttpSession
4) applicationScope => ServletContext
5) 모두 없다면 null 리턴

- 기본 객체
${pageScope.객체명}
${requestScope.객체명}
${sessionScope.객체명}
${applicationScope.객체명}

${param.매개변수명} - 값 조회
${paramValues.매개변수명} - 값 배열 조회
${header.헤더명} - HTTP 헤더 값 조회
${headerValues.헤더명} - HTTP 헤더 값 배열 조회
${cookie.쿠키명}
${initParam.매개변수명}

${pageContext} - 내장 객체 중 유일하게 map이 아님
${pageContext.servletContext.객체명}
${pageContext.session.객체명}
${pageContext.request.객체명}




http://hangaebal.blogspot.kr/2014/06/el-expression-language.html

1. web.xml에 설정
<context-param>
 <param-name>driver</param-name>
 <param-value>com.mysql.jdbc.Driver</param-value>
</context-param>

2. 사용
ServletContext sc = this.getServletContext();
sc.getInitParameter("driver");


http://hangaebal.blogspot.kr/2014/06/blog-post.html

'Blogger 이사' 카테고리의 다른 글

[JSP] JSTL (JSP Standard Tag Library) 사용  (0) 2016.01.14
[JSP] EL (Expression Language) 사용  (0) 2016.01.14
[Servlet] Servlet Filter  (0) 2016.01.14
[JSP] JSP 액션 태그 사용  (0) 2016.01.14
[Servlet] Servlet 구동 기본  (0) 2016.01.14

 - 서블릿 실행 전/후 공통으로 필요한 작업을 수행
 > 사전작업 (문자 집합 설정, 사용 권한 확인 등)
 > 사후작업 (응답 데이터 암호화 등)
- 모든 요청에 적용하거나, 특정 url 요청에만 적용도 가능함


사용 :
1. 필터 클래스 생성 (implements Filter) 및 구현
2. @WebFilter 또는 web.xml 파일에 패치 설정


http://hangaebal.blogspot.kr/2014/06/servlet-filter.html


<jsp:useBean>
- 자바 인스턴스를 준비함
- 보관소에서 인스턴스를 꺼내거나, 없으면 새로 만들어 저장
- 사용 예 : <jsp:useBean id="test" scope="session" class="package.test"/>

<jsp:setProperty> / <jsp:getProperty>
- setter / getter 메서드 호출

<jsp:include> / <jsp:forward>
- 사용 예 : <jsp:include page="/header.jsp"/>

<jsp:param>
- <jsp:include>, <jsp:forward>, <jsp:params> 의 자식 태그로 사용
- ServletRequest 객체에 매개변수를 추가하는 코드를 생성



http://hangaebal.blogspot.kr/2014/06/jsp.html

1. GenericServlet 상속 받아서 Servlet 클래스 생성 (+ 구현)
2. @WebServlet 애노테이션이나 web.xml 파일로 배치 설정
3. 서버 구동

4. 클라이언트 요청
- 해당 서블릿이 없다면 클래스로딩 > init() > service()
- 해당 서블릿이 있다면 service() 만 호출
=> 웹 앱 종료 전까지 서블릿 객체는 한 번만 생성, 이후 유지 됨


http://hangaebal.blogspot.kr/2014/06/servlet.html


'Blogger 이사' 카테고리의 다른 글

[Servlet] Servlet Filter  (0) 2016.01.14
[JSP] JSP 액션 태그 사용  (0) 2016.01.14
[JavaScript] '초' -> '시 분 초' 형태로  (0) 2016.01.14
[Javascript] String replaceAll  (0) 2016.01.14
[SQLite] Web SQL search on dates  (0) 2016.01.14
if (sec < 60) {
sec = sec + '초';
} else if (sec < 3600){
sec = Math.floor(sec%3600/60) + '분 ' + sec%60 + '초';
} else {
sec = Math.floor(sec/3600) + '시간 ' + Math.floor(sec%3600/60) + '분 ' + sec%60 + '초';
}


- time to hour minute second




http://hangaebal.blogspot.kr/2014/06/javascript.html

'Blogger 이사' 카테고리의 다른 글

[JSP] JSP 액션 태그 사용  (0) 2016.01.14
[Servlet] Servlet 구동 기본  (0) 2016.01.14
[Javascript] String replaceAll  (0) 2016.01.14
[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
str.replace(/foo/g, "bar")

or

String.prototype.replaceAll = function(str1, str2, ignore) {
 return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,"$$$$"):str2);
}


http://hangaebal.blogspot.kr/2014/06/javascript-string-replaceall.html
http://stackoverflow.com/questions/2116558/fastest-method-to-replace-all-instances-of-a-character-in-a-string


'Blogger 이사' 카테고리의 다른 글

[Servlet] Servlet 구동 기본  (0) 2016.01.14
[JavaScript] '초' -> '시 분 초' 형태로  (0) 2016.01.14
[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[SQLite]Web SQL error handling  (0) 2016.01.14

select * from dates
where dte = date('now');

select dtm from datetimes
where dtm >= datetime(date('now'))
and dtm < datetime(date('now', '+1 day'));

select datetime(dtm, 'unixepoch', 'localtime') from unix
where dtm >= strftime('%s', date('now'))
and dtm < strftime('%s', date('now', '+1 day'));




http://hangaebal.blogspot.kr/2014/06/web-sql-search-on-dates.html
https://gist.github.com/dwurf/8929425

'Blogger 이사' 카테고리의 다른 글

[JavaScript] '초' -> '시 분 초' 형태로  (0) 2016.01.14
[Javascript] String replaceAll  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[SQLite]Web SQL error handling  (0) 2016.01.14
[JavaScript] String Object Methods  (0) 2016.01.14

- SQLite Syntax Documentation

- SQLite Documentation


http://sqlite.org/lang.html

'Blogger 이사' 카테고리의 다른 글

[Javascript] String replaceAll  (0) 2016.01.14
[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite]Web SQL error handling  (0) 2016.01.14
[JavaScript] String Object Methods  (0) 2016.01.14
[SQL] SQL get last row  (0) 2016.01.14



db.
transaction(tx) {
doQuery(tx, "SELECT * FROM TABLE",[],theSuccessHandler)
});

function doQuery(tx, query, values, successHandler) {
tx.executeSql(query, values, successHandler, errorHandler);
function errorHandler(transaction, error) {
alert("Error : " + error.message + " in " + query);
}
}


http://hangaebal.blogspot.kr/2014/06/web-sql-error-handling.html

http://stackoverflow.com/questions/16559832/how-to-get-the-context-of-a-web-sql-error

'Blogger 이사' 카테고리의 다른 글

[SQLite] Web SQL search on dates  (0) 2016.01.14
[SQLite] SQLite Syntax Documentation  (0) 2016.01.14
[JavaScript] String Object Methods  (0) 2016.01.14
[SQL] SQL get last row  (0) 2016.01.14
[JavaScript] key, value Array Sort  (0) 2016.01.14

+ Recent posts