yjhyjh5369의 등록된 링크

키자드에 등록된 총 966개의 포스트를 확인하실 수 있습니다.

Naver Blog

postgresql 외부 접속

1. postgresql.conf listen_address='*' 2. pg_hba.conf host all all 0.0.0.0/0 password 위와 같이 수정했는데 접속이 되지 않는 경우는 # iptables -A INPUT -p tcp --dport 5432 -j ACCEPT 위의 명령어를 실행 한 후 postgres restart

Naver Blog

tomcat native 연동

1. jdk 설치 ( 절대! openjdk가 설치 되어있으면 안된다.) 2. tomcat 설치 (다운받아서 압축 해제) 3. native library 생성 3.1 빌드 3.1.1 압축해제 - # cd [tomcat 경로]/bin - # tar -zxvf tomcat-native[버전].tar.gz - cd tomcat-native-버전-src/jni/native 3.2 dependency package 설치 - # yum -y install openssl-devel apr-devel 3.3 Native Library Build - # ./configure --with-apr=/usr/bin --with-ssl=/usr/include/openssl - # make && make install 3.2 Native Library 시스템 등록 - # echo "/usr/local/apr/lib" > /etc/ld.so.conf.d/tomcat-native - # ldconfig - # l

Naver Blog

tomcat port 추가 [project는 80포트, 배포 페이지는 8080포트]

conf 폴더 안에 server.xml을 수정해 줘야 한다. 파일을 열어서 </Service> 밑에 아래 내용을 추가 1 <Service name="test1"> 2 <Connector executor="tomcatThreadPool" URIEncoding="UTF-8" port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8444" /> 3 <Connector port="8091" protocol="AJP/1.3" redirectPort="8444" /> 4 <Engine name="test1" defaultHost="localhost"> 5 <Host name="192.168.2.54" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 6 <Context path="" docB

Naver Blog

tomcat favicon 설정

1. favicon 만들기 - IE에서는 반드시 ico인 이미지. 그 중에서도 특정 ico 포멧에서만 제대로 동작한다. - 따라서 만든 ico가 제대로 적용되지 않을 경우 다른 방법으로 새로 만들 것 - 적용 성공한 site : http://favicon-generator.org/ 2. 적용 - catalina_home(tomcat/webapps/ROOT/)의 favicon.ico를 원하는 이미지로 교체 - port를 추가해서 만든 경우 해당 port의 ROOT에도 favicon.ico 추가 3. 확인 방법 - chrome의 경우에는 브라우저 캐시를 삭제 한 후 브라우저를 종료하고 다시 접속하면 적용된 것을 확인할 수 있다. (이렇게 하지 않으면 이전 favicon이 화면에 보인다.) - IE의 경우는 아직 모르겠음

Naver Blog

jqgrid에서 임의의 버튼에 jqgrid event 사용

$(”#myTable”).jqGrid('editGridRow', “new”, { … useDataProxy: true …});

Naver Blog

주소표시줄에 하위 주소(sub address, 파일 경로) 숨기기, 상태 표시줄의 내용 숨기기

1. 하위 주소 숨기기 <frameset cols="0,100%" border="0"> <frame/> <frame src="login.jsp"/> <noframes></noframes> </frameset> 2. 상태표시줄의 내용 숨기기 <script> var boodschap = 'aaaaa'; function dgstatus() { window.status = boodschap; timerID= setTimeout("dgstatus()", 30); } dgstatus(); </script>

Naver Blog

window 7 관리자 권한 물어보지 않게 하기

1. Windows 7 을 기존에 설치하듯이 설치 후 마지막 "사용자 이름 넣기" 에서 Shift + F10 을 눌러 DOS 창 활성화 2. 활성화 된 창에서 taskmgr.exe 를 실행하여 작업관리자 실행 3. msoobe 를 찾아서 종료 4. Windows 로그인 화면에서 재시작 5. 안전 모드로 부팅(F8) 6. 안전모드 부팅 후 시작 - 실행 - compmgmt.msc 7. 로컬 사용자 및 그룹 - 사용자 - Administrator 더블 클릭 8. 계정 사용 안함을 체크 해제한 후 재부팅

Naver Blog

jquery plugin

1. plugin 개발 시 지켜야 할 사항 1.1 다른 라이브러리에서 $를 사용할 수 있기 대문에 $ 대신 jQuery를 사용 1.2 만약 $를 사용하고 싶다면 아래와 같이 plugin 정의 ex) (function($){ // defined plugin $.fn.plugin_name = function(param){ // Our plugin implementation code goes here. }; })(jQuery); 1.3 plugin 이름을 겹치지 않는 이름으로 정한다. 1.4 파일명은 반드시 jquery.[plugin_name].js로 하도록 한다. 1.5 한가지 기능에 하나의 이름으로 plugin을 개발한다. 1.6 옵션을 받아서 plugin을 컨트롤 할 수 있도록 한다. ex) // defined plugin $.fn.plugin_name = function(option){ var defaultOption = { width: 150, height: 20 }; // 빈

Naver Blog

웹 개발을 위한 대규모 서비스를 운용하는 기술

1. 소규모 서비스와 대규모 서비스의 차이 1.1 확장성 확보, 부하분산 필요 대량의 액세스가 있는 서비스에서는 서버 1대로 처리할 수 없는 부하를 어떻게 처리할 것인지가 가장 큰 문제다. 최근 10년 동안의 트렌드로는 '스케일아웃(scale-out)'이 이 문제에 대한 전략의 기초가 된다. 스케일 아웃은 서버의 역할을 분담하거나 대수를 늘림으로써 시스템의 전반적인 처리 능력을 높여서 부하를 분산하는 방법이다. 다만, 스케일 아웃 전략을 사용한 경우에는 비용이 절감되는 반면에 다양한 문제가 발생한다. 1.1.1 스케일아웃으로 인해 발생하는 문제(고려해야 할 사항) - 사용자로부터의 요청을 어떻게 분배할 것인가? - 데이터 동기화는 어떻게 할 것인가? - 네트워크 통신의 지연시간을 어떻게 생각해볼 수 있을까? 1.2 다중성 확보. 즉, 특정 버서가 고장 나거나 성능이 저하되더라도 서비스를 계속 할 수 있는 구성 2. 대규모 데이터 처리의 어려운 점 2.1 메모리 내에서 계산할 수 없다

Naver Blog

jquery ui class

ui-state-default default ui-state-hover mouse hover ui-state-focus 초점이 맞춰진 상태 ui-state-active 활성화 상태 ui-state-highlight 강조 표시 ui-state-error 에러 ui-state-error-text 글자만 에러 표시 ui-state-disabled 사용할 수 없는 상태 ui-helper-hidden 보이지 않게 만듦(display 속성 조작) ui-helper-hidden-accessible 보이지 않게 만듦(clip 속성 조작) ui-helper-reset 스타일 초기화 (margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none, font-size: 100%; list-style: none;) ui-helper-clearfix float 속성을 적용한 객체를 감싸는 객체에 사용 ui-helpe

Naver Blog

웹 페이지 성능 향상

1. Avoid CSS expressions - CSS expression을 사용하지 않는다. 2. make fewer HTTP requests - HTTP request를 최소화 하라. - image background 처리 - 같은 크기의 이미지는 하나의 이미지로 합쳐서 background 속성을 이용하여 잘라서 표현 - css와 js는 각각 하나의 파일로 합칠 것 3. Use a Content Delivery Network - css파일이나 js 파일 및 이미지 파일들이 CDN에 존재하지 않는다는 것이다. - CDN - http://cusee.net/2460488 - 내 서버에 있는 컨텐츠에 접근하기 위해 사용자들이 request를 보낼 경우, 내 서버까지 도달하기 전 각 ISP나 IX 부분에서 병목 현상으로 느려질 수 있기 때문에, 각 중단 ISP 지점에 내 컨텐츠들을 copy하여 사용자들이 더 빨리 접속하여 컨텐츠 정보를 획득하도록 도와주는 형태 4. Add Expires

Naver Blog

DIV 안의 객체를 세로 가운데 정렬

<div style="width: 100px; height: 100px; display: table-cell; vertical-align: middle;"> <input type="checkbox" id="aaa" name="aaa"/> </div> display: table-cell 속성은 div를 td 처럼 쓸 수 있게 해 주는 css이다. 이어서 vertical-align: middle을 써주면 가운데로 간다.

Naver Blog

tomcat gzip(compress) 압축

server.xml의 connector에 compression="on" compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css,application/javascript" 를 추가하면 된다는데 난 html, jsp만 압축된다. ㅠㅠ

Naver Blog

postgresql에서 index 관련하여 테스트 결과

1. 단일 column이 index가 걸려 있을 경우 - index1 : customer_id (pk) - index2 : customer_name - index3 : customer_mail 1.2 검색조건이 기본키가 포함되어 있으면 무조건 기본키 index를 탄다. 1.3 index는 무조건 가장 마지막에 등록된 index 하나만 탄다. ex) select * from customer where customer_name = '가나' and customer_mail = '[email protected]' select * from customer where customer_mail = '[email protected]' and customer_name = '가나' 위 2개의 query문은 customer_name과 customer_mail 두개의 index를 모두 타는게 아니라 둘 중 나중에 등록된 customer_mail column에 대해 index를 탄다. 1.4 단순 join으로는 index를 타지

Naver Blog

postgresql vaccum(청소)

-이름 VACUUM 쓰레기 수집기 / 선택적으로 데이터베이스 분석하기 -개요 VACUUM [FULL] [FREEZE] [VERBOSE] [ table] VACUUM [FULL] [FREEZE] [VERBOSE] ANALYZE [ table [ (column [, ...] ) ] ] -설명 VACUUM 은 삭제된 tuple들이 차지하고 있는 공간을 반환합니다. 보통의 PostgreSQL 작업에서 삭제되거나 update에 의해 쓸모 없어진 tuple들은 테이블에서 물리적으로는 삭제되지 않고 VACUUM이 실행될 때까지 남아있습니다. 그러므로 VACUUM은 주기적으로 실행되어야 하며, 자주 업데이트 되는 테이블들의 경우는 더 그렇습니다. 매개변수 없이 VACUUM을 실행하면, 현재 데이터베이스의 모든 테이블에 대해서 실행합니다. 그리고 table을 매개변수로 지정하면 해당 테이블에 대해서만 실행됩니다. VACUUM ANALYZE 는 먼저 VACUUM하고, 그 테이블을 ANALYZE합니다.

Naver Blog

[C/C++] rand() % M 사용하지 말라!!

출처 : http://rockdrumy.tistory.com/540 영어 원문 : http://members.cox.net/srice1/random/crandom.html ANSI C에서는 rand()는 0과 RAND_MAX 범위 안의 정수를 무작위로 발생 시키는데 RAND_MAX값은 stdlib.h에 정의되어 있고 일반적으로 최소 32767 이상이다. 주목 할 것은 32767 이라는 수가 큰 수가 아니라는 점이다. 만약 RAND_MAX가 32767 이라면 시퀀스가 시작되어 난수성을 상실할 때까지 20000개의 난수 정수를 얻을 수 있을 것이다. RAND_MAX는 더 커져야 한다. 당신을 위해서라도 RAND_MAX 값을 확인해보자. 경험상 난수성을 상실 할 때까지 RAND_MAX의 2/3 정도의 숫자만 발생 할 수 있을 것이다. 안전을 위해서 나는 RAND_MAX의 1 / 10 보다 작은 난수 값을 만들 것을 추천한다. 만약 RAND_MAX의 1 / 10 이상보다 더 큰 수를 필요로

Naver Blog

Using libconfig in Visual Studio 2008 ( Visual Studio 2008에서 config 파일 읽기 라이브러리 사용방법)

원문 : http://www.japary.com/forum/index.php?topic=56.0 Before starting with libconfig, it is supposed that you have already got Visual Studio 2008 installed. Using libconfig as a dynamic library By default the Visual C++ solution of libconfig is configured to build a dynamic library for use. Step 1 – Install and compile libconfig 1. Download the libconfig. 2. Uncompress the downloaded file. I choose to uncompress it to C:\libconfig-1.4.5. However, you can choose a different path if you want. 3. O

Naver Blog

visual studio 2008에서 boost 설치

http://www.boostpro.com/download/ 에 접속해서 1.47.0 ver. 를 다운받는다. (그 이상 버전은 visual studio 2008과 호환이 되지 않는다.)

Naver Blog

c/c++ header 파일 중복 include 에러(error) 방지 - #ifndef 사용

1. test.h int num = 0; 2. calc.h #include "test.h" ... (생략) 3. calc.c #include test.h #include calc.h ...(생략) -------------------- 위와 같은 형태로 되어있을 경우 int num = 0; 이 두번 선언이 되기 때문에 재정의 에러가 발생한다. 이것을 방지 하고자 할 경우에는 1. test.h #ifndef __test_h__ #define __test_h__ int num = 0; #endif 2. calc.h #ifndef __calc_h__ #define __calc_h__ #include "test.h" ...(생략) #endif 와 같이 header 파일을 수정한다. 1번 기준으로 설명하면, #ifndef는 컴파일 단계에서 __test_h__ 가 선언되어있는지 확인한다. 처음에는 선언되어있지 않기 때문에 "true"로 판단하여 진행하고 바로 다음줄에서 #define __test

Naver Blog

boost::asio udp relay server

출처 : http://reiot.com/2008/03/16/boost-asio-udp-relay-server/ http://boxcatstudio.wordpress.com/2008/03/16/boost-asio-udp-relay-server/ boost::asio udp rely server class udp_relay_server { struct relay_policy { udp::endpoint from_, to_; DWORD delay_; }; struct relay_message { boost::shared_ptr<std::string> message_; udp::endpoint destination_; DWORD expire_clock_; }; enum { MIN_SLEEP_DELAY = 10 }; public: udp_relay_server(boost::asio::io_service& io_service, short port) : socket_(io_service, udp

Naver Blog

java.net.SocketException: Permission denied

1. 원인 - 기본적으로 0 ~ 1023 까지의 port는 시스템에서 사용하는 port이기 때문에 사용하지 못하는데 사용하려 할 경우에 java.net.SocketException: Permission denied가 발생한다. 2. 해결방안 - java.policy 파일에 grant signedBy "paul" { permission java.net.SocketPermission "IP:port", "허용 권한"; }; 를 추가한다. 2.1 IP:port - ip 와 port는 *를 써서 모든 것을 허용할 수 있다. - 예를 들어 port에 "1024-" 라고 입력하면 1024 이후의 모든 포트를 허용할 수 있다. 2.2 허용 권한은 accept,connect, listen,resolve가 있는데 쉼표를 사용하여 "accept, connect"와 같이 줄 수 있다.

Naver Blog

linux에서 c/c++ 함수(function) info (return, param) 확인방법

# man 함수명

Naver Blog

libconfig comfile and install

1. libconfig 파일 다운로드해서 압축 해제 후에 2. # ./configure --prefix=/usr --libdir=/usr/lib64 --build=x86_64-linux --target=x86_64-linux 3. # make && make install 4. 환경변수 설정 4.1 /root/.bash_profile을 열어서 unset USERNAME LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib64:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH 추가 4.2 # source /root/.bash_profile

Naver Blog

c++ boost install

원본(출처) : http://www.boost.org/doc/libs/1_51_0/more/getting_started/unix-variants.html 의 Easy Build and Install Issue the following commands in the shell (don't type $; that represents the shell's prompt):$ cd path/to/boost_1_51_0 $ ./bootstrap.sh --help Select your configuration options and invoke ./bootstrap.sh again without the --help option. Unless you have write permission in your system's /usr/local/ directory, you'll probably want to at least use$ ./bootstrap.sh --prefix=path/to/installati

Naver Blog

c 현재시간 구하기

time_t lTime; struct tm *today; time(&lTime); // 현재시간 구하기 today = localtime(&lTime); printf("%04d-%02d-%02d %02d:%02d:%02d\n", today->tm_year + 1900, // tm_year는 1900을 더해야 한다. today->tm_mon + 1, // tm_mon은 1월이 0, 2월이 1... 식으로 되어 있기 때문에 +1을 해야 한다. today->tm_mday, today->tm_hour, today->tm_min, today->tm_sec );

Naver Blog

** glibc detected *** ( ... ) double free or corruption : 0x.....

변수를 두번 연속 free / delete / malloc / new / fclose 등의 동작을 했을 경우 나타나는 현상이다. free(buff); buff = NULL; NULL로 항상 초기화 하는 습관을 갖자

Naver Blog

linux tcpdump

# tcpdump -i lo port 7000 - -i 옵션은 interface 설정. 뒤의 lo는 localhost의 의미 - port 옵션은 선택한 port를 대상으로 하는 패킷을 탐지하겠다는 의미 - Flag[R]은 비정상 종료

Naver Blog

linux에서 c 컴파일 유의사항

ifdef 로 debug모드를 정의해서 로그를 찍어 볼 경우, (ex. #ifdef __DEBUG Makefile을 vi로 열어서 CFLAGS = $(INCLUDES) 의 뒤에 -D__DEBUG 와 같이 추가한다.

Naver Blog

centos, redhat (linux) port forwarding(redirect)

iptables -t nat -A PREROUTING -p udp --dport 514 -j REDIRECT --to-port 9514 * iptables 확인 iptables -L -t nat -v * 514로 들어오는 패킷을 9514로 redirect * redirect되서 들어오는 패킷은 tcpdump 9514로 탐지되지 않는다. * iptables save를 하지 않으면 iptables restart되거나 시스템이 reboot되면 초기화 된다.

Naver Blog

How to Fix “An old version of the database format was found” While Starting PostgreSQL

출처 : http://www.ehowstuff.com/how-to-fix-an-old-version-of-the-database-format-was-found-while-starting-postgresql/ 아래와 같은 문제가 발생하면 [root@server ~]# service postgresql start An old version of the database format was found. You need to upgrade the data format before using PostgreSQL. See /usr/share/doc/postgresql-8.4.1/README.rpm-dist for more information. initdb를 다시 하면 된다. 먼저 pgsql/data 안의 파일을 모두 삭제 한 후, [root@server ~]# cd /var/lib/pgsql/data [root@server data]# ls base pg_clog pg_ident.conf pg

Naver Blog

linux 사용자, 사용자 그룹

1. 사용자 정보(home directory 등) /etc/passwd 2. 사용자 정보 변경 및 확인, 그룹 변경 2.1 usermod -g [groupname] [username] - 사용자의 그룹을 변경 2.2 groupmod -n [new_groupname] [old_groupname] - 그룹명 변경 2.3 lid [username] - 사용자가 포함되어있는 그룹명 찾기 2.4 id [username] - 사용자의 id와 그룹 id를 확인

Naver Blog

[linux] rsync 원격백업 설정

출처 : http://blog.daum.net/moon0sool/56 1. 서버 쪽(원본) 1.1 rsync 설치 확인 rpm -qa | grep rsync 1.2 rsync를 xinetd를 이용하여 실행시키기 위해 /etc/xinetd.d/rsync 파일을 수정 vi /etc/xinetd.d/rsync # default: off # description: The rsync server is a good addition to an ftp server, as it \ # allows crc checksumming etc. service rsync { disable = no socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID } 1.3 설정 파일 생성 vi /etc/rsyncd.conf [aporia] -----> 서비스명 path =

Naver Blog

jquery

1. index 선택 : eq(index) 2. 이벤트 강제발생 : trigger(eventName) 3. 현재 또는 미래에 존재하는 객체에 이벤트 연결 : live()

Naver Blog

postgresql initdb failed

OS : centos 6.2 DB : postgresql 8.4 1. 현상 postgresql의 data경로를 바꿔서 설치 할 경우에 # service postgresql initdb 를 실행하면 failed(실패)가 떨어지는데 로그가 남지 않아서 원인을 찾을 수 없는 경우가 발생 2. 해결방법 # su - postgres -c "initdb -D /경로/pgsql/data" 를 실행 하면 initdb가 실행이 되고, 마지막에 ----------------------------------------------------------- 작업완료. 이제 다음 명령을 이용해서 서버를 가동 할 수 있습니다: postgres -D /경로/pgsql/data 또는 pg_ctl -D /경로/pgsql/data -l logfile start ----------------------------------------------------------- 라는 메시지가 발생한다. 이 중, 아래 pg_ctl로

Naver Blog

debian ip config

1. 설정파일 열기 $ vi /etc/network/interfaces 2. IP 설정 2.1 고정 IP 설정 auto eth0 iface eth0 inet static address 192.168.10.50 netmask 255.255.255.0 gateway 192.168.10.1 dns-nameservers 168.126.63.1 2.2 dhcp 설정 auto eth0 iface eth0 inet dhcp 3. nameserver 설정파일 열기 $ vi /etc/resolv.conf 4. nameserver 설정 nameserver 168.126.63.1 nameserver 168.126.63.2 5. network 재시작 $ service networking restart

Naver Blog

debian postfix

1. install # apt-get -y install postfix libsasl2 sasl2-bin libsasl2-modules popa3d dovecot-imapd dovecot-pop3d dovecot-common 2. 도메인 추가 등의 기본 설정 # postconf -e "myorifin = hostway.co.kr" # postconf -e "myhostname = mail.hostway.co.kr" postconf -e "relay_domains = hostway.co.kr" 3. 구동 # postfix reload # /etc/init.d/dovecot restart 4. virtual email 추가 예를 들어 text로 수신되는 메일은 [email protected]로 전송하는 것은 아래와 같다. # postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual" # vi /etc/postfix/virtual t

Naver Blog

debian mirror site 설정

# vi /etc/apt/source.list deb http://ftp.daum.net/debian/ squeeze main non-free contrib deb-src http://ftp.daum.net/debian/ squeeze main non-free contrib

Naver Blog

onmouseover, onmouseout 정리

1. event onmouseover : 마우스 커서가 해당 개체 안에 들어갈 경우 발생하는 이벤트 onmouseout : 마우스 커서가 해당 개체에서 벗어날 경우 발생하는 이벤트 2. 사용방법 2.1 this를 이용한 색상 적용 <input type="button" value="테스트" onmouseover="this.style.backgroundColor='#ff0000'" onmouseout="this.style.backgroundColor='#ffffff'"/> 2.2 this를 이용한 class 적용 <style> .on{ background-color: red; } .off{ background-color: white; } </style> <input type="button" value="테스트" onmouseover="this.className='on'" onmouseout="this.className='off'"/> 2.3 script 사용 <input type="bu

Naver Blog

div tag width 100%

<div></div>과같이 쓰게 되면 default로 height는 0, width는 전체에 영역이 잡힌다. 그래서, 여태까지 style="width: 100%" 와 같다고 생각했는데, 큰 착각이었다. 만약, width를 주지 않고 <div></div>로 사용 했을 경우 margin이나 padding을 주면 margin과 padding영역까지 고려해서 width가 할당되지만 <div style="width: 100%"></div>와 같이 사용하게 되면 margin과 padding을 고려하지 않고 부모의 width 크기 전체로 잡는다. 따라서 <body>의 밑에 <div> 태그가 있을 경우 margin이나 padding을 준다면 (ex. padding: 10px;) 100% + 20px이 되기 때문에 20px만큼 body에 스크롤이 생긴다.

Naver Blog

c언어 core dump

1. 실행파일과 코드를 같은 경로에 둔다. 2. # ulimit -c unlimited (해당 명령어를 입력하면 프로그램 실행 시 core 파일이 떨어진다) 3. 프로그램 실행 4. # gdb [실행파일경로] [코어파일명]

Naver Blog

script 태그의 async와 defer 속성

출처 : http://appletree.or.kr/blog/web-development/javascript/script-%ED%83%9C%EA%B7%B8%EC%9D%98-async%EC%99%80-defer-%EC%86%8D%EC%84%B1/ 기본적으로 웹 브라우저가 외부 자바스크립트를 불러오는 일반 script 태그를 만나게 되면, 우선 해당 스크립트를 내려받아 해석하고 실행(execute)할 때까지 웹 문서의 HTML 코드 parsing 작업을 잠시 뒤로 미룬다. 그래서 용량이 큰 스크립트를 문서 해석 초기에 만나게 되면 해당 페이지를 불러오는 속도마저 지체되는 현상을 일으키게 되어 결국 전체적 성능을 떨어뜨리는 결과를 가져오는데 이런 부작용을 근본적으로 막기 위해 소개된 것이 script 태그의 async와 defer 속성이다. 사용 예 <script async src="myAsyncScript.js" onload="myInit()"></script> <script defer

Naver Blog

2013년 1월 10일 오후 5시 59분에 저장한 글입니다.

출처 & 참고문서 1. http://friendlybit.com/js/lazy-loading-asyncronous-javascript/ 2. http://appletree.or.kr/blog/quotes/%EB%8A%90%EA%B5%BF%ED%95%98%EA%B2%8C-%EB%B9%84%EB%8F%99%EA%B8%B0%EC%8B%9D%EC%9C%BC%EB%A1%9C-javascript%EB%A5%BC-%EC%9B%B9-%EB%AC%B8%EC%84%9C%EC%97%90-%EC%B6%94%EA%B0%80%ED%95%98%EB%8A%94-%EB%B0%A9/ (function() { function async_load(){ var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'http://yourdomain.com/script.js'; var x = document.getEl

Naver Blog

Virtualbox 사설 IP 설정

1. 설정할 이미지 선택 후 [파일 - 환경설정 - 네트워크 - VirtualBox Host-Only Ethernet Adapter]을 더블클릭 2. IP 대역대로 사용할 IP(게이트웨이 주소)입력 ex) 192.168.100.1 3. 설정할 이미지에서 마우스 오른쪽 클릭 후 [설정 - 네트워크] 선택 4. 어댑터1은 NAT, 어댑터2는 호스트 전용 어댑터(Host-Only) 5. 가상 OS에서 IP 변경 ex) Debian 기준으로.. # vi /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.100.100 network 255.255.255.0 6. network restart ex) Debian # /etc/init.d/networking restart

Naver Blog

javascript 상속

function Rectangle(w, h) { var width = w; var height = h; this.getWidth = function() { return width; }; this.getHeight = function() { return height; }; this.setWidth = function(value) { if(value < 0) { throw '길이는 음수일 수 없습니다.'; } else { width = value; } }; this.setHeight = function(value) { if(value < 0) { throw '높이는 음수일 수 없습니다.'; } else { height = value; } }; } Rectangle.prototype.getArea = function() { return this.getWidth() * this.getHeight(); }; function Square(length) { this.base = Rectangle

Naver Blog

ECMAScript 5 객체 속성 추가

ECMAScript 5 객체 속성 추가 - HTML5와 함께 출현한 javascript 표준안을 ECMAScript 5라고 부른다. - ECMAScript 5는 IE 8 이하에서는 지원하지 않는다. 메서드 이름 설명 Object.defineProperty() 객체에 속성을 추가 Object.defineProperties() 객체에 속성을 추가 1. defineProperty(속성을 추가하려는 객체, 속성의 이름, 속성과 관련된 옵션 객체) <script> var aaa = {}; Object.defineProperty(aaa, 'name', { }); </script> 1.1 객체 속성 관련 옵션 옵션이름 설명 value 속성의 값을 의미 writeable 객체의 속성 값을 변경 할 수 있는지를 의미 get getter set setter configurable 속성의 설정을 변경 할 수 있는지를 의미 enumerable for in 반복문으로 검사할 수 있는지를 의미 옵션을 입력하

Naver Blog

ECMAScript 5 객체 생성

ECMAScript 5 객체 생성 - HTML5와 함께 출현한 javascript 표준안을 ECMAScript 5라고 부른다. - ECMAScript 5는 IE 8 이하에서는 지원하지 않는다. - 생성자는 틀은 기반으로 객체를 찍어내 객체를 생성하지만 create는 기존에 있던 객체를 복제하고 새로운 속성을 추가해 객체를 생성한다. method 이름 Object.create() 1. create(원본이 되는 객체, 추가하고자 하는 속성) <script> var aaa = Object.create({}, { name: {value: 'masami', enumerable: true}, gender: {value: 'female', enumerable: true} }); var bbb = Object.create(aaa, { region: {value: 'Seoul', enumerable: true} }); </script> 이렇게 사용하면 bbb에서 name과 gender를 사용할 수

Naver Blog

java Properties를 이용하여 config파일 읽기

1. 클래스 선언 import java.util.*; import java.io.FileInputStream; import java.io.InputStream; public class Config() { public Config() { configFile = new java.util.Properties(); try { // 방법 1 시작 (이 방법은 프로젝트 내부의 파일만 사용할 수 있다.) configFile.load(this.getClass().getClassLoader().getResourceAsStream("config.conf")); // 방법 1 끝 // 방법 2 시작 InputStream in = new FileInputStream("config.conf"); configFile.load(in); in.close(); // 방법 2 끝 } catch(Exception e) { e.printStackTrace(); } } public String getProperty(St

Naver Blog

IE 8, 9 전용 css 핵

height: 23px \0/IE8+9; 와 같이 ;(세미콜론) 앞에 \0/IE8+9 를 쓰면 된다.

Naver Blog

html/css - table 구조에서 열(column)단위로 숨기기

<table> <colgroup> <col width="100"/> <col width="200" style="display: none"/> </colgroup> <tr> <td>첫번째</td> <td>두번째</td> </tr> </table> 위와 같이 쓰게 되면 두번째 열 모두 숨겨진다. * 참고사항 ) IE에 한해서 버전에 따라 display: none이 되는 놈이 있고 visibility: collpase;가 되는 놈이 있는데, 두개 다 쓰면 IE 8을 제외하고는 다 된다고 한다. (아직 테스트 못해봄) IE 8은 visibility: collpase만 적용가능하다고 하는데 테스트 해보고 글 업데이트 필요

Naver Blog

html accesskey (단축키 지정)

<script> function add() { alert("add"); } </script> <body> <a href="javascript: add()" accesskey="n">add</a> </body> accesskey 속성은 마우스 등을 쓰지 않는 환경을 위해 링크나 입력 폼에서 키보드의 키 입력만으로 동작을 실행할 수 있도록 accesskey 속성값에 access 할 영어 또는 숫자 한문자를 지정하여 단축키를 설정한다. accesskey의 실행 방법은 사용자의 OS와 브라우저에 따라 다르다. 특히, 다른 브라우저와는 다르게 IE(인터넷 익스플로러)에서는 <a> 태그에 지정된 accesskey를 실행하면 지정된 링크가 실행되는 것이 아니라, <a> 태그로 포커스가 이동된다. 이때 Enter를 눌러야 지정된 링크가 실행된다. IE(인터넷 익스플로러에서는 예약어(F, E, V, A, T, H)는 사용 할 수 없다. * 브라우저별 accesskey 실행 방법 1. Window I

Naver Blog

문서(body, html, document)에 keydown 이벤트 잡기

<script> document.onkeydown = abcde; function abcde() { if(event.keyCode == 13) { alert("tagName : " + event.srcElement.tagName + "\n" + "id : " + event.srcElement.id + "\n" + "class : " + event.srcElement.className); } } </script> 1. event.keyCode == 13은 Enter 2. event.srcElement.tagName : event를 발생시킨 tagName 3. event.srcElement.id : event를 발생시킨 Element의 ID 4. event.srcElement.className : event를 발생시킨 Event의 class

Naver Blog

IE 8이하 차단

script나 jsp/php 등에서 복잡하게 프로그램을 만들 필요 없이 IE에 경우 간단하게 차단 가능하다. 1. HTML에서 아래 코드 추가 (lteIE8.js 는 임의로 변경하면 됨) <!--[if lte IE 8]><script type="text/javascript" src="lteIE8.js"></script><![endif]--> 2. lteIE8.js에 원하는 script 코드 작성 ex) top.location.href = "/lteIE8.html";

Naver Blog

이클립스(eclipse)에서 외부 프로젝트로 작업하기

1. File - Import - General - Existing Project into Workspace 2. Select root directory에 경로 입력 후(browse) Finish

Naver Blog

javascript clipboard

http://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript

Naver Blog

javascript(자바스크립트) self window close (자기 자신 창 닫기)

window.open('', '_self', ''); window.close();

Naver Blog

javascript function exist(define) check (함수가 존재하는지 체크)

함수명이 getUserId 일 경우 1. 동일 문서 if("undefined" != typeof getUserId) { alert("함수가 존재하지 않습니다."); } 2. iframe, frame으로 나뉘어져 있을 경우 if("undefined" != type parent.document.getElementById("프레임 ID").contentWindow.getUserId) { alert("함수가 존재하지 않습니다."); } 3. 자식 창에서 부모창을 호출 할 경우 if("undefined" != type opener.getUserId) { alert("함수가 존재하지 않습니다."); } 4. 응용 if("undefined" != type opener.parent.document.getElementById("main").contentWindow.getUserId) { alert("함수가 존재하지 않습니다."); }

Naver Blog

javascript json형태로 데이터 전송하기

var data = []; data.push({"name": "홍길동", "phone", "111-1111"}); 와 같이 데이터 배열을 만들고 전송할 때 encodeURIComponent(JSON.stringify(data)); 와 같이 하면 된다.

Naver Blog

PHP json string 형태로 넘어온 데이터 사용하기

$ethx_info = isset($_REQUEST['ethx_info']) ? $_REQUEST['ethx_info'] : ""; $decode = json_decode($ethx_info, true); $field_info = $decode[0]; echo $field_info["ethx"];

Naver Blog

linux dnsdomainname timeout (time delay)

command line에 hostname과 hostname -s를 쳤을 때 다른 결과가 나오면 dnsdomainname 명령어를 쳤을 때 timeout이 걸린다.

Naver Blog

모니터 공유 kvm synergy

http://synergy2.sourceforge.net/ 에서 다운 로드 후.. main computer를 server로 환경설정

Naver Blog

ajax에서 post로 데이터 주고받기

$.ajax에는 type, url, data의 옵션이 있다. type은 데이터 전송 타입. url은 데이터를 보낼 주소 data는 보낼 데이터인데.... type에 post로 셋팅하더라도 1. url 옵션에 www.naver.com?data=younjh라고 보내면 'GET'으로 데이터를 전송한다. 데이터가 GET으로 넘어왔기 때문에 $_REQUEST['data']로 데이터를 받을 수 있으며 이 때 데이터의 길이가 너무 길면 데이터를 받지 못한다. 2. url: 'naver.com', data: 'data=younjh' 라고 보내면 'POST'로 데이터를 전송한다. 이 때는 데이터를 $_POST['data]로 데이터를 받아야 한다. 이 경우 $_REQUEST로 데이터를 받으면 데이터를 받지 못한다. 결론. POST로 데이터를 전송하고 받을때는 type: 'post', url: 'www.naver.com', data: 'data=younjh' 와 같이 옵션을 주고 PHP에서는 $_POS

Naver Blog

javascript 레퍼런스 참조 없는 배열 복사(deep copy)

var aaa = [0, 1, 2, 3, 4, 5]; var bbb = aaa; 하면 레퍼런스 참조로 복사된다. 참조 없는 배열 복사가 필요하면 아래와 같이 한다. var aaa = [0, 1, 2, 3, 4, 5]; var bbb = JSON.parse(JSON.stringify(aaa));;

Naver Blog

mysql 접속제한 해제

1. mysql 접속 - mysql -u root -p - pw 입력 2. DB change - use mysql; 3. 계정정보 조회 - select host, user, password from user; - 출력결과 +-----------+------+-------------------------------------------+ | host | user | password | +-----------+------+-------------------------------------------+ | localhost | root | 보안상 삭제 | | 127.0.0.1 | root | 보안상 삭제 | +-----------+------+-------------------------------------------+ - 위와 같이 local로만 접근이 가능하도록 설정되어 있었습니다. 4. 권한 부여 - grant all privileges on *.* to 'root'@'%' ide

Naver Blog

php extension build 및 사용법

1. g++, make, clean install 2. svn://192.168.0.91/svn/firewall/src/UI/extension 에서 checkout 3. logmanager 폴더를 설치해야 하는 서버로 복사 4. cd /설치경로/logmanager/logmanlib 5. make clean; make 6. make install 7. cd ../phpext 8. phpize 9. CXXFLAGS=-O2 ./configure --enable-fwlogman 10. make clean; make 11. php.ini 설정 변경 - vi /etc/php5/apache2/php.ini - dynamic extension 검색해서 아래쪽에 extension=fwlogman.so 입력 12. /etc/init.d/apache2 restart

Naver Blog

debian rsyslog 설치 및 설정, php에서 사용

1. install - apt-get install rsyslog rsyslog-doc 2. setting - http://nil.uniza.sk/sk/sip/kamailio/kamailio-logging-how-debian-lenny - local0 등을 설정 하고 restart 3. php 사용법 3.1 syslog(LOG_INFO, "apple"); - /var/log/syslog 파일에 로그 기록 3.2 syslog(LOG_INFO | LOG_LOCAL0, "apple"); - /var/log/syslog 파일 및 /var/log/syslog/(local0로 설정한 파일 명) 에 로그 기록 3.3 openlog("치환할 문자", LOG_CONS, LOG_LOCAL0); syslog(LOG_INFO, "apple"); closelog(); - syslog만 쓰면 "Apr 26 16:11:55 debian apache2: apple" 처럼 로그가 남는다. (날짜, hostname

Naver Blog

linux(debian) 임의로 bridge 추가

1. Package: bridge-utils 2. install : apt-get install bridge-utils 3. use : brctl addbr eth10

Naver Blog

html/javascript - enter키를 누르면 click event가 발생하는 문제

출처 : http://stackoverflow.com/questions/905222/enter-key-press-event-in-javascript IE에서 enter를 누르면 form submit이 동작하는데, submit이 불가능한 상황이 되면 현재 페이지의 첫번째에 있는 button의 클릭 이벤트가 발생 하는 것 같다. (어처구니 없는 건 textbox에서 enter를 눌러도 이런다는거...) function runScript(e, id) { if (e.keyCode == 13) { var tb = document.getElementById(id); eval(tb.value); return false; } } 위의 소스로 회피 가능.

Naver Blog

PHP explode - blank(white) space remove

explode 대신 아래와 같이 사용 $line = "aaa bbb ddd"; $cols = preg_split('/\s+/', $line);

Naver Blog

YouTube에서 툴바를 설치하지 않고 동영상 다운로드 하기

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://userscripts.org/scripts/source/25105.user.js'})(); 1. 크롬 실행 2. 아무페이지나 들어가서 즐겨찾기 추가 3. 즐겨찾기 주소를 위의 스크립트 코드로 변경 4. 원하는 YouTube 페이지로 들어가서 즐겨찾기 실행 5. 다운로드 버튼 클릭

Naver Blog

html -> input file 'accept' attribute(file 확장자 추가)

<!-- Match all image files (image/*) --> <input type="file" accept="image/*"> <!-- Match all video files (video/*) --> <input type="file" accept="video/*"> <!-- Match all audio files (audio/*) --> <input type="file" accept="audio/*"> <!-- Match all image files (image/*) and files with the extension ".someext" --> <input type="file" accept=".someext,image/*"> <!-- See note below --> <!-- Match all image files (image/*) and video files (video/*) --> <input type="file" accept="image/*,video/*"> <!-

Naver Blog

javascript object size

출처 : http://stackoverflow.com/questions/5223/length-of-javascript-object-ie-associative-array Object.size = function(obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) size++; } return size; }; // Get the size of an object var size = Object.size(myArray);

Naver Blog

[debian] wkhtmltopdf 설치방법

1. 아래 경로에 접속 후 wkhtmltopdf-0.9.9 static 버전 다운로드 http://www.google.co.kr/url?sa=t&rct=j&q=wkhtmltopdf&source=web&cd=1&ved=0CDUQFjAA&url=http%3A%2F%2Fcode.google.com%2Fp%2Fwkhtmltopdf%2F&ei=PRwSUYCJGKiuiQL-5oDQDA&usg=AFQjCNEb0ynW8pjrkwFO60-rlQ9ZVVbpzg&bvm=bv.41934586,d.cGE&cad=rjt 2. 실제 사용할 경로에 압축 해제 3. 필요한 lib 파일을 /usr/lib에 복사 - libfontconfig.so.1 - libfreetype.so.6 - libX11.so.6 - libXdmcp.so.6

Naver Blog

linux LD_LIBRARY_PATH

라이브러리가 있는 곳을 몇시해 주는 환경변수 라이브러리를 참조할때 기본은 /usr/lib를 참조하지만, /usr/local/lib가 설정되어있다면 /usr/local/lib를 먼저 참조한다. 만약 /usr/local/lib를 찾아봤는데 원하는 파일이 없다면 /usr/lib를 참조한다.

Naver Blog

ajax에서 data를 쓰지 않고 url로 param을 보낼 경우 버그 발

$.ajax({ type : "POST", url : "menu_system/system_setting.php?request=alias_header" }); 이런식으로 url에 param을 추가해서 보낼 경우 특정 브라우저(chrome 28.0.1500.72 m)에서 서버로 param을 제대로 보내주지 못한다. url: "menu_system/system_setting.php", data: "request=alias_header" 처럼 나눠 써야함

Naver Blog

absolute객체 가운데 정렬

div { width: 500px; height: 100px; position: absolute; left: 50%; /* 가로 가운데 정렬 */ margin-left: -250px; /* 가로 가운데 정렬이 왼쪽 끝을 기준으로 되기 때문에 width의 절반만큼 왼쪽으로 이동한다. */ top: 50%; /* 세로 가운데 정렬 */ margin-top: -50px; /* 세로 가운데 정렬이 위쪽 끝을 기준으로 되기 때문에 height의 절반만큼 위쪽으로 이동한다. */ }

Naver Blog

iframe, frame 사용시 페이지 이동할때마다 깜빡임 현상 (메인 배경이 흰색이 아닌데 흰색으로 깜빡임 현상)

배경 색과 관계없이 html을 그릴 때 먼저 흰색배경이 칠해지고 나서 css가 적용되어 다른 색이 칠해지기 때문에 흰색 깜빡임 현상이 발생한다. 따라서 부모와 iframe/frame 배경을 원하는 배경색으로 칠해놓고 iframe/frame안의 html문서의 html 테그의 속성을 visibility: hidden을 해놓고 script에서 visible로 바꾸면 이 현상을 해결할 수 있다.

Naver Blog

resultset null (select 결과가 없을 경우) 처리 방법

if(rs.next()) { do { } while(rs.next()); } else { System.out.println("Empty Batch"); }

Naver Blog

javascript json sort

var people = [ {name: 'a75', item1: false, item2: false}, {name: 'z32', item1: true, item2: false}, {name: 'e77', item1: false, item2: false}]; function sortByKey(array, key) { return array.sort(function(a, b) { var x = a[key]; var y = b[key]; return ((x < y) ? -1 : ((x > y) ? 1 : 0)); }); } people = sortByKey(people, 'name'); 출처 : http://stackoverflow.com/questions/8175093/simple-function-to-sort-a-json-object-using-javascript

Naver Blog

cookie lifetime (expire)

참조 : http://php.net/manual/en/function.setcookie.php 쿠키를 사용 할 때 expire 인자를 사용하지 않으면 기본값이 세션이 유지되는 동안 쿠키유지이다. 따라서, 오랫동안 쿠키를 유지하고 싶을 경우에는 expire 시간을 조절해야 한다. ex) <?php $value = 'something from somewhere'; setcookie("TestCookie", $value); setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */ setcookie("TestCookie", $value, time()+3600, "/~rasmus/", "example.com", 1); ?>

Naver Blog

대륙의 클라우드 (웹 하드)

바이두 2테라. 텐센트 10테라 쿼우 360이 36테라 http://spapa1004.tistory.com/51 http://spapa1004.tistory.com/53 http://sungsoon.tistory.com/notice/330 http://w3tech.tistory.com/187 링크된 네 개의 페이지를 잘 읽어보고 가입하세요. 바이두가 꽉차면 텐센트 10테라! http://spapa1004.tistory.com/49 http://spapa1004.tistory.com/50 이것도 부족하면 궁극의 36테라 쿼우 360이 있습니다. http://spapa1004.tistory.com/83 http://spapa1004.tistory.com/84 쿼우360은 이메일 주소 바꿔서 여러 계정으로 가입 가능

Naver Blog

java hashmap synchronized

java의 hashmap은 기본적으로 not synchronized이기 때문에 multi thread환경에서 잘못된 동작이 발생 할 수 있다. 이것을 예방하기 위한 방법이 있다. Map<Integer, String> workingJob = Collections.synchronizedMap(new HashMap<Integer, String>());

Naver Blog

SVN Repository Dump 및 Load

1. Dump 전체 dump svnadmin dump d:\Repository\Source > mysource.filename.dump 해당 리비전만 dump (리비전 10 만 덤프) svnadmin dump -r 10 d:\Repository\Source > mysource.filename.dump 지정된 범위 리비전 dump (10부터 20까지) svnadmin dump -r 10:20 d:\Repository\Source > mysource.filename.dump 2. Load svnadmin create d:\Repository\myNewSource Load 하기 위해선 신규 Repository를 생성한다. 아래는 그 다음에 작업 리비전 1번부터 사용 svnadmin load d:\Repository\myNewSource < mysource.filename.dump 기존 리비전번호 그대로 사용 svnadmin load --force-uuid d:\Repository\myNe

Naver Blog

java 가변 변수(인자) - Variable Arguments

public static void test(String query, String... strings) { System.out.println(query); for(String str : strings) { System.out.println(str); } }

Naver Blog

linux에서 cpu 1개로 부팅하는 방법 (1개의 코어만 사용)

/data/boot/grub/grub.cfg에서 90번째 라인에 linux /boot/vmlinuz root=/dev/sda1 ro maxcpus=1

Naver Blog

WAS 변경 시 주의사항

eclipse에서 웹 프로젝트를 생성할 때 target runtime이라는 것이 있다. 보통 설치되어있는 WAS가 dafault로 선택되어 들어가는데, 여기서 선택된 것에 따라서 servlet 객체(등)의 사용 주체가 바뀌게 되기 때문에 여기에서 설정된 WAS 서버 이외의 서버에서 프로그램을 동작시키게 되면 에러가 발생한다. 이 경우 프로젝트 우클릭 -> Properties -> targeted Runtimes으로 서버를 변경한다.

Naver Blog

JBAS018014 META-INF/valang.tld 에러

JBAS018014 에러가 발생하여 WEB-INF/lib/spring-modules-validation-0.7.jar 파일 내부의 META-INF/valang.tld파일 내용 중 13 line의 <body-content>None</body-content>을 <body-content>empty</body-content>으로 변경

Naver Blog

2013년 11월 1일 오후 4시 47분에 저장한 글입니다.

출처 : http://vijava.blogspot.kr/2012/12/enableasync-annotation-metadata-was-not.html spring의 설정(dispatcher-servlet)에서 <context:component-scan base-package="*"/> 일 경우 JBoss에서 @EnableAsync annotation metadata was not injected 에러 발생. 해석은 차후 올릴 예정... (ㅠㅠ)

Naver Blog

JSP MultipartRequest 업로드

1. WEB-INF/lib에 cos.jar 추가 2. form 태그에 enctype="multipart/form=data" 속성 추가 3. 받는쪽에 아래와 같이 추가 - import com.oreilly.servlet.* - com.oreilly.servlet.multipart.DefaultFileRenamePolicy 4. request를 받는다. - MultipartRequest multi=new MultipartRequest(request, "저장경로", "파일 크기 제한", new DefaultFileRenamePolicy()); 5. form 태그 값 받는 방법 - String prcm_curr = multi.getParameter("abc"); 6. 파일명 받는 방법 - multi.getFile("태그의 name 속성 값").getName();

Naver Blog

eclipse freemarker code assist

* freemarker api - http://freemarker.sourceforge.net/docs/index.html 1. help - install new software 메뉴로 진입 2. work with에 all available sites 선택 3. freemarker 검색하여 설치 4. window - preferences로 진입 5. File Associations에서 *.ftl에 대해 JSP Editor를 등록 후 Default로 설정 6. Content Types의 JSP를 찾아서 *.ftl을 등록

Naver Blog

ibatis/mybatis - org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) 에러 발생 시

1. 해결방법 JDBC 설정에서 defaultStatementTimeout를 삭제합니다. ex) <setting name="defaultStatementTimeout" value="25000" /> 2. 상세 설명 defaultStatementTimeout 는 모든 JDBC 쿼리에 대한 timeout 시간(초) 지정합니다. 지정하지 않는 경우 timeout 없습니다.(cf. 각 statement 설정에 따라) (각 statement 의 설정으로 override 가능함. 모든 driver가 이 설정을 지원하는 것은 아님에 유의할 것.) 즉, timeout이 발생하여 발생 한 오류입니다.

Naver Blog

spring jquery ajax 406(not acceptable) error

1. spring context xml 파일에 아래와 같이 코드 추가 <bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"></bean> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> <property name="messageConverters"> <list> <ref bean="jacksonMessageConverter"/> </list> </property> </bean> 2. 필요한 jar - jackson-core-asl.x.x.x.jar - jackson-databind-x.x.x.jar - jackson-mapper-asl.x.x.x.jar

Naver Blog

spring ajax

1. jar 파일 추가 - jackson-core-asl.x.x.x.jar - jackson-databind-x.x.x.jar - jackson-mapper-asl.x.x.x.jar 2. spring context에 설정 추가 <bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"></bean> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> <property name="messageConverters"> <list> <ref bean="jacksonMessageConverter"/> </list> </property> </bean> 3. controller @RequestMapping(value="/user/aj

Naver Blog

form submit disable

$('#formid').bind("keyup keypress", function(e) { var code = e.keyCode || e.which; if (code == 13) { e.preventDefault(); return false; } });

Naver Blog

jquery multiple selector

$("#upload_link,#upload_link2,#upload_link3").each(function(){ // todo });

Naver Blog

empty beans.xml

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> </beans>

1 2 3 4 5 6 7 8 9 10