Eclipse Juno JSP 语法突出显示不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12324201/
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 18:57:02  来源:igfitidea点击:

Eclipse Juno JSP syntax highlighting doesn't work

eclipseeclipse-juno

提问by bmoran

I installed the Java EE version of Juno and opened an existing project I'm working on. First thing I noticed was that there was no syntax highlighting on my JSP's. I checked my install and I do have WTP installed.

我安装了 Java EE 版本的 Juno 并打开了我正在处理的现有项目。我注意到的第一件事是我的 JSP 上没有语法高亮。我检查了我的安装,我确实安装了 WTP。

Any ideas why this isn't working? It has worked out-of-the-box on every other version of Eclipse that I've used.

任何想法为什么这不起作用?它在我使用过的所有其他版本的 Eclipse 上都是开箱即用的。

回答by Adarsh

Same problem happen to occur for me. I had tried this solution and it worked for me.

同样的问题发生在我身上。我试过这个解决方案,它对我有用。

  1. Check your JDKmust be 1.6or later. If not install JDK 1.7

  2. If problem still persists, In EclipseGo to Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno)-> Expand Web, XML, Java EE and OSGi Enterprise Development -> Web Page Editor(Check it) and install it.

    Restart eclipse after installing. Now open a existing jsp file with Web Page Editor. To do this right click on jsp file open with -> Web Page Editor. If Web Page Editoris not present go to Other -> Internal Editors -> Web Page EditorOrGo to new file create with .jsp extension and open with web page editor

    Now in EclipseGoto Window -> Preferences -> General -> Editors -> File AssociationsSelect *.jsp and make web page editor as default editor

  3. Create a shotcut for *Eclipse *on desktop and right click on shortcut go to properties->shortcut tab -> target

    In the target add these line in braces (-vm "pathfor your bin folder of jdk 7") For Example target should look like "C:\eclipse\eclipse.exe" -vm "C:\Program Files\java\jdk1.7.0_06\bin"

  1. 检查您的JDK必须1.6或稍后。如果没有安装JDK 1.7

  2. 如果问题仍然存在,请在Eclipse 中转到Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno)-> 展开 Web, XML, Java EE and OSGi Enterprise Development -> Web Page Editor(检查)并安装它。

    安装后重启eclipse。现在用 .jsp 打开一个现有的 jsp 文件Web Page Editor。为此,请右键单击 jsp 文件open with -> Web Page Editor。如果Web Page Editor不存在,请转至Other -> Internal Editors -> Web Page Editor转至使用 .jsp 扩展名创建新文件并使用网页编辑器打开

    现在在EclipseGoto Window -> Preferences -> General -> Editors -> File AssociationsSelect *.jsp 并将网页编辑器设为默认编辑器

  3. 在桌面上为 *Eclipse * 创建一个快捷方式,然后右键单击快捷方式转到 properties->shortcut tab -> target

    在目标中,在大括号中添加这些行(-vm "path对于 jdk 7" 的 bin 文件夹)例如目标应该看起来像 "C:\eclipse\eclipse.exe" -vm "C:\Program Files\java\jdk1.7.0_06\bin"