-
最近の投稿
最近のコメント
アーカイブ
- 2017年12月
- 2016年7月
- 2016年5月
- 2016年1月
- 2015年7月
- 2015年5月
- 2015年4月
- 2015年2月
- 2014年12月
- 2014年11月
- 2014年10月
- 2014年9月
- 2014年8月
- 2014年7月
- 2014年6月
- 2014年5月
- 2014年4月
- 2014年3月
- 2014年2月
- 2014年1月
- 2013年12月
- 2013年10月
- 2013年9月
- 2013年8月
- 2013年7月
- 2013年6月
- 2013年5月
- 2013年4月
- 2013年3月
- 2013年2月
- 2013年1月
- 2012年12月
- 2012年11月
- 2012年10月
- 2012年9月
- 2012年8月
- 2012年7月
- 2012年6月
- 2012年5月
- 2012年4月
- 2012年3月
- 2012年2月
- 2012年1月
- 2011年12月
- 2011年11月
- 2011年10月
- 2011年9月
- 2011年8月
- 2011年7月
- 2011年6月
- 2011年5月
- 2011年4月
カテゴリー
メタ情報
Category Archives: Web
grep으로 링크만 추출하기
background-image:url(/images/xxx.png); 위 … Continue reading
Posted in HTML
コメントは受け付けていません。
javascript 화면 사이즈
screen.width 画面幅 : 1920 screen.height 画面 … Continue reading
Posted in HTML
コメントは受け付けていません。
날짜를 풍선처럼 표시하는 방법
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<style type="text/css">
.entry-date {
display: inline-block;
position: relative;
padding: 6px 8px;
background: #2C3E50;
color: #fff;
text-shadow: 1px 1px 1px #000;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
line-height: 1;
font-size: 11px;
}
.entry-date:before {
content: '';
position: absolute;
border-top: 5px solid #2C3E50;
border-right: 5px solid rgba(0, 0, 0, 0);
border-left: 5px solid rgba(0, 0, 0, 0);
bottom: -5px;
left: 36px;
}
</style>
<div class="entry-date">
2014-12-04
</div> |
위 예제는 화살표가 밑에 붙는 … Continue reading
Posted in HTML
コメントは受け付けていません。
TestNG 사용법
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import org.apache.log4j.Logger;
import org.jboss.seam.mock.MockHttpServletRequest;
import org.jboss.seam.mock.MockHttpServletResponse;
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;
public class MyTest extends SeamTest {
static Logger logger = Logger.getLogger(MyTest.class);
static {
try {
Context initContext = new InitialContext();
javax.transaction.UserTransaction transaction = new javax.transaction.UserTransaction() {
@Override
public void begin() throws NotSupportedException, SystemException {
}
@Override
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
}
@Override
public int getStatus() throws SystemException {
return 0;
}
@Override
public void rollback() throws IllegalStateException, SecurityException, SystemException {
}
@Override
public void setRollbackOnly() throws IllegalStateException, SystemException {
}
@Override
public void setTransactionTimeout(int arg0) throws SystemException {
}
};
initContext.bind("/UserTransaction", transaction);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test(groups = { "Exception" })
public void case001() throws Throwable {
new FacesRequest() {
@Override
protected HttpServletRequest createRequest() {
MockHttpServletRequest req = (MockHttpServletRequest) super.createRequest();
try {
// 아래와 같이 필요에 따라 Request 내용을 설정한다.
// Mockito라는 라이브러리가 있지만 이미 생성된 인스턴스에 대해서는 불가능
Field f = req.getClass().getDeclaredField("contextPath");
f.setAccessible(true);
f.set(req, "/myapp");
} catch (Exception e) {
e.printStackTrace();
}
return req;
}
@Override
protected void beforeRequest() {
super.beforeRequest();
// request parameter 에 대해서는 여기에 설정
setParameter("a", "b");
}
@Override
protected void updateModelValues() throws Exception {
// 인잭션이 필요한 컴포넌트는 여기에서 일단 생성
getInstance("Seam컴포넌트");
}
@Override
protected void invokeApplication() throws Exception {
// 테스트 내용을 여기에 기술
assert (체크내용);
}
}.run();
}
} |
위의 샘플소스는 JNDI를 사 … Continue reading
JBoss 4.2.3 에서 org.jboss.mx.server.MBeanServerBuilderImpl 에러
JBoss4.2.3에서 Caused by: java.lang.ClassN … Continue reading
JBoss 4.2.3 포트를 일괄변경하기
JBoss 5.x에서는 VM옵션에 -Djboss.service.bindi … Continue reading
Posted in JBoss
コメントは受け付けていません。
javascript로 화면사이즈 구하기
screen.width 画面幅 : 1920 screen.height 画面 … Continue reading
Writer와 ServletOutputStream의 차이
1 2 3 4 5 6 7 8 9 |
res.setContentType("application/json; charset=utf-8");
// 以下方法だと JournalのWrapperにキャッチされる
Writer out = res.getWriter();
out.write(JSON.encode(responseMap));
out.flush();
// ServletOutputStream sos = res.getOutputStream();
// sos.write(JSON.encode(responseMap).getBytes("utf-8"));
// sos.flush();
// sos.close(); |
Writer로하면 밑에서의 로 … Continue reading
HTTP헤더의 중복되는 키값
HttpURLConnection.addRequestProperty 에 대 … Continue reading
Posted in HTML
コメントは受け付けていません。