본문 바로가기
반응형

java26

Unicode String escape unescape 아파치 common-text 라이브러리를 이용하여 유니코드를 String으로 String을 유니코드로 변환이 가능하다. mvnrepository.com/artifact/org.apache.commons/commons-text/1.9 import org.apache.commons.text.StringEscapeUtils String unicodeToString = StringEscapeUtils.unescapeJava("unicode to String \\uC790\\uBC14"); assertThat(unicodeToString , equalTo("unicode to String 자바") ); String stringToUnicode = StringEscapeUtils.escapeJava("unicode.. 2020. 12. 7.
톰캣 jsp 빈줄 제거 예상 class="trim true" 출력 값 예상 class="trim true" JSP에서 스크립틀릿을 사용하게 되면 빈줄이 생성된다. 톰캣 설정을 통해서 빈줄을 제거 할 수 있다. 참고 : tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration - trimSpaces - Should template text that consists entirely of whitespace be removed? true or false, default false. 첫번째 web.xml으로 적용 conf/web.xml 에서 org.apache.jasper.servlet.JspServlet 에 대한 부분을 수정한다. conf/web.xml .. 2020. 11. 25.
redirect http to https (response.sendRedirect) 현재 서버는 NGINX + TOMCAT 으로 Rervers Proxy로 구성되어져 있고, NGINX 또는 L7에서 인증서를 관리하고 있으며 NGINX는 TOMCAT과 80포트로 통신하도록 되어 있다. NGINX or L7 TOMCAT 443 포트 80포트 웹 브라우저를 통해서 유저가 로그인을 하고 로그인이 된 후에 https://example.com/aa/bb 로 redirect한다고 하면 로그인이 완료되는 시점에 response.sendRedirect("aa/bb")를 호출하는데 위와 같은 환경에서는 http://example.com/aa/bb 로 redirect 된다. 톰캣은 80포트로 통신하고 있기 때문에 https가 아닌 http로 redirectUrl이 결정된다. Tomcat Response.j.. 2020. 11. 25.
logback 설정 정보 확인하기 http://logback.qos.ch/manual/introduction.html Chapter 1: Introduction Chapter 1: Introduction The morale effects are startling. Enthusiasm jumps when there is a running system, even a simple one. Efforts redouble when the first picture from a new graphics software system appears on the screen, even if it is only a rectangle. logback.qos.ch public class HelloWorld2 { public static void main(Stri.. 2020. 6. 10.
반응형