728x90
반응형
728x90
반응형

 

 

Linux 파일 정보

  • 파일(-), 디렉토리(d)를 구분
  • 사용자/그룹/기타
  • rwx 3자리씩 2진수 > 10진수로 계산한 결과 : 111 > 7     101 > 5

 

 

-rwxr-xr-x  >> 파일 / 사용자권한7 / 그룹권한5 / 기타권한5

읽기 권한(r) : 파일수정 불가, 파일 열기, 복사가능

쓰기 권한(w) : 파일 내용 추가 가능, 읽기 권한 있을시 편집 가능

실행 권한(x)프로그램 파일이나 쉘 스크립트 파일등에 부여

 

 

현재 디렉토리에 존재하는 파일 권한 부여하기

chmod 755 ./[파일이름]

ex) test.sh 파일에 755 권한 부여하기

chmod 755 ./test.sh

728x90
반응형
728x90
반응형

 

 

tar, tar.gz 압축 및 압축해제 방법

  • .tar 압축하기
  • .tar 압축 해제하기
  • .tar.gz 압축하기
  • .tar.gz 압축 해제하기 

 

1) .tar로 압축하기

tar -cvf [파일명.tar] [폴더명]

ex) test라는 폴더를 temp.tar로 압축하기

> tar -cvf temp.tar test

 

 

2) .tar 압축 해제하기

tar -xvf [파일명.tar]

ex) temp.tar라는 tar파일 압축풀기

tar -xvf temp.tar

 

 

3) .tar.gz로 압축하기

tar -cvfz [파일명.tar.gz] [폴더명]

ex) test라는 폴더를 temp.tar.gz로 압축하기

tar -cvfz temp.tar.gz test

 

 

4) .tar.gz로 압축 해제하기

tar -xvfz [파일명.tar.gz]

ex) temp.tar.gz라는 tar.gz파일 압축풀기

> tar -xvfz temp.tar.gz

728x90
반응형
728x90
반응형

 

Eclipse Properties File 글자 색상 변경하기

 

Eclipse상단 메뉴 > Window > Preferences > PropertiesEditor > Editor     OR

Eclipse상단 메뉴 > Window > Preferences > Properties Files Editor > Editor 

 

2개중 맞는 메뉴로 이동 후 색깔 변경하기

728x90
반응형
728x90
반응형

 

Eclipse 테마 수정 안될 때 강제 변경하기

 

이클립스 테마 다운로드 주소 : http://www.eclipsecolorthemes.org/

 

1. 이클립스 테마 다운로드 주소링크를 타고 홈페이지 접속 

 

2. 원하는 테마 선택

 

3. Eclipse Preferences (EPF) 클릭 해서 다운로드 하기

 

4. 이클립스 실행

 

5. 이클립스 > File > Import > General > Preferences 클릭

 

6. Browse... 클릭 후 다운로드 파일 적용하고 Finish

 

 

728x90
반응형
728x90
반응형

 

JSP파일에서

  • JS 파일 Import 하기
  • CSS 파일 Import 하기
  • JSP 파일 Import 하기

 

JS 파일 Import 하기

1
2
3
4
5
js 파일 Import 방법 1
<script src="<c:url value='/js파일경로'/>" type="text/javascript"></script>
 
js 파일 Import 방법 2
<script src="/js파일경로" type="text/javascript"></script>
 

 

CSS 파일 Import 하기

1
2
3
4
5
Css 파일 Import 방법 1
<link type="text/css" rel="stylesheet" href="<c:url value='/css파일경로'/>" ></link>
Css 파일 Import 방법 2
<link type="text/css" rel="stylesheet" href="/css파일경로" ></link>
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

JSP파일에서 다른 JSP 파일 Import 하기

1
2
3
다른 JSP 파일 Import 방법
<%@include file="/WEB-INF/jsp파일경로"%>
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] JSTL forEach Example  (0) 2019.07.07
[JSP] JSTL if, when, otherwise Example  (1) 2019.07.07
[JSP] JSTL Tag 사용 Error  (0) 2019.07.07
728x90
반응형

 

JSTL 문법 forEach 알아보기

0 ~ 5 까지 출력하기 (default step = 1)

1
2
3
4
5
6
<c:forEach var="index" begin="0" end="5">
    ${index }
</c:forEach>
 
실행 결과 : 0 1 2 3 4 5
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

0 ~ 5 까지 출력하기 (step = 2)

1
2
3
4
5
6
<c:forEach var="index" begin="0" end="5" step="2">
    ${index }
</c:forEach>
 
실행 결과 : 0 2 4
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

리스트 순차적으로 사용하기

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<c:set var="index" value="0,1,2" />
    <c:forEach items="${index }" var="temp">
        <p>인덱스 : ${temp }<p>
</c:forEach>
 
실행결과
-----------------------
인덱스 : 0
 
인덱스 : 1
 
인덱스 : 2
-----------------------
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] js, css import example  (0) 2019.07.07
[JSP] JSTL if, when, otherwise Example  (1) 2019.07.07
[JSP] JSTL Tag 사용 Error  (0) 2019.07.07
728x90
반응형

 

Java의 If, Else 문법은 JSTL에서 whenotherwise를 사용한다.

1. IF문(단일) 사용하기

2. IF ELSE 사용하기

3. 다중 IF 사용하기

 

주의사항 

JSP파일 상단에 C taglib 추가하기

1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

 

1. 단일 IF

1
2
3
4
<c:set var="index" value="0" />
<c:if test="${index eq 0 }">
    index 값 : ${index }
</c:if>
 

 

2. If Else문 (<c:choose> <c:otherwise>)

주의사항 - <c:when> <c:otherwise>(if else)문 사용할 경우 <c:choose></c:choose>로 감싸 주기

1
2
3
4
5
6
7
8
9
<c:set var="index" value="0" />
<c:choose>
    <c:when test="${index eq 1 }">
        index 값은 1입니다.
    </c:when>
    <c:otherwise>
        index 값 : ${index }
    </c:otherwise>
</c:choose>

 

3. 다중 If

eq(==) / ne(!=)

 

방법 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<c:set var="index" value="0" />
<c:set var="name" value="홍길동" />
        
<c:choose>
    <c:when test="${index eq 0 }">
        <c:if test="${name eq '홍길동' }">
            name 변수 값은 홍길동입니다.
        </c:if>
        <c:if test="${name eq '홍길동1' }">
            name 변수 값은 ${name }입니다.
        </c:if>
    </c:when>
    <c:otherwise>
        index 값 : ${index }
    </c:otherwise>
</c:choose>

 

방법 2

주의사항 - <c:when><c:otherwise> 앞에 <c:choose></c:choose>태그로 감싸주기

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<c:set var="index" value="0" />
<c:set var="name" value="홍길동1" />
        
<c:choose>
    <c:when test="${index eq 0 }">
        <c:choose>
            <c:when test="${name eq '홍길동' }">
                name 변수 값은 홍길동입니다.
            </c:when>
            <c:when test="${name eq '홍길동1' }">
                name 변수 값은 홍길동1입니다.
            </c:when>
            <c:otherwise>
                name 변수 값은 ${name }입니다.
            </c:otherwise>
        </c:choose>
    </c:when>
    <c:otherwise>
        index 값 : ${index }
    </c:otherwise>
</c:choose>

 

 

728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] js, css import example  (0) 2019.07.07
[JSP] JSTL forEach Example  (0) 2019.07.07
[JSP] JSTL Tag 사용 Error  (0) 2019.07.07
728x90
반응형

 

Spring or JSP 파일에서 JSTL 태그 사용하는데 인식을 못할 때

 

JSP파일 안에 taglib를 추가해야 한다

1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

 

 

 

 

 

728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] js, css import example  (0) 2019.07.07
[JSP] JSTL forEach Example  (0) 2019.07.07
[JSP] JSTL if, when, otherwise Example  (1) 2019.07.07

+ Recent posts