ios 5.x 탈옥 관련 팁

분류없음 | 2011/12/05 22:13
Posted by 애바른
반탈에서,

http://thebigboss.org/semitether

Mobile Substrate 을 추가하라~~

그러면 편한아게 반탈이용이 가능함^^

즉, 혹여나 리붓되어도 기본부팅은 된다는... 말씀~~ cydia 가 실행안될뿐이지...

기본 어플이나, itunes에서 받은 어플은 실행하는데 문제없음!! 

diy 관련사이트

분류없음 | 2011/11/29 14:31
Posted by 애바른
* diy 관련사이트 * 








제일카넷 http://www.zeilcar.net / 자동차diy 전문 포탈사이트

손잡이닷컴 http://www.sonjabee.com/ 손잡이나 선반판매 
리빙시티 http://www.livingct.com/ 생활교양코너의 유료홈패션동영상(홈샘님직강) 
삼화 페인트 http://www.djpi.co.kr/ 
쿨칼라 http://coolcolor.co.kr/ 페인트 판매 
굳씽크 http://www.good-think.co.kr/씨트지판매 
반쪽이쩜넷 http://www.banzzogi.net/ 
철천지 http://www.77g.com/ 
페인트클럽 http://www.paintclub.co.kr/ 
theDIY(즐거운diy세상) http://www.thediy.co.kr/ 철물,목재절단판매,3M스프레이판매 
마이드림하우스 http://www.mydreamhouse.co.kr/ 패널벽,리폼,재활용정보와 철망,선반,몰딩판매 
뚝딱이네 http://ddukddak.com/doc/frame2.htm 옷 홈패션 십자수 인형옷강의 
박미영의홈데코 http://my.dreamwiz.com/decohome/mainp.html 홈패션강의 
굿퀼트 http://www.goodquilt.com/frame_main.htm 
퀼트나라 http://www.quiltnala.com/ 
한국공예인협회 http://hdarts.co.kr 퀼트,스텐실 
금성스폰지 http://www.ks-sponge.co.kr/ 스폰지재단하여 판매 
알파문구 http://www.alphastationery.co.kr/ 각종접착제, 문구용품 
한국건축자재협회 http://www.kbmshopping.com 건축자재사이트 
철물백화점 http://www.chulmool.biz 
did벽지 http://www.didwallpaper.com/ 

*원단및 레이스, 부자재 
화이트패브릭 http://www.whitefabric.com/ 
레이스나라 http://www.lacenara.co.kr/ 
천나라닷컴 http://1000nara.com/ 
싸다천 http://ssada1000.com/v2/ 
더싸다 http://www.thessada.com/ 
소잉박스 http://www.sewingbox.net/ 
데코랜드http://my.dreamwiz.com/decohome/mainp.html원단,레이스,태슬,커버링 
천모아 http://www.1000moa.com/ 
슈리본 http://www.sueribbon.co.kr/ 수입리본재료,선물포장재료판매 


*예쁜조명(샹들리에,특이한조명) 있는 사이트* 
데코하우스 http://www.deco-house.co.kr /옥션에서 활동중으로 이번에 오픈 한곳 


*인테리어 소품판매 
화이트홈 http://www.whitehomes.co.kr 
프리티홈 http://www.prettydeco.com/ 
데미스타일 http://www.demistyle.com 
쉬크홈 http://www.chichome.co.kr/ 
바닐라스푼 http://www.vanillaspoon.com/ 
라라데코 http://www.laladeco.com/ 
원룸데코 http://www.oneroomdeco.com/ 독신자타겟 패브릭,소품 
로즈앤핑크 http://www.rosenpink.com/ 인테리어 소품 
앤스홈 http://annshome.co.kr/ 맞춤패브릭 전문 
풍경 http://www.pksopum.com/ 
프로방스 http://www.provence.co.kr/ 프로방스풍 그릇과 가구 
인플로라 http://www.in-flora.co.kr/ 
슈가홈 http://sugarhome.com/ 
포룸 http://www.forroom.com/ 
머쉬룸 http://www.mushroomdeco.co.kr/ 
햄마 http://www.hemma.co.kr/ 이케야제품판매 
핑크데코 http://pinkdeco.co.kr/ 
미세스델러웨이 http://www.mrsdalloway.co.kr/ 
로즈마리 http://www.rosemarihome.com/ 
바인홈http://www.vinehome.co.kr/ 
두산오토 http://www.otto.co.kr/ 
씨씨브랜드 http://www.ccbrand.co.kr/ 
필데코 http://www.feeldeco.com/ 
프롬데코 http://www.fromdeco.com/ 
인플로라 http://www.in-flora.co.kr/ 
포홈 http://www.forhome.co.kr/ 
스위트베리 http://www.sweet-berry.com/index.htm 장식접시와 쿠션등등 
소품채널 http://sofum.co.kr/ 
디피존 http://www.dpzone.co.kr/화이트철재&원목등 상업공간인테리어소품 
인파스텔 http://www.inpastel.co.kr/ 키즈가구,침구,커튼 
소품샵 http://www.sofumshop.co.kr/인테리어소품, 선물샵 
디자인마노 http://www.designmano.co.kr/ 
앤틱하우스 http://www.antichouse.co.kr/ 
아름다운방 http://www.beauty-room.net/ 침구커텐 홈인테리어 
담너머예쁜집 http://www.damzip.com 
제이홈 http://www.jhomes.co.kr/ 
로맨틱홈 http://www.romantic-home.com/ 

*가구관련 
씨리디자인쇼파 http://www.seelee.co.kr 
한샘 http://www.hanssem.com/ 
까사미아 http://www.casamia.co.kr/ 
올리브데코 http://www.olivedeco.co.kr/ 
프란시아 http://www.francia.co.kr/ 
디자인얀 http://www.oyan.co.kr/ 
에프룸 http://www.f-room.com/ (공사중)인테리어코디네이터 최희의 사이트 
디자인앤 http://www.designann.com 
리빙트리 http://www.livingtree.co.kr/ 
대송가구 http://www.daesongmall.com/ 
리빙디자인넷 http://www.livingdesign.net/ 
제니아하우스 http://www.zeniahouse.com/profile/ 

*DIY,맞춤가구 
내가디자인하고내가만드는가구 http://www.my-diy.co.kr/ 
정크가구 http://www.junkstyle.co.kr/ 
상상나무 http://www.interior911.co.kr/ 

*정원용품판매 
쉐르보네 http://www.cherbonheur.com/ 야외 정원용품판매,목재맞춤절단판매 
브라이덜가이드 http://www.bridalguide.co.kr/ 다양한 조화판매 
조은자리 http://www.jounjary.co.kr/ 

*해외인테리어사이트 
로라애슐리 http://www.laura-ashley.com/ 
마샤스튜어트 http://www.marthastewart.com/ 
쉭새크http://chicshack.net/ 
유로데코 http://www.eurodecony.com/ 한인조각가 최린의 조각인테리어소품사이트 

*해외구매대행사이트 
맘앤키즈 http://www.momandkids.co.kr/ 로라애슐리침구나 장식접시, 샤워커튼등 수입대행 
까사까사 http://www.casacasa.co.kr/ 해외 주방용품 

*월간인테리어잡지 
레이디경향 http://www.khan.co.kr/ 
리빙센스 http://livingsense.ismg.co.kr/ 
여성동아 http://women.donga.com/ 
팟찌닷컴 http://www.patzzi.com/ 
까사리빙 http://www.casa.co.kr/home/ 
행복이가득한 집 http://www.design.co.kr/ 
우먼센스 http://womansense.ismg.co.kr/womansense/index.php 

*미싱판매 
썬마트 http://www.sunmart.co.kr/ 
부라더미싱 http://www.brother-shop.co.kr/ 

*대표로드샵 
2001아울렛 www.2001outlet.com
이마트 www.cyberemart.co.kr/ 
홈플러스 www.homeplus.co.kr/
코즈니 www.kosney.co.kr/ 
전망좋은방(룸앤데코) http://www.room-deco.co.kr/ 

*원예사이트 
새싹닷컴 http://saesak.com/식충식물,허브,관엽등에대한 질문답변,판매 
플랜트플러스 http://www.plantplus.co.kr/ 

*기타 데코플라자를 통하면좋은사이트 
노니포유 http://www.noni4u.co.kr/ 직수입 석류,노니관련제품, 건강제품 
웹딱 http://www.webddak.co.kr/ 감각디자인소품 선물용품 

잘 정리된곳
http://myhome.naver.com/cejbaby/menu12.html

소담(릴렉스비슷한거 공구)
http://sodam.odsoft.co.kr

인하우스 지점 안내
http://www.innhaus.co.kr/index.html

수예품+소품파는 곳 (커픈이쁨)
http://www.decotop.com/

레몬스위티(행가집 쥔장 레오가 만든 쇼핑몰)
http://www.lemonsweety.com/

리본묶는 법등 포장법의 모든 것


http://okgift.pe.kr
http://www.forhome.co.kr (다들 아시는 곳이죠..)
http://www.ccbrand.co.kr (자신의 이니셜을 세겨주는 곳이죠...좀 비싸요..)
http://www.thediy.co.kr (각종 DIY제품을 파는곳..MDF나 합판을 잘라서 팔아요..)
http://www.sewingbox.net/index.php (원단파는곳..)
http://www.thessada.com/ (여기도 원단파는 곳...)
http://www.rosecoco.com/ (부산에 오프라인 샾이있죠..그리고 사장님이 남자분이시라는...)
http://www.djpi.co.kr/ (페인트 용품파는곳..)
http://rodam.co.kr/mini.htm (실내정원꾸며주는 곳인데요..비싸니 눈팅만하세요..)
http://www.rosenpink.com/ (아시는분은 다아시는 가격이 비교적 싸더라구요..)
http://www.designmano.co.kr/ (패브릭 소품이 이쁜곳..)
http://www.oneroomdeco.com/ 
(최그에 알게된곳...이쁜게 많터라구요..)
http://www.pksopum.com/default.asp (역시 최근에 알게된곳 인테리어 소품점)
http://www.whitefabric.com/ (이쁜 원단이 많은 곳..)
http://boddary.com/ (원단파는곳..)



http://localhost:7402/crx/de/js/CRX/util/Util.js


/*
 * Copyright 1997-2008 Day Management AG
 * Barfuesserplatz 6, 4001 Basel, Switzerland
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Day Management AG, ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Day.
 */

/**
 * The <code>CRX.utils.Util</code> library contains utility methods for CRXDE.
 * @static
 * @class CRX.utils.Util
 */

CRX.util.Util = function() {

    var lastAuthHeader = null;

	var connectionData = null;
	
    var globalDialogs = {};
    
    // private property
    var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

    // private method for UTF-8 encoding
    var _utf8_encode = function (string) {
        string = string.replace(/\\r\\n/g,'\\n');
        var utftext = '';
        for (var n = 0; n < string.length; n++) {
            var c = string.charCodeAt(n);
            if (c < 128) {
                utftext += String.fromCharCode(c);
            } else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            } else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }
        }
        return utftext;
    };
    
    var fileMap = {};

    var eventObject = new Ext.util.Observable();
    eventObject.addEvents("reinit");

    return {
        on : function(eventName, fn, scope, o) {
            eventObject.on(eventName, fn, scope, o);
        },

        /**
         * Evaluates and returns a string.
         * @param {String} param The string
         * @return The evaluated object
         * @type Object
         */
        eval: function(json) {
            try {
                return eval("(" + json + ")");
            } catch (e) {
                return null;
            }
        },

		/**
         * Returns the anchor part of the URL.
         * @static
         * @param {String} url The URL
         * @return {String} The anchor
         */
        getAnchor: function(url) {
            if (url.indexOf("#") != -1) {
                return url.substring(url.indexOf("#") + 1);
            }
        },
        
    	getURLParams: function(url) {
    	    url = url || window.location.search;
    	    url = url.split("?");
    	    if (url.length > 1) {
    	        return Ext.urlDecode(url[1]);
    	    }
    	    return {};
    	},

        /**
         * Returns the value of the cookie with the given name.
         * @static
         * @param {String} name The name of the cookie
         * @return {String} The value of the cookie
         */
        getCookie: function(name) {
            var cname = encodeURIComponent(name) + "=";
            var dc = document.cookie;
            if (dc.length > 0) {
                var begin = dc.indexOf(cname);
                if (begin != -1) {
                    begin += cname.length;
                    var end = dc.indexOf(";", begin);
                    if (end == -1) end = dc.length;
                    return decodeURIComponent(dc.substring(begin, end));
                }
            }
            return null;
        },

        /**
         * Sets the value of the cookie with the given name.
         * @static
         * @param {String} name The name of the cookie
         * @param {String} value The value of the cookie
         * @param {String} path (Optional) The server path the cookie applies to
         * @param {int} days (Optional) The number of days the cookie will live, 
		 *                              no value creates a session cookie, 0 removes
		 *                              the cookie
         * @param {String} domain (Optional) The server domain
         * @param {boolean} secure (Optional) <code>true</code> if the
         *        connection is secure, <code>false</code> otherwise
         * @return {String} The value of the cookie
         */
        setCookie: function(name, value, path, days, domain, secure) {
            if (days && (typeof(days) != "number")) days = 7;

            var date;
            if (days > 0) {
                date = new Date();
                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
            } else if (days == 0) {
				date = new Date(1970, 0, 1);
			}
            document.cookie = encodeURIComponent(name) + "=" +
                         encodeURIComponent(value) + "; " +
                         (date ? "expires=" + date.toGMTString() + "; " : "") +
                         (domain ? "domain=" + domain + "; " : "") +
                         (path ? "path=" + path : "") +
                         (secure ? "; secure" : "");
            return value;
        },

        // public method for encoding
        base64Encode: function (input) {
            var output = '';
            var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
            var i = 0;
            input = _utf8_encode(input);
            while (i < input.length) {
                chr1 = input.charCodeAt(i++);
                chr2 = input.charCodeAt(i++);
                chr3 = input.charCodeAt(i++);
                enc1 = chr1 >> 2;
                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                enc4 = chr3 & 63;
                if (isNaN(chr2)) {
                    enc3 = enc4 = 64;
                } else if (isNaN(chr3)) {
                    enc4 = 64;
                }
                output = output +
                _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
                _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
            }
            return output;
        },
        
        reinit: function() {
            Ext.Ajax.request({
                url:CRX.Util.getContextPath() + "/de/init.jsp",
                success:function(response, options) {
                    connectionData = CRX.Util.eval(response.responseText);

                    eventObject.fireEvent("reinit", this);

                    if (CRX.NodetypeRegistry) {
                        // todo: probably the wrong place, use event listener
                        // reload node types
                        CRX.NodetypeRegistry.reload(function() {
                            var tree = Ext.getCmp(CRX.ide.TREE_ID);
                            tree.setWorkspace(CRX.Util.getWorkspace());
                        });
                    }
                }
            });
        },
        
        /**
         * Creates a new dialog or returns an existing dialog if there was already a dialog
         * created with the same xtype before.
         *
         * @param {String/Object} config either an xtype string or a full dialog config object
         * @param {Object} dialogs (optional) cache for dialogs; if omitted, a global cache will be used
         **/
        getDialog: function(config, dialogs) {
            dialogs = dialogs || globalDialogs;
            var type   = typeof config === "string" ? config : config.xtype;
            config = typeof config === "string" ? {xtype: type} : config;
            
            if (!dialogs[type]) {
                dialogs[type] = Ext.ComponentMgr.create(config);
            }
            return dialogs[type];
        },

		getLocalWorkspacePath: function(path) {
			var localPath = path.substr(path.indexOf(CRX.ide.JCR_ROOT_NAME) 
									+ CRX.ide.JCR_ROOT_NAME.length);
			if (localPath == "") {
				localPath = "/"; // it the root node
			}
			return decodeURIComponent(localPath);
		},
		
		convertToTreePath: function(path) {
			// encode path
	        var labels = path.split("/");
	        for (var i=0; i<labels.length; i++) {
	            labels[i] = encodeURIComponent(labels[i]);
	        }
	        path = labels.join("/");
			return "/" + CRX.Util.getWorkspace() + "/" + CRX.ide.JCR_ROOT_NAME + path;
		},
		
		setWorkspaceFromPath: function(path) {
            connectionData.workspace = path.substr(0, path.indexOf(CRX.ide.JCR_ROOT_NAME) - 1).substr(1);
		},
		
		setConnectionData: function(data) {
            connectionData = CRX.Util.eval(data);
        },

        getWorkspace: function() {
            return connectionData.workspace;
        },

        getWorkspaces: function() {
            return connectionData.workspaces;
        },

		getLaunchpadContextPath: function() {
            return connectionData.launchpadContextPath == "/" ? "" : connectionData.launchpadContextPath;
        },
        
		getSpiBaseUrl: function() {
			return CRX.Util.getContextPath() + "/server";
		},
		
		getSpiRootUrl: function() {
			return CRX.Util.getSpiBaseUrl() 
			        + "/" + CRX.Util.getWorkspace() 
			        + "/" + CRX.ide.JCR_ROOT_NAME;
		},
		
		getJcrVersion: function() {
			return connectionData.jcrVersion;
		},
		
		getContextPath: function() {
			return connectionData.contextPath;
		},

		getUserID: function() {
			return connectionData.userID;
		},
		
		getFileExtension: function(name) {
			name = name.replace(/^\s|\s$/g, ""); //trims string

			if (/\.\w+$/.test(name)) {
				if (name.match(/([^\/\\]+)\.(\w+)$/)) {
					return RegExp.$2;
				} 
			}
		},
		
		getDateAsISO8601: function(date) {
			return date.format("Y-m-d") + "T" + date.format("H:i:s.uP");
		},

		isFormatISO8601: function(date) {
			return Date.parseDate(date,"Y-m-dTH:i:s.uP") != undefined;
		},
		
		getErrorMsgFromXML: function(response) {
			var msgs, xmlDoc = response.responseXML;
			
			if (xmlDoc) {
				if (Ext.isGecko) {
					msgs = xmlDoc.getElementsByTagName("dcr:message");
					return msgs[0].textContent;
				} else {
					msgs = xmlDoc.getElementsByTagName("message");
					return msgs.item(0).textContent;
				}
			} else {
				return "Unknown error (Error Code: " + response.status + ")";
			}
		},
		
		openActionDialog: function() {
			var dialogId;
			var loadSelection;
			if (this.baseAction) {
				dialogId = this.baseAction.initialConfig.dialogId;
				loadSelection = this.baseAction.initialConfig.loadSelection;
			} else {
				dialogId = this.initialConfig.dialogId;
				loadSelection = this.initialConfig.loadSelection;
			}
			var tree = Ext.getCmp(CRX.ide.TREE_ID);
	    	var node = tree.getSelectionModel().getSelectedNode();
	    	if (node) {
				var dlg = CRX.Util.getDialog(dialogId);
				dlg.init(node);
				
				if (Ext.isFunction(dlg.reset)) {
					dlg.reset();
				}
				
				if (loadSelection) {
					var cb = function() {
						dlg.show();
					};
					if (!node.isLoaded()) {
						node.reload(cb);
					} else {
						cb.call();
					}
				} else {
					dlg.show();
				}
			}
		},
		
		validateNodeName: function(value) {
			var valid = true;
			
			var tree = Ext.getCmp(CRX.ide.TREE_ID);
			var selection = tree.getSelectionModel().getSelectedNode();
        	if (selection) {
				var node = selection.findChild("name", value);
				if (node) {
					if (CRX.State.isDeleted(node.getRealPath())) {
						valid = "A locally deleted node with the same name was detected. "
							+"Please save changes in order to create a new node with this name.";
					} else {
						valid = "A node with this name already exist";
					}
				}
			}
			return valid;
			
			// TODO validate name against child node definitions
		},
		
		createNode: function(name, text, type, parent, loader, atts, data) {
			var attr = loader.processAttributes({
				name:encodeURIComponent(name), text:text,
				primaryType:type
			}, type);
			
			var node = loader.createNode(attr);
			if (node) {
				parent.appendChild(node);

				var propDefs = CRX.NodetypeRegistry.getPropertyDefinitions([ 
					node.getPrimaryType() 
				]);

				if (!atts) {
					atts = {};
				}
				atts[CRX.util.JCR_PRIMARY_TYPE] = type;
				atts[":" + CRX.util.JCR_PRIMARY_TYPE] = CRX.util.NAME;

				var records = loader.createPropertyRecords(atts, propDefs);
				records.each(function(record) {
					if (record.get("name") == CRX.util.JCR_DATA) {
						record.set("type", CRX.util.BINARY);
						if (data) {
							record.set("value", data);
						}
					}
					record.markDirty(); // ugly hack to deal with property grid
				});
				node.addPropertyRecords(records);
				CRX.State.addTransientNode(node);
			}
			return node;
		},
		
		/**
		 * Recursive variant of Ext.applyIf(). The optional last param "r" is
		 * true/false (go recursive), or number (number of levels to go recursive);
		 * defaults to "true".
		 **/
        applyDefaults: function(o, c, r) {
            // default r to true
            r = (typeof r == "undefined") ? true : r;
            
            if (o && c) {
                for (var p in c) {
                    if (typeof o[p] == "undefined") {
                        o[p] = c[p];
                    } else if (typeof o[p] == "object" && r) {
                        if (typeof r == "number") {
                            r--;
                        }
                        CRX.Util.applyDefaults(o[p], c[p], r);
                    }
                }
            }
            return o;
        },
        
        /**
         * Requests the specified URL from the server using GET. The request
         * will be synchronous, unless a callback function is specified.
         * @static
         * @param {String} url The URL to request
         * @param {Function} callback (optional) The callback function which is
         *        called regardless of success or failure and is passed the following
         *        parameters:<ul>
         *        <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li>
         *        <li><b>success</b> : Boolean<div class="sub-desc">True if the request succeeded.</div></li>
         *        <li><b>response</b> : Object<div class="sub-desc">The response object.</div></li>
         *        </ul>
         * @return {Mixed} The response object or, if the
         *         request is asynchronous, the transaction ID
         */
        httpGet: function(url, callback) {
            if (callback != undefined) {
                return Ext.Ajax.request({
                    url: url,
                    callback: callback
                });
            } else {
                var request = document.all ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
                try {
                    request.open("GET", url, false);
                    request.send(null);
                    return {
                        status: request.status,
                        body: request.responseText
                    };
                } catch (e) {
                    return null;
                }
            }
        },
        
        /**
         * Pre-caches file contents for {@link #loadFile()}.
         *
         * @param {String} path URL path to the file (without CRX.Util.getContentPath())
         * @param {String} content file contents to cache
         */
        storeFile: function(path, content) {
            fileMap[path] = content;
        },
        
        /**
         * Loads a server side file via Ajax and caches its contents internally.
         * To pre-populate the cache, for example in a single production js file,
         * {@link #storeFile()} can be used.
         *
         * @param {String} path URL path to the file (without CRX.Util.getContentPath(),
         *                      but with leading slash)
         * @param {Boolean} noCaching (optional) if true, the file will be fetched and not
         *                  cached; if it was pre-cached via {@link #storeFile()}
         *                  it will be removed from the cache. Useful for larger
         *                  files that are used one time only
         *
         * @return {String} the file contents or null if not found
         */
        loadFile: function(path, noCaching) {
    		if (fileMap[path] === undefined) {
    		    var response = CRX.Util.httpGet( CRX.Util.getContextPath() + path );
    		    if (response !== null && response.status == 200) {
    		        if (noCaching) {
    		            return response.body;
    		        }
    		        fileMap[path] = response.body;
    		        return fileMap[path];
    		    }
    		    return null;
    		} else {
    		    var content = fileMap[path];
    		    if (noCaching) {
    		        delete fileMap[path];
    		    }
    			return content;
    		}
    	},

        logout: function() {
            Ext.Ajax.request({
                url:CRX.Util.getContextPath() + "/de/logout.jsp",
                params: {
                },
                success:function(response, options) {
                    CRX.Util.setAuthHeader("");
                    CRX.Util.reinit();
                },
                failure:function(response, options) {
                }
            });
            return false;
        },

        isLoggedIn: function() {
            return connectionData && connectionData.userID && connectionData.userID != "anonymous";
        },

        getAuthHeader: function() {
            if (lastAuthHeader) {
                return lastAuthHeader;
            } else {
                if (window.name.indexOf("Basic ") == 0) {
                    return window.name;
                } else {
                    return null;
                }
            }
        },

        setAuthHeader: function(hdr) {
            window.name = lastAuthHeader = hdr;
        },


        login: function(username, password, workspace, opts) {
            Ext.Ajax.request({
                url:CRX.Util.getContextPath() + "/de/login.jsp",
                params: {
                    UserId: username,
                    Password: password,
                    Workspace: workspace,
                    _charset_: "utf-8",
                    ".token": ""
                },
                success:function(response, options) {
                    // TODO: check response if token-auth is supported.
                    var tokenLoginSupported = !!CRX.Util.getCookie("login-token");
                    if (!tokenLoginSupported) {
                        // store auth header
                        CRX.Util.setAuthHeader("Basic " + CRX.Util.base64Encode(username + ":" + password));
                        CRX.Util.setCookie("login-workspace", workspace, CRX.Util.getContextPath());
                    }
                    if (opts.success) {
                        opts.success(response, options);
                    }
                    CRX.Util.reinit();
                },
                failure:function(response, options) {
                    if (opts.failure) {
                        opts.failure(response, options);
                    }
                }
            });
            return false;
    	},

    	/**
    	 * Utility for updating a panel body's contents regardless whether the panel
    	 * is already rendered (ie. the body el is present) or not (ie. if called
    	 * right after the constructor).
    	 */
    	updatePanel: function(panel, html) {
    	    if (panel.body) {
    	        panel.body.update(html);
    	    } else {
    	        panel.html = html;
    	    }
    	},
    	
    	/**
    	 * Rendering bug utility that will re-set the current height of the
    	 * Ext element or component passed.
    	 */
    	updateHeight: function(el) {
    	    var h = el.getHeight();
    	    el.setHeight(h + 1);
    	    el.setHeight(h);
    	},

    	/**
    	 * Rendering bug utility that will re-set the current width of the
    	 * Ext element or component passed.
    	 */
    	updateWidth: function(el) {
    	    var w = el.getWidth();
    	    el.setWidth(w + 1);
    	    el.setWidth(w);
    	}
    };
}();


CRX.util.Mimetypes = function() {
    var mimetypes = {
		"css":"text/css",
		"html":"text/html",
		"js":"text/javascript",
		"ecma":"text/javascript",
		"txt":"text/plain",
		"xml":"text/xml",
		"json":"application/json",
		"java":"text/plain",
		"bnd":"text/plain",
		"esp":"text/plain",
		"jsp":"text/plain",
		"bmp":"image/bmp",
		"bmp":"image/bmp",
		"gif":"image/gif",
		"bmp":"image/bmp",
		"jpg":"image/jpeg",
		"jpeg":"image/jpeg",
		"bmp":"image/bmp",
		"png":"image/png",
		"tif":"image/tiff",
		"tiff":"image/tiff"
	};
    
    return {
        getMimetype: function(name) {
			var ext = CRX.Util.getFileExtension(name);
			if (mimetypes[ext]) {
				return mimetypes[ext];
			} else {
				return "application/octet-stream";
			}
		}
}; 

Maven - maven 과 eclipse WTP 연동하기

분류없음 | 2011/10/13 10:39
Posted by 애바른



출처: http://javastore.tistory.com/111

분들이 자바 웹 프로젝트를 진행할때 이클립스 IDE를 사용합니다. 물론 저도 그렇구요. 이클립스는 WTP라는 아주 훌륭한 플랫폼이 있어서 웹개발시에 작업하고 서버에 deploy하지 않고도 이클립스상에서 서버를 껐다 키고, 서버의 임시 deploy 디렉토리에 배포하여 빠르게 개발할수 있습니다.

하지만 Maven을 통해 프로젝트를 생성하면 바로 WTP를 사용할 수가 없습니다. 인터넷에 검색해보면 여러가지 적용방법이 있는데 그중 가장 간단한 방법인 이클립스의 m2eclipse plugin과 m2eclipse Extras plugin을 통해서 간단하게 WTP용 Maven 프로젝트를 생성해 보겠습니다.

전체적으로 3단계로 나눌수 있겠는데요.
첫째. 이클립스 플러그인인 m2eclipse 를 설치한다. 
(maven이 설치 되었다는 가정하에 진행하겠습니다.)
둘째. 이클립스 플러그인인 m2eclipse Extras 를 설치한다.
셋째. maven 프로젝트를 생성한다.

이정도 쯤으로 간단하게 WTP와 maven을 연동할수 있습니다.

그럼 지금부터 시작해 보도록 하겠습니다.

1. m2eclipse 플러그인을 설치합니다.
Help >> Install New Software >> Add버튼을 누르고 다음 url을 입력해 줍니다.
http://m2eclipse.sonatype.org/sites/m2e


위와 같이 Maven Integration for Eclipse를 선택하시고 Next >> Next >> I accept the terms of the license argreement 선택하시고 Finish 누르시면 설치가 시작됩니다.

2. m2eclipse Extras 플러그인을 설치합니다. 위와같이 Help >> Install New Software >> Add버튼을 누르고 다음 url을 입력해 줍니다.
http://m2eclipse.sonatype.org/sites/m2e-extras

위와 같이 Maven Integration for Eclipse Extras와 Maven Integration for Eclipse WTP를 선택하시고 설치하시면 됩니다.

위의 4개를 보두 선택하셔도 상관없지만 좀더 빠른 설치를 위해서 필요한것만 설치했습니다.

3. Maven Project를 생성합니다.
File >> New >> Other >> Maven >> Maven Project 를 선택합니다.
Use default Workspace location 을 선택하고 Next를 눌러줍니다.


다음 창에서 artifact Id가 maven-archetype-webapp를 선택합니다.

Group Id : 이 프로젝트를 구별하기 위한 일종의 ID입니다. 보통 package 와 똑같이 지정합니다.
Artifact Id : Project 이름입니다.
Package : 프로젝트에서 사용할 package이름입니다.

위와 같이 프로젝트를 생성하면 Dynamic Web Project가 생성됩니다.

지금부터 약간의 설정을 해야합니다.

새로 만들어진 프로젝트를 선택한후 오른쪽 마우스 클릭 >> Properties >> Project Facets를 선택합니다.
이곳에서 바꾸어야 할것은 3가지 입니다.

1. Dynamic Web Module의 버전
2. Dynamic Web Project의 Webroot 위치
3. Java 버전 변경
입니다.

먼저 첫번째를 수정하려면 다음과 같이 진행해야 합니다.
Dynamic Web Module의 체크를 풀어준다 >> Apply 버튼을 누른다 >> Dynamic Web Module을 Version을 알맞게 변경한다.(저는 참고로 2.5로 변경하겠습니다.) >> Dynamic WebModule의 체크를 다시 한다 

두번째 webroot의 위치를 변경하겠습니다.
위사진의 (3번)을 선택한다. >> 다음창에서 Context root는 프로젝트 이름으로(기본적으로 프로젝트 이름이고 바꾸고 싶은것으로 바꾸어도 됩니다. 하지만 전 default로 두겠습니다.) 설정하고 directory는 /src/main/webapp 로 세팅합니다.

이렇게 세팅하면 기존의 Dynamic Web Project의 webroot가 WebContent에서 /src/main/webapp로 변경됩니다.

세번째 Java Version을 변경합니다. 저는 1.6 버전을 사용할 것이기 때문에 1.6으로 선택하고 OK를 누르겠습니다.


이렇게 세팅하고 OK를 눌러 빠져나옵니다. 만약 위와같이 설정한뒤 프로젝트에 에러가 발생하면 아마 거의 대부분은 위에서 설정한 Java버전과 Build Path의 java버전과 맞지 않았을때 에러가 날것입니다. 당연히 Build Path의 자바 버전도 변경해 주면 에러는 없어집니다.

기본적인 설정은 여기 까지입니다. 하지만 메이븐을 많이 사용하신 분들이라면 뭔가 이상함을 느끼실 겁니다.

패키지 이름이 이상합니다..ㅜㅜ

보통 메이븐은 4가지 정도로 분리가 됩니다.
1) src/main/java --> back end를 구성할 java 파일을 작성합니다.
2) src/main/resources --> 프로젝트의 설정파일을 저장합니다.
3) src/test/java --> 테스트를 하기위한 테스트 케이스를 작성합니다.
4) src/test/resources --> 테스트를 하기위한 설정파일을 작성합니다.

이렇게 4가지가 있어야 하는데 지금은 src/main/resources 밖에 없습니다.
그렇다면 직접 만들어 주는 수밖에 없겠네요..

탐색기를 통해 해당 웹프로젝트 디렉토리로 이동합니다.
다음과 같은 디렉토리를 만듭니다.

1) src/main/java
2) src/test 생성후
               /java
              /resources

이런 구조로 만들어 주시면 됩니다.

그리고 이클립스로 돌아오셔서 상단의 Navigator를 선택하시면 다음과 같은 구조를 보실수 있습니다.
(Navigator가 없으시면 Window >> Show View >> Navigator 를 선택하시면 됩니다)

이중에 수정해야 할 파일은 2가지 입니다.
.settings/org.eclipse.wst.common.component

.classpath 파일입니다.

먼저 .settings/org.eclipse.wst.common.component를 열고 다음을 추가합니다.

더보기


빨간 3줄을 추가해 줍니다.

다음으로 .classpath입니다.

더보기


위의 3줄을 추가해주고 그 아래 한줄을 수정해 줍니다.

이로서 maven + WTP의 통합 과정이 끝났습니다. 이제 불편하게 maven package를 만들어서 테스트 서버에 배포할 필요없이 바로 사용할 수 있습니다.

콩까기

분류없음 | 2011/05/31 17:57
Posted by 애바른
 

http://photo.finglr.com/s5/%A4%9B%9C%A2%99/1306544712.3984.jpg

블로그 이미지

애바른

항상웃자

카테고리

분류 전체보기 (91)
사진 (3)
비공개 (0)
업무 (1)
자동차 (6)
개발 (19)
가족 (33)
모바일 (12)