Eclipse不是在jsp文件中导入类 [英] Eclipse is not importing classes in jsp files

查看:200
本文介绍了Eclipse不是在jsp文件中导入类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 7 64,
新鲜的Eclipse Java EE IDE for Web Developers。
版本:Kepler服务版本1
构建ID:20130919-0819

Windows 7 64, fresh Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 1 Build id: 20130919-0819

Eclipse不会自动或手动导入JSP文件中的类

Eclipse is not automatically or manually importing classes in JSP files?

尽管这个的建议(看看接受的答案),它适用于常规的java类文件(在我的PC上),对于JSP它不起作用?

Despite this suggestion (look at accepted answer) which works for regular java class files (on my PC), for JSP it doesn't work?

有没有一些设置,我可能会意外关闭,或者我不得不打开它?
我检查了所有通常的地方,如组织导入,保存操作,内容辅助(JSP文件,编辑器,内容辅助),并检查所有内容,但除了缩进(代码格式化)JSP页面没有什么工作?

Is there some setting that I might accidentally turned off, or I had to turn it on? I checked all usual places such as Organize Imports, Save Actions, Content Assist (JSP Files, Editor, Content Assist) and everything is checked but besides indentation (code formatting) for JSP pages nothing works?

推荐答案

确保您的首选项启用了添加导入而不是限定名称选项,您正在使用 JSP编辑器打开您的文件,您要导入的类型在项目的 Java构建路径并提出。您应该可以在Luna的事实之后添加Page Import指令。

Make sure your preferences have the "Add import instead of qualified name" option enabled, that you are using the JSP Editor to open your file, and that the type you want imported is on the project's Java Build Path and proposed. You should be able to add Page Import directives after the fact in Luna.

这篇关于Eclipse不是在jsp文件中导入类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆