검색결과 리스트
jsp에 해당되는 글 9건
- 2013.12.04 [Jsp] JSP 및 스프링 뷰를 대체할 템플릿 언어
- 2012.07.27 [Jsp] 간단하게 Excel 출력하기
- 2012.02.16 [Log4j] Log4j Homepage Link
- 2011.11.07 [Jsp] JSTL <c:forEach></c:forEach> 반복처리
- 2011.10.07 [Eclipse] eclipse에서 .jsp 파일을 작성할때 실제 .java 파일 생성 위치
- 2011.08.23 [JSP] 물리적 경로를 웹상의 상대 경로로 변환
- 2011.04.25 [JSP] <jsp:include>와 <%@ page include %>의 차이
- 2011.04.25 [JSP] UrlEncoding 하기
- 2011.03.17 [JSP] Procedure Call
글
'Java > Jsp' 카테고리의 다른 글
[Jsp] 간단하게 Excel 출력하기 (0) | 2012.07.27 |
---|---|
[Jsp] Java EL 개요 (0) | 2012.02.22 |
[Jsp] Java Custom Tag (0) | 2012.02.09 |
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
트랙백
댓글
글
<%
// jsp 페이지 맨 앞에 해준다.
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=excel.xls");
response.setHeader("Content-Description", "JSP Generated Data");
%>
'Java > Jsp' 카테고리의 다른 글
[Jsp] JSP 및 스프링 뷰를 대체할 템플릿 언어 (0) | 2013.12.04 |
---|---|
[Jsp] Java EL 개요 (0) | 2012.02.22 |
[Jsp] Java Custom Tag (0) | 2012.02.09 |
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
트랙백
댓글
글
'Java > log4j / logback' 카테고리의 다른 글
[Logback] Mapped Diagnostic Context (0) | 2014.06.05 |
---|---|
[Logback] Anyframe Logback plugin (0) | 2014.06.05 |
[logback] log4j -> logback 마이그레이션 (0) | 2014.05.31 |
[slf4j] Simple Logging Facade for Java (0) | 2014.05.31 |
[log4j] log4j 설정 (0) | 2012.07.05 |
트랙백
댓글
글
배열, 리스트, 컬렉션, Map등의 순환처리를 할수 있다.
// java 코드
map.put("key1", "value1");
map.put("key2", "value2");
// JSTL 코드
<c:foreach var="item" items="${map}">
${item.key} : ${item.value}
</c:foreach>
'Java > Jsp' 카테고리의 다른 글
[Jsp] Java EL 개요 (0) | 2012.02.22 |
---|---|
[Jsp] Java Custom Tag (0) | 2012.02.09 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
[JSP] <jsp:include>와 <%@ page include %>의 차이 (0) | 2011.04.25 |
[JSP] UrlEncoding 하기 (0) | 2011.04.25 |
트랙백
댓글
글
출처 : http://ilovejsp.blog.me/100129601931
[workspace 위치]\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp[X]\[project명]
'IDE/Tool > Eclipse' 카테고리의 다른 글
[Eclipse] Tasks를 사용하자. (0) | 2011.11.11 |
---|---|
[Eclipse] 이클립스 속도향상 설정 (0) | 2011.10.25 |
[Eclipse] Toggle Comment 단축키 (0) | 2011.09.09 |
[Eclipse] 세로모드 사용하기 (컬럼) (0) | 2011.08.31 |
[Eclipse] 탭을 공백으로 변환하기 Insert Spaces for tabs (0) | 2011.08.31 |
트랙백
댓글
글
1. getRealPath(String path) : String -> 물리적 경로에 대한 웹상의 경로를 리턴
2. getResource(String path) : java.net.URL -> 물리적 경로에 대한 URL객체를 리턴
3. getResourceAsStream(String path) : java.io.InputStream -> 물리적 경로에 대한 InputStream 을 리턴
'Java > Jsp' 카테고리의 다른 글
[Jsp] Java Custom Tag (0) | 2012.02.09 |
---|---|
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] <jsp:include>와 <%@ page include %>의 차이 (0) | 2011.04.25 |
[JSP] UrlEncoding 하기 (0) | 2011.04.25 |
[JSP] Procedure Call (0) | 2011.03.17 |
트랙백
댓글
글
둘의 차이가 비슷하지만 미묘한 차이가 있는 것 같습니다.
* <%@ page include %> 이하 1
* <jsp:include> 이하 2
둘다 다른 파일을 인클루드 해서 합치는건 맞지만 1번은 컴파일 단계에서 합쳐져서 컴파일 됩니다.
그러니까 C로 말하면 #include 와 같은 기능입니다.
2번은 인클루드 하는건 맞지만 출력버퍼에 내용을 합칩니다.
결국 C로 이야기 하면은 C 파일을 컴파일 하면은 페이지 별로 .obj 파일이 생성하는데 그 다음 링크단계에서
합쳐서 하나의 모듈을 완성하는 것과 비슷한 단계입니다.
글을 적고 보니까 더 헷갈리는데
1번은 컴파일 전에 소스코드단에서 합쳐지기때문에 변수 공유가 가능하고
2번은 컴파일 후에 C의 링크(?) 단계와 비슷하게 합쳐지기 때문에 변수 공유를 할려면 영역 관련된 객체
(Request, Session, Application을 사용해서 공유하거나, <jap:param>을 사용해서 파라미터를 추가)
* 2011-05-30 : 링크단계보다 런타임시 호출된 결과를 호출한 페이지에서 합치는 것이라고 보는게 맞을 것 같습니다.
ps. 공부하는 단계에 정리하면서 글을 적다 보니 잘못알고 있는 내용이 있을수도 있습니다.
혹 잘못된 내용이라면 바른 내용을 알려주시면 정정하겠습니다.
'Java > Jsp' 카테고리의 다른 글
[Jsp] Java Custom Tag (0) | 2012.02.09 |
---|---|
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
[JSP] UrlEncoding 하기 (0) | 2011.04.25 |
[JSP] Procedure Call (0) | 2011.03.17 |
트랙백
댓글
글
Jsp 페이지에서 내부적으로 리다이렉트 하는 경우가 발생하면
URL 인코딩을 해서 글자가 깨지는 경우가 발생하는데 그럴때 인코딩을 하면된다.
클래스
java.net.URLEncoder
Method Summary | |
---|---|
static String |
encode(String s) Deprecated. The resulting string may vary depending on the platform's default encoding. Instead, use the encode(String,String) method to specify the encoding. |
static String |
encode(String s, String enc) Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. |
'Java > Jsp' 카테고리의 다른 글
[Jsp] Java Custom Tag (0) | 2012.02.09 |
---|---|
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
[JSP] <jsp:include>와 <%@ page include %>의 차이 (0) | 2011.04.25 |
[JSP] Procedure Call (0) | 2011.03.17 |
트랙백
댓글
글
저희쪽 환경은 Jsp + Tomcat + Oracle 입니다.
// 드라이버 로드
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e1) {
e1.printStackTrace(pw);
}
// 연결 클래스 변수 선언
Connection conn = null;
CallableStatement cstat = null;
ResultSet rs = null;
try {
conn = DriverManager.getConnection("jdbc:oracle:thin:@아이피:포트:Tnsname", "아이디", "비밀번호");
// 프로시져 콜
CallableStatement cstat = conn.prepareCall("{CALL 패키지명.프로시져명(?)}");
// output cursor로 데이터를 받아온다.
cstat.registerOutParameter(1, OracleTypes.CURSOR);
cstat.execute();
rs = (ResultSet)cstat.getObject(1);
if ( rs != null )
{
ResultSetMetaData rsmeta = rs.getMetaData();
int nColumn = rsmeta.getColumnCount();
out.println("");
out.println("");
for (int i = 0; i <= nColumn; i++)
{
if ( i == 0 )
out.println(" 번호 ");
else
{
String strColumnName = rsmeta.getColumnName(i);
out.println(strColumnName);
}
}//for (int i = 0; i <= nColumn; i++)
out.println("");
int nRow = 1;
while (rs.next())
{
out.println("");
StringBuffer sb = new StringBuffer();
for (int i = 0; i <= nColumn; i++)
{
if ( i == 0 )
sb.append( Integer.toString(nRow) );
else
sb.append( rs.getString(i) );
}
out.println(sb.toString());
out.println("");
nRow++;
}//while (rs.next())
out.println("");
}//if ( rs != null )
} catch (SQLException e) {
e.printStackTrace(pw);
} finally {
try {rs.close(); } catch (SQLException e) {}
try {cstat.close();} catch (SQLException e) {}
try {conn.close(); } catch (SQLException e) {}
}
'Java > Jsp' 카테고리의 다른 글
[Jsp] Java Custom Tag (0) | 2012.02.09 |
---|---|
[Jsp] JSTL <c:forEach></c:forEach> 반복처리 (0) | 2011.11.07 |
[JSP] 물리적 경로를 웹상의 상대 경로로 변환 (0) | 2011.08.23 |
[JSP] <jsp:include>와 <%@ page include %>의 차이 (0) | 2011.04.25 |
[JSP] UrlEncoding 하기 (0) | 2011.04.25 |
RECENT COMMENT