Eclipse Juno 在动态 Web 项目中没有 JSP(但其他一切都很好)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14507498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:51:30  来源:igfitidea点击:

Eclipse Juno no JSP in Dynamic Web Project (but everything else is fine)

eclipsejsp

提问by Neil Walker

The short question, is when creating dynamic web project (1.6 jdk) I can see all file types to create but there is no option for jsp. To add to that when I check file associations there is no JSP editor to select from.

简短的问题是,在创建动态 Web 项目 (1.6 jdk) 时,我可以看到要创建的所有文件类型,但没有用于 jsp 的选项。此外,当我检查文件关联时,没有可供选择的 JSP 编辑器。

A slightly longer version is I simply want to edit JSP files, I have Juno EE version installed and it says web tools platform is installed and everything works just fine.

稍微长一点的版本是我只想编辑 JSP 文件,我安装了 Juno EE 版本,它说安装了 Web 工具平台并且一切正常。

However while everything works, there was no *.jsp in file associations and on adding it there was no JSP editor in the list. This is an out of the box Juno EE.

然而,虽然一切正常,但文件关联中没有 *.jsp 并且在添加它时列表中没有 JSP 编辑器。这是一个开箱即用的 Juno EE。

So I checked installed plugins and it tells me that web tools is installed, there is an icon and a load of plugins. They are all listed under Java EE in the plugin/installation list. I even tried installing just 'java web develop tools' which lists as 'tools for working with jsp' but when I do that I get ""Eclipse Java Web Developer Tools" will be ignored because it is already installed." however I cannot uninstall it because it's part of Java EE eclipse platform. I have no other plugins installed that might have broken this, however it has taken some time to get all the settings good so I'd rather not install it all again.

所以我检查了已安装的插件,它告诉我网络工具已安装,有一个图标和大量插件。它们都列在插件/安装列表中的 Java EE 下。我什至尝试只安装“java web 开发工具”,其中列出了“用于使用 jsp 的工具”,但是当我这样做时,我得到““Eclipse Java Web 开发工具”将被忽略,因为它已经安装了。但是我无法卸载它,因为它是 Java EE eclipse 平台的一部分。我没有安装其他可能会破坏此功能的插件,但是需要一些时间才能使所有设置良好,所以我不想再次安装它。

So I tried to install the full WTP by hand and it said some things were already installed, but it installed others. However, still no JSP editor. Hence why I tried a dynamic web project to see if I could create JSP and it wasn't listed.

所以我尝试手动安装完整的 WTP,它说已经安装了一些东西,但它安装了其他东西。但是,仍然没有 JSP 编辑器。因此,为什么我尝试了一个动态 Web 项目来查看是否可以创建 JSP,但它没有列出。

So, eclipse base install has absolutely everything (xml, html editor, java editor, all the tools) but just not JSP.

因此,eclipse base install 拥有绝对的一切(xml、html 编辑器、java 编辑器、所有工具),但没有 JSP。

My JDK is fine as dynamic web project is not created unless you have a valid 1.6 or above.

我的 JDK 很好,因为除非您拥有有效的 1.6 或更高版本,否则不会创建动态 Web 项目。

Anyone help?

有人帮忙吗?

回答by The Darklord

It seems your missing Eclipse web developer tools and Eclipse java web developer tools.

您似乎缺少 Eclipse Web 开发人员工具和 Eclipse java Web 开发人员工具。

Help>Install new software>http://download.eclipse.org/releases/juno, select appropriate items under Web,XML,Java EE

帮助>安装新软件> http://download.eclipse.org/releases/juno,在Web,XML,Java EE下选择合适的项目

Hope this helps

希望这可以帮助

回答by slashdot

In Eclipse Juno, select File/New/Other, then type in jsp in the wizard field. Select jsp file or jsp tag and there you go. Hope that helps.

在 Eclipse Juno 中,选择 File/New/Other,然后在向导字段中输入 jsp。选择 jsp 文件或 jsp 标签,然后就可以了。希望有帮助。

回答by MR AND

You can go to Eclipse Market place and search for "Java EE Developer tool". On clicking it you should be able to see if your Web developer tool is selected or not. Please select that option and your issue will be resolved.

您可以前往 Eclipse Marketplace 并搜索“Java EE Developer tool”。单击它后,您应该能够看到是否选择了您的 Web 开发人员工具。请选择该选项,您的问题将得到解决。

回答by Jeff Kottke

Check your path. Make sure it is pointing to at least a 1.6 version of Java. Restart Eclipse. That fixed it for me.

检查你的路径。确保它指向至少 1.6 版本的 Java。重新启动 Eclipse。那为我修好了。

回答by user3003770

If you have installed every thing proper and still it is not showing JSP option while creating new .jsp file then click to the web icon on top right corner of eclipse. If it doesn't work then you need to install updated version of eclipse.

如果您已经正确安装了所有东西,但在创建新的 .jsp 文件时仍然没有显示 JSP 选项,然后单击 eclipse 右上角的 web 图标。如果它不起作用,那么您需要安装更新版本的 eclipse。

回答by sanando

Try to install Eclipse with Java EE developer.It should work.

尝试使用 Java EE 开发人员安装 Eclipse。它应该可以工作。

回答by Tech Junkie

I also faced the same problem; I looked through the "Web,XML,Java EE..." installables available at under Kepler downloads:enter image description here

我也面临同样的问题;我查看了 Kepler 下载下的“Web、XML、Java EE...”可安装程序:enter image description here

and that brought me the New->'JSP File' context menu item.

这给我带来了 New->'JSP File' 上下文菜单项。