본문 바로가기
728x90

개발/Java6

[Java] XPath Example – XPath Tutorial In this Java XPath tutorial, we will learn what is XPath library, what are XPath data types and learn to create XPath expression syntax to retrieve information from XML file or document. This information can be XML nodes or XML attributes or even comments as well.Table of Contents 1. What is XPath? 2. XPath Data Model 3. XPath Data Types 4. XPath Syntax 5. XPath Expressions 6. Recommended readin.. 2019. 9. 9.
[Java] String to int, int to String 형변환 Strinig to int String from = "123"; int to = Integer.parseInt(from); int to String int from = 123; String to = Integer.toString(from); 2019. 9. 8.
[eclipse] context root 변경 – 서버 돌릴 때 최상위 url(/)에서 실행하기 이클립스에서 프로젝트를 만들고 톰캣에서 테스트할 때 http : //localhost:8080/프로젝트명/ 형태로 돼 있는게 아주 짜증날 거다. 실제로 홈페이지를 붙이면 http: //내도메인.com/ 이니깐. HTML 태그에서 href=”/” 형태를 개발 당시에 사용하지 못하니깐 아주 짜증난다. 붙인 다음에 일일이 수정해줄 수도 없고. 의외로 해결책은 간단했다. 두 가지 방법이 있다. 프로젝트에서 마우스 오른쪽 버튼을 눌러 preference로 들어가서 Web Project Setting 란의 Context Root를 공란으로 만든다. Server 프로젝트에 있는 server.xml의 docBase를 “프로젝트명/”으로, path를 “”으로 만든다. 둘 중 하나의 방법을 사용하면 간단하게 해결 된다. 2019. 7. 21.
[eclipse] 주석 포맷팅 설정 ctrl+shift+/ 범위 주석을 달면 이렇게 된다 코딩을 하지 말라는 건지 들여쓰기가 엉만진창으로 변해 주석 풀면 코드 활용을 할수가 없다 주석 포맷팅이 되어 있어서 그런대 이건 왜 되있는건지 정말 불편한다 주석 포맷팅을 해제해 보자 [Window]->[Preferences]->[Java]->[Code Style]->[Formatter]->[New]->[Comment]->[Edit] Enable block comment formatting 체크 해제 -> Apply and Close 그리고 ctrl+shift+/ 범위 주석을 달면 이렇게 된다 2019. 7. 13.
[eclipse] 주석 풀기 주석풀기: [ctrl] + [shift] + \ 주석감기: [ctrl] + [shift] + / 2019. 7. 9.
[Eclipse] github 저장소 프로젝트 추가 [Window] -> [Show View] -> [Other] [Git] -> [Git Repositories] [Clone a Repository] [Git Url 추가] 2019. 7. 7.
728x90