问题
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.
Any ideas why this isn't working? It has worked out-of-the-box on every other version of Eclipse that I've used.
回答1:
Same problem happen to occur for me. I had tried this solution and it worked for me.
Check your
JDK
must be1.6
or later. If not installJDK 1.7
If problem still persists, In Eclipse Go to
Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno)
-> ExpandWeb, 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 fileopen with -> Web Page Editor
. IfWeb Page Editor
is not present go toOther -> Internal Editors -> Web Page Editor
Or Go to new file create with .jsp extension and open with web page editorNow in Eclipse Goto
Window -> Preferences -> General -> Editors -> File Associations
Select *.jsp and make web page editor as default editorCreate 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 "path
for 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"
来源:https://stackoverflow.com/questions/12324201/eclipse-juno-jsp-syntax-highlighting-doesnt-work