가끔 재설정해야 할 때마다 기억이 안 나서 헤맨다. ㅡㅡ
1. Java EE plug in 설치 - ant 항목(메뉴?) 생성
2. Maverick ANT 라이브러리 설치
maverick-ant 파일을 다운로드해서 적당한 곳에 위치
(전 주로 lib 디렉토리 밑에 둡니다.)
3. 이클립스에서 Window>Preferences>Ant>Runtime 메뉴로 이동
Ant Home Entries(Default) 선택>Add External JARs 를 열어서 다운받았던 jar파일 연결
4. build.xml파일 작성
'JAVA > Eclipse' 카테고리의 다른 글
이클립스 워크스페이스별 바로가기 (0) | 2012.09.03 |
---|
다른 블로그 정리하느라 예전 내용 옮기는데,
이런게 있었구나......
스크랩만 해두고 두번다시 보지않는 현실 ㅡㅡ;;
1. asx 태그 사용하는 페이지를 asx.asx가 아니라 asx.jsp로 저장한다.
<ASX version ="3.0">
<%
// 방송정보 가져오기
String vodfile = request.getParameter("vodfile"); // ASX파일
String s_time = request.getParameter("s_time"); // 시작시간
if(vodfile == null) vodfile = "";
if(s_time == null) s_time = "";
%>
<Entry>
<Ref href="<%=vodfile%>"/>
<STARTTIME VALUE="<%=s_time%>"/>
</Entry>
</ASX>
2. 동영상 파일의 시작시간을 설정하는 쿼리(s_time)
TO_CHAR(TO_DATE(TRUNC(MOD(TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS')- TO_DATE(TO_CHAR(TB.BTIME,'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS'),1)* 24 * 60 * 60), 'SSSSS'),'HH24:MI:SS') AS TRANS_TIME
3. 동영상을 재생할 페이지에 아까 asx 태그를 이용하여 저장한 jsp페이지를 동영상 주소로 설정한다.
<%
String getVodAsx = asx.jsp?vodfile="+vod_value+"&s_time="+getSbTime;
%>
<object id="Player" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" width="496px" height="372px" >
<param name="FileName" value="<%=getVodAsx%>">
<param name="AutoStart" value="true">
<param name="TransparentAtStart" value="True">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="AutoSize" value="1">
<param name="AnimationAtStart" value="false">
</object>
<script language="javascript" type="text/javascript">
<!--
// 팝업 창 크기 조절
function setPopResize(intWidth, intHeight)
{
var objBody = window.document.body;
var objDocument = window.document.documentElement;
var intResizeWidth;
var intResizeHeight;
// 너비 입력이 없을 경우 설정
if (isBlank(intWidth) || (intWidth == 0)){
intWidth = objBody.scrollWidth;
}
// 높이 입력이 없을 경우 설정
if (isBlank(intHeight) || (intHeight == 0)){
intHeight = objBody.scrollHeight;
}
if (window.innerWidth){
intResizeWidth = intWidth - window.innerWidth;
} else if (objDocument && objDocument.clientWidth){
intResizeWidth = intWidth - objDocument.clientWidth;
} else if (objBody && objBody.clientWidth){
intResizeWidth = intWidth - objBody.clientWidth;
}
if (window.innerHeight){
intResizeHeight = intHeight - window.innerHeight;
} else if (objDocument && objDocument.clientHeight){
intResizeHeight = intHeight - objDocument.clientHeight;
} else if (objBody && objBody.clientHeight){
intResizeHeight = intHeight - objBody.clientHeight;
}
window.resizeBy(intResizeWidth, intResizeHeight);
}
// 팝업 가운데 정렬
function setPopCenter()
{
var intLeft;
var intTop;
if (document.layers){
var intLeft = (screen.width / 2) - (outerWidth / 2);
var intTop = (screen.height / 2) - (outerHeight / 2);
} else{
var intLeft = (screen.width / 2) - (document.body.offsetWidth / 2);
var intTop = (screen.height / 2) - (document.body.offsetHeight / 2) - 75;
}
window.moveTo(intLeft, intTop);
}
// 팝업 오용 금지
function checkFuncKey()
{
var winEvent;
winEvent = window.event;
if ((winEvent.ctrlLeft || winEvent.ctrlKey) &&
((winEvent.keyCode == 67) || (winEvent.keyCode == 86) || (winEvent.keyCode == 87) || (winEvent.keyCode == 88))){
return;
}
if (winEvent.ctrlLeft || winEvent.ctrlKey){
winEvent.returnValue = false;
winEvent.cancelBubble = true;
return;
}
switch(winEvent.keyCode)
{
case 93: // 기능키
case 116: // F5
case 117: // F6
case 122: // F11
winEvent.keyCode = 0;
winEvent.cancelBubble = true;
winEvent.returnValue = false;
}
}
function N_addEvent(obj, act, fnc)
{
if (obj.addEventListener) {
obj.addEventListener(act, fnc, false);
} else if (obj.attachEvent) {
obj.attachEvent("on" + act, fnc);
}
}
// 팝업 초기화 설정
function initPop(intWidth, intHeight, blnCenter, blnStopAbusing)
{
setPopResize(intWidth, intHeight);
if (blnCenter == 1){
setPopCenter();
}
if (blnStopAbusing == 1){
document.oncontextmenu = function(){return false;};
document.onselectstart = function(){return false;};
document.ondragstart = function(){return false;};
document.onkeydown = function(){checkFuncKey();};
}
window.focus();
}
// 가로크기, 세로크기(0으로설정시 자동계산), 가운데정렬여부, 어뷰징금지여부)
N_addEvent(window, "load", function(){initPop(510, 0, 0, 0);});
//-->
</script>
출처 : 우리회사 이수석님
'JAVA' 카테고리의 다른 글
asx 태그를 jsp로 저장해서 사용하는 방법 (0) | 2013.01.22 |
---|---|
cookie (0) | 2013.01.22 |
형변환 (0) | 2013.01.22 |