본문 바로가기

분류 전체보기

(31)
파일 업로드를 위한 apache-tomcat 설정 Ckeditor를 사용하는 상황에서 프론트 설정과 백엔드 설정은 제대로 해놨는데 이미지를 업로드 하려고만 하면 에러가 생기는 상황 /apache-tomcat-9.0.65/conf/context.xml 에서 기존 코드 뒤에 allowCasualMultipartParsing="ture" path="/" 추가 후 문제 해결 WEB-INF/web.xml WEB-INF/tomcat-web.xml ${catalina.base}/conf/web.xml
[js/css] 배포 파일 업데이트 시 이미지 캐시 방지 이번에 개발하는 사이트에 이미지가 많이 들어가는데 소스를 수정할 때 마다 캐시를 지워야 하는 불편함이 있어서 수정 css ex) ?v=${nowDate}" /> 아이콘 및 css 추가 스크립트도 같은 형식으로 넣어주면 된다
java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method @Override protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception { String userId = getUserId(session); // 사용자 아이디 추출 Set sessions = userSessions.get(userId); if (sessions != null) { for (WebSocketSession webSocketSession : sessions) { if (!webSocketSession.getId().equals(session.getId())) { webSocketSession.sendMessage(message); } } } } 동시에 소켓을 통해 정보를 송수..
[Tomcat] 심볼릭 링크 가능 설정 심볼릭 링크 가능하게 하는 설정은 server.xml에서 context 파일에서 allowLinking="true" allowLInking="true"를 추가하면 된다.
[Apache-Tomcat] Tomcat Context 경로 설정 conf폴더 내의 server.xml파일에서 내의 에서 파일경로의 변경이 가능 태그 의 name에서 host를 설정 가능하다. 위의 예시의 경우 appBase로 부터 시작하는 상대경로이므로 [Tomcat 설치디렉토리]/webapps가 기본 디렉토리가 된다. 태그 내에 있는 윗줄 태그를 본다면 http://localhost/hello.jsp 를 요청할 경우, http://localhost/firstDoc/hello.jsp 을 출력한다. 두 번째 예시로 http://localhost/hello/hello.jsp 를 요청할 경우, http://localhost/secondDoc/hello.jsp 을 출력한다.
[Linux] 심볼릭 링크 변경하기 심볼릭 링크 변경하는 방법 첫 번째는 링크 삭제 후 재생성 두 번째는 링크는 유지하고 엔드 경로를 바꾸는 것이다. 두 번째에 대한 명령어(옵션) ln -Tfs [새로바꿀경로] [바꿀심볼릭링크] 예를 들면 abc라는 파일이 있고 이 파일의 원래 심볼릭 링크는 /data/bcd 라면 ll 로 확인 했을때 abc -> /data/bcd 라고 되어있을 것이다. 여기서 /data/abc로 경로를 바꾸고 싶으면 ln -Tfs /data/abc abc 이런식으로 변경하면 된다
[CSS] checkbox의 박스 크기 늘리기 방법 1. input[type=checkbox] { -ms-transform: scale(2); /* IE */ -moz-transform: scale(2); /* FF */ -webkit-transform: scale(2); /* Safari and Chrome */ -o-transform: scale(2); /* Opera */ padding: 10px; } ​ 방법 2. input[type="checkbox"]{ width: 30px; /*Desired width*/ height: 30px; /*Desired height*/ cursor: pointer; -webkit-appearance: none; appearance: none; } ​ ​ 방법 3. input[type=checkbox] { zo..
[python] selenium을 이용한 전체 스크린샷 import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains def capture_full_page_screenshot(url, output_path, number): chrome_options = Options() chrome_options.add_argument('--headless') # 브라우저를 화면에 띄우지..