如何将 Eclipse Java 搜索扩展到 JSP?

发布于 2024-08-31 04:20:25 字数 181 浏览 2 评论 0原文

朋友们,

我们的JSP代码同时使用了Spring表单标签和JSTL标签。有没有一种方法可以让我在 Eclipse Java 搜索中搜索 getFoo() 时,Eclipse 也返回 JSP 文件中 foo 属性的使用情况?

我怀疑答案是否定的,因为在编译时没有办法告诉 JSP bean 的类型,但它值得一问,对吗?

Friends,

Our JSP code uses both Spring form tags and JSTL tags. Is there a way that when I search for getFoo() in the Eclipse Java Search, for Eclipse to also return uses of the foo property in the JSP files?

I suspect the answer is "no", because there isn't a way at compile time to tell the types of the JSP beans, but its worth asking, right?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

澉约 2024-09-07 04:20:25

Eclipse 的 JavaEE 发行版将执行此操作,但仅限于 JSP 包含类型信息的情况。讽刺的是,这种情况只发生在 中,这是在 JSP 中声明 java beans 的旧的、前 JSTL 的方式。新型 JSP 非常缺乏 java 类型信息,并且 Eclipse 几乎没有或根本没有可以处理的信息。

The JavaEE distro of Eclipse will do that, but only in those cases where the JSP contains type information. Ironically, this only really happens with <jsp:useBean>, which is the old, pre-JSTL way of declaring java beans in the JSP. New-style JSPs are pretty devoid of java type info, and Eclipse has little or nothing to get a handle on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文