Author Archives: itpsolver

[링크] Spring + WAS 기동시 ContextLoaderListener ClassNotFoundException

By | 5월 16, 2017

Spring + WAS 기동시 ContextLoaderListener ClassNotFoundException   링크에 들어가보면 알겠지만, 요약해 보면… build path 에 당연히 들어가 있어야 할 Maven Dependencies 가 빠져 있던 것이 문제였다. 이유는 … 잘 모르겠지만… (>,.  < ) 그래서, 프로젝트 > properties > Deployment Assembly > Add > Java Build Path Entries > Maven Dependencies 선택 후 Finish. …를 해서… Read More »

[펌글] 라이브러리 다운로드를 위한 npm install 명령시 "Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE" 가 발생할 경우

By | 3월 27, 2017

– 출처: http://stackoverflow.com/questions/17200391/nodejs-unable-to-verify-leaf-signature –   npm 콘솔을 열고 아래 명령을 실행한다.   npm config set strict-ssl false   답변을 단 사람은 이게 정공법이 아니기 때문에 강력추천 하지는 않는다고 하지만… 나야 뭐 잘 되면 장땡이니~ ^ㅁ^           

sftp 전송시 목적지 서버의 디렉토리에 크기가 0 byte 인 파일이 생성될 때

By | 3월 24, 2017

처음에는 어플리케이션 문제가 아닐까 생각하다가, 원래 잘 되던 것을 재배포 한 적이 없기 때문에 아닌 것 같고, 방화벽 정책이 바뀐 것일까 생각하다가, 그렇다면 아예 0 바이트짜리 파일도 생성되지 않을 거라는 생각이 들었다.   그래서 구글링을 해 보다가 disk full check 를 해 보라는 글이 있어서 체크해 보니 available 이 0% ! 즉,  전송 목적지 서버의… Read More »

[링크] 크롬 확장프로그램 (Google Chrome Extensions) 을 오프라인으로 설치하기 (offline install)

By | 3월 15, 2017

https://www.cnet.com/how-to/how-to-install-chrome-extensions-manually/   1)  어떻게든 .crx 파일을 구한다 (-_-; ) 2) .crx 파일을 http://crxextractor.com 에서 zip 으로 변환하여 다운로드 한다. 3) zip 파일의 압축을 특정 폴더에 푼다. 3) 주소창에 chrome://extensions 입력/엔터, 개발자모드 클릭 4) 압축해제된 확장프로그램 로드 클릭 5) 방금 압축해제한 경로 지정하여 설치     – 간혹 압축해제한 경로 내의 _metadata 폴더가 문제가 되어 설치되지 않을… Read More »

[펌글] javascript 를 사용하여 json 을 이쁘게 출력하기 (beautifier, formatter)

By | 3월 2, 2017

– 출처: http://stackoverflow.com/questions/2614862/how-can-i-beautify-json-programmatically –   JSON.stringify(jsObj, null, “\t”); // stringify with tabs inserted at each level JSON.stringify(jsObj, null, 4); // stringify with 4 spaces at each level   JSON.stringify(jsObj, null, 4);          => 요거 쓰니 괜찮더라 ^ㅁ^    

크롬(chrome)에서 cross domain ajax 요청을 보냈을 때, 크로스도메인 요청 제한 ("No 'Access-Control-Allow-Origin' header is present …") 을 걸지 않도록 하는 크롬 설정

By | 3월 2, 2017

내가 이 내용을 찾아보게 된 계기는, CA Layer 7 Gateway로 ajax 요청을 보냈을 때, 정상 응답일 경우에는 정상적으로 응답을 받을 수 있으나, 에러일 경우에는 No ‘Access-Control-Allow-Origin’ header is present … 메시지와 함께 response 내용을 전혀 볼 수 없는 상황을 만났었기 때문이다. 이 방법은 로컬 크롬에 대한 환경설정이기 때문에, 서비스로 제공할 수는 없고(그러려면 CORS설정을…) 로컬에서 테스트용으로 크로스도메인… Read More »

[펌글] javascript window.open() 으로 팝업 호출시 팝업이 화면의 중앙에 뜨도록(screen center align) 하는 방법 (듀얼모니터 고려)

By | 2월 28, 2017

아직 완전히 검증한 것은 아니고 그냥 코드만 퍼 옴. – 출처: http://stackoverflow.com/questions/4068373/center-a-popup-window-on-screen –    function PopupCenter(url, title, w, h) { // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ?… Read More »

[펌글] Spring MVC 사용시 Controller Method 없이 View Jsp를 매핑해 주도록 하는 설정 (mvc:view-controller)

By | 2월 28, 2017

– 출처: http://kdarkdev.tistory.com/105 –   별도의 모델이나 컨트롤러가 없이 URL요청이 왔을때 뷰로 연결만 해주는 경우는 굳이 컨트롤러가 필요없이 <mvc:view-controller>태그를 사용하면 URL과  뷰를 매핑해 줄 수 있습니다. 아래의 태그는 /common/gg 라는 URL을  요청 받았을때 gg라는 뷰 이름을 리턴 받게 됩니다 만약 InternalResourceViewResolver 에서 prefix/suffix가 각각 /WEB-INF/jsp/ 와 .jsp 라고 가정 한다면 결과적으로 /WEB-INF/jsp/gg.jsp 라는 jsp view를 찾게 됩니다.   <mvc:view-controller path=”/common/gg”… Read More »

[Android] Android Studio에서 JUnit 테스트를 할 때 Logcat을 사용할 수 있도록 하는 설정 (powermock 설정 관련)

By | 1월 18, 2021

원래는 JUnit 같은 거 잘 안쓰는 스타일인데, 하도 Test 클래스의 main() 실행이 안되길래(클래스를 못 찾는다나 어쩐다나) JUnit으로 방향을 돌려 봤다. 그런데 unit test를 하다 보니, Logcat 을 실행하는 부분에서 에러가 발생해서 진행이 되질 않았다.  구글링을 해 보니 powermock 이란 걸 써야 한다네? 그래서 dependency 들을 찾아서 build path 에 추가해 주는데, 이것도 워낙 라이브러리가 세분화… Read More »

[펌글][Android] SharedPreferences 에 저장한 데이터가, 앱을 삭제해도 지워지지 않는 경우

By | 1월 18, 2021

– 출처: http://stackoverflow.com/questions/41808957/sharedpreferences-not-reset-on-reinstall –      In Android Marshmallow Google introduced the “Auto Backup” feature which is turned on by default if your targetSdkVersion is >=23. This will back up your database and SharedPreferences by default and restore it when you re-install the application. To turn this feature off you have to add android:allowBackup=”false” to your… Read More »

[Android] 세션쿠키 제거하기 (웹뷰의 로그인 정보 제거 등을 위해)

By | 1월 18, 2021

원래 매개변수 없는 removeSessionCookie() 를 사용했었다고 하는데, 비동기 콜백을 인수로 받는 removeSessionCookies(new ValueCallback<Boolean>(){}) 로 변경되었다고 한다. 그래서 짜본 코드가 아래의 것. 안드로이는 생초보라 맞능가 몰겄어~   public void onSessionCookieRemoveClicked(View v) { CookieManager cookieManager = CookieManager.getInstance(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { cookieManager.removeSessionCookies(new ValueCallback<Boolean>() { @Override public void onReceiveValue(Boolean value) { Log.d(“”, “## 롤리팝 이상 버전의 removeSessionCookie() 호출… Read More »

[Android Studio / 개발PC DRM이슈] Rendering Problems Exception raised during rendering: Index: 0, Size: 0 (Details)

By | 1월 18, 2021

Android Studio 에서 android_main.xml 등을 선택하여 layout preview를 볼 때 Rendering Problems   Exception raised during rendering: Index: 0, Size: 0 (Details) 오류가 발생하면서 레이아웃이 표시되지 않는 문제가 있었다.    구글링을 해 봐도, API버전을 바꿔보라는 말 정도 밖에 나와있지 않았고,  IndexOutOfBoundsException 이 발생하는 문제는 한 건도 검색되지 않았다.   그런데 Android Studio 를 재설치하면 문제가… Read More »

Android SDK Manager 에서 sdk 콤포넌트들을 다운로드 받을 때 peer not authenticated 오류가 발생할 경우

By | 1월 18, 2021

정확한 해결방법인지는 모르겠지만, 일단 이 방법을 써서 통과함.   프로젝트 루트(ex: MyApplication) > build.gradle 파일을 열어서 jcenter() 라고 되어 있는 부분을 jcenter{ url “http://jcenter.bintray.com/” }  로 수정한 후 다시 실행하니 성공하였다.   이거 되는 줄 알았는데 아니었네… ㅠㅠ..