본문 바로가기
괴발개발/jsp

vscode jsp 자동완성 (자동설정)

by 맛길만걷자 2024. 6. 26.
728x90
반응형

자동으로 jsp 연결하기 vs 코드

환결설정(톱니바퀴), 코드조각 html.json 검색 없으면 

html 클릭
원래내용 지우고 넣음 저장

html은 원래대로 !로 자동완성

jsp-html:5 하면 jsp 자동완성됨

 

 

html.json

{
    // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and
    // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
    // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
    // same ids are connected.
    // Example:
    // "Print to console": {
    //  "prefix": "log",
    //  "body": [
    //      "console.log('$1');",
    //      "$2"
    //  ],
    //  "description": "Log output to console"
    // }


    "jsp": {
        "prefix": "jsp-html:5",
        "body": [
            "<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\" pageEncoding=\"UTF-8\"%>",
            "<!DOCTYPE html>",
            "<html lang=\"ko\">",
            "<head>",
            "\t<meta charset=\"UTF-8\">",
            "\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
            "\t<title>$1</title>",
            "</head>",
            "<body>",
            "\t$2",
            "</body>",
            "</html>",
        ],
        "description": "jsp 기본 태그 작성"
    }
}

 

728x90
반응형

'괴발개발 > jsp' 카테고리의 다른 글

서블릿 통해서 JSP로 응답하기.  (0) 2024.06.28
Servlet / JSP 내장 객체와 범위(scope)  (0) 2024.06.25
JSP  (0) 2024.06.24