JSP EL and autoCompletion

前端 未结 1 1451
攒了一身酷
攒了一身酷 2021-02-13 14:17

In my servlet:

request.setAttribute(\"list\", myList);

In my Jsp:


   ${item.n         


        
相关标签:
1条回答
  • 2021-02-13 14:58

    For IntelliJ, you can use comment annotations, such as this:

    <%--@elvariable id="list" type="java.util.List<your.item.class.Here>"--%>
    

    To get this automatically, IntelliJ should be coloring ${items} as a warning, since it wont have any idea what it is. Click on it and when the lightbulb pops up, click the option "Declare external variable in comment annotation." That will generate a comment annotation such as the one listed above.

    0 讨论(0)
提交回复
热议问题