Code assist in (jsp /jstl) view for Spring MVC model objects in Eclipse

*爱你&永不变心* 提交于 2019-12-04 07:24:07
Kannan Ekanath

Ideally you want the JSP/JSTL standard tags to be agnostic of the technology that supplies these objects but you are correct in that atleast while designing the support will be useful.

However it looks like Intellij IDEA seems to have something similar to what you want http://www.jetbrains.com/idea/features/spring_framework.html (towards the end)!

You have to add a JSP comment like this:

<%--@elvariable id="pet" type="com.mycompany.Pet"--%>

IntelliJ will then autocomplete based on that type.


(source: jetbrains.com)

Is using IntelliJ ruled out for you?

In other words: you want code assist for EL (Expression Language, the ${} things)? This is not to be confused with JSP, JSTL nor Spring MVC.

Eclipse doesn't have any builtin EL autocompletion support, the JBoss Tools plugin adds some (JSF) EL autocompletion support. MyEclipse and IntelliJ have code assist for at least implicit EL objects. Not sure about custom EL objects though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!