Vscode中支持JSP+HTML模板的JSTL语法插件:JSTL snippets


JSTL snippets包含了几乎所有可能的JSTL片段。只需在片段名称中输入几个相关的字母,就可以很容易地访问它们。

最好的办法是用.jsp扩展名创建文件,并将语言模式保持为HTML。这样你就可以同时访问emmet功能和jstl-snippets-by-deb功能。

它只对HTML语言模式有效,而jsp的语言模式是默认的。

插件点击标题

支持的JSTL语法如下:

JSTL tag    Shortcut    Description
c:forEach..begin..end    cforEach    JSTL for each
c:forEach    cforEach    JSTL for each
c:if    cif    JSTL if
c:choose    cchoose    JSTL choose
c:choose when...otherwise    cchoose    JSTL choose with when and otherwise
c:choose when otherwise    cchoose    JSTL choose with when and otherwise
c:when    cwhen    JSTL when
c:otherwise    cotherwise    JSTL otherwise

c:set    cset    JSTL set one line
c:set..    cset    JSTL set
c:set...    cset    JSTL set with scope
c:out    cout    JSTL out
c:import    cimport    JSTL import
c:remove    cremove    JSTL remove
c:catch    ccatch    JSTL catch
c:forTokens    cforTokens    JSTL for tokens
c:param    cparam    JSTL url param
c:url    curl    JSTL url
c:redirect    credirect    JSTL redirect
fn:contains    fncontains    JSTL function contains:
boolean contains(java.lang.String, java.lang.String)
fn:containsIgnoreCase    fncontainsIgnoreCase    JSTL function contains ignore case:
boolean containsIgnoreCase(java.lang.String, java.lang.String)
fn:endsWith    fnendsWith    JSTL function ends with:
boolean endsWith(java.lang.String, java.lang.String)
fn:escapeXml    fnescapeXml    JSTL escape xml:
java.lang.String escapeXml(java.lang.String)
fn:indexOf    fnindexOf    JSTL index of:
int indexOf(java.lang.String, java.lang.String)
fn:trim    fntrim    JSTL trim:
java.lang.String trim(java.lang.String)
fn:startsWith    fnstartsWith    JSTL starts with:
boolean fn:startsWith(String input, String prefix)
fn:split    fnsplit    JSTL split:
java.lang.String[] split(java.lang.String, java.lang.String)
fn:toLowerCase    fntoLowerCase    JSTL to lower case:
String fn:toLowerCase(String input)
fn:toUpperCase    fntoUpperCase    JSTL to upper case:
String fn:toUpperCase(String input)
fn:substring    fnsubstring    JSTL function substring:
String fn:substring(String inputstring, int start, int end)
fn:substringAfter    fnsubstringAfter    JSTL function substring after:
String fn:substringAfter(String input, String afterstring)
fn:substringBefore    fnsubstringBefore    JSTL function substring before:
String fn:substringBefore(String input, String beforestring)
fn:length    fnlength    JSTL function length:
int length(java.lang.Object)
fn:replace    fnreplace    JSTL function replace
String fn:replace(String input, String search_for, String replace_with)
fmt:parseNumber    fmtparseNumber    JSTL parse number:
body content
fmt:timeZone    fmttimeZone    JSTL time zone:
body content
fmt:formatNumber    fmtformatNumber    JSTL format number:
other attributes:groupingUsed,maxIntegerDigits,maxFractionDigits,pattern
fmt:parseDate    fmtparseDate    JSTL parse date
fmt:bundle    fmtbundle    JSTL bundle
fmt:setTimeZone    fmtsetTimeZone    JSTL set time zone
fmt:setBundle    fmtsetBundle    JSTL set bundle
fmt:message    fmtmessage    JSTL message
fmt:formatDate    fmtformatDate    JSTL format date
x:out    xout    JSTL xml out
x:parse    xparse    JSTL xml parse
x:set    xset    JSTL xml set
x:choose    xchoose    JSTL xml choose
x:when    xwhen    JSTL xml when
x:otherwise    xotherwise    JSTL xml otherwise
x:if    xif    JSTL xml if
x:transform    xtransform    JSTL xml transform
x:param    xparam    JSTL xml param
sql:setDataSource    sqlsetDataSource    JSTL sql set data source
sql:query    sqlquery    JSTL sql query
sql:update    sqlupdate    JSTL sql update
sql:param    sqlparam    JSTL sql param
sql:dateParam    sqldateParam    JSTL sql date param
sql:transaction    sqltransaction    JSTL sql transaction
jstl:core    jstlcore    JSTL core taglib
jstl:functions    jstlfunctions    JSTL functions taglib
jstl:fmt    jstlfmt    JSTL formatting taglib
jstl:xml    jstlxml    JSTL xml taglib
jstl:sql    jstlsql    JSTL sql taglib