Community
Participate
Working Groups
Expected behavior: Opening a .jsp or .jspf file will load the file into a JSP Editor pane. Actual behavior: Opening a .jsp fill loads the file into a plain text editor pane. I modified General > Editors > File Associations to make sure that JSP Editor is the top item in those files' associations, and marked it as the default, too. Even with those changes, JSPs still open in plain text editor. Steps to reproduce: 1. Download and unzip the Windows 7 64-bit "Eclipse IDE for Java EE Developers" version of eclipse. 2. launch eclipse and navigate to a .jsp file in Navigator or Project Explorer pane. 3. double-click the .jsp file. 4. The file will open in a plain-text editor instead of a JSP editor. Possible oddities: I used Windows 7's built-in zip functionality instead of a 3rd party program like 7-zip. I've heard this can be a source of problems. I have a Tomcat plugin installed to quickly stop and start a local Tomcat server. -- Configuration Details -- Product: Eclipse 2.0.0.20130613-0530 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.platform 4.3.0.v20130605-2000
It looks like several file types are going to the default text editor. Formats I've run into so far: .xml (should go to XML editor) .js (should go to JavaScript editor)
Is this an existing workspace, or a fresh workspace with your source checked out of SCM? PW
I'm using an existing workspace brought over from Juno. I could try creating a new workspace and see if that resolves the issue.
I tried creating a new workspace, cloning and checking out from scratch, and the bug still remains.
It seems that once I have used Open With -> Other... on a file to open it with the right editor, it remembers the chosen editor type, but only for that one file.
In your fresh workspace where you can reproduce the problem, what are the defaults listed for jsp files? i.e. in Preferences>General>Editors>File Associations. In Preferences>General>Content Types. and finally when you right-click on the .jsp file (before having selected anything) what does it list under Open With>? On a java file for example it lists Java Editor then Text Editor. PW
Created attachment 234041 [details] Screenshot of "Open With" context menu Preferences>General>Editors>File Associations: *.jsp has listed {JSP Editor (default), Text Editor, Web Page Editor }. *.jspf has listed {JSP Editor (default), Text Editor} In Preferences>General>Content Types There are not items for JSP files. It only has {Java Archive, Java Class File, Text, and Word Document}.
Can you export your prefs and attach them here? File>Export...>Preferences You should just select All preferences. PW
Created attachment 234365 [details] Eclipse's preferences export from a workspace displaying the bug in question
I have not experienced this since upgrading to Luna.
I still have the same problem. I have Eclipse version 2018-09 (4.9.0) No matter what I do, I cannot open a new file with JSP Editor. I have tried to set file association to default to JSP Editor many times. Never works. Use open with and then click the box open all .jsp files with this editor (JSP Editor) has no effect either.
(In reply to Viccy Lu from comment #11) I'm not sure if you meant to imply you've had this problem since 2013, but the JSP Editor is installed, set as the default, and still not opening? Can you attach screenshots showing this, and what opens instead?
I have a similar Problem (Eclipse version 2019-09 = 4.13.0) and it goes like this: I'm using Subversion-Repository (SVN) with Subclipse and have several .jsp files within my project. Opening any of these .jsp's in Eclipse works fine: JSP Editor renders correct and even code completion works fine. But: As soon as I open 'Show Annotation...' (this is: mouse right klick --> Team --> Show Annotation...) that same file is opened in a new txt-Editor without rendering, without any features except of showing the Annotations. May be it has something to do with my Subclipse? May be this could help debugging the strange behavior reported by Viccy Lu?
I still have the same problem. I just upgraded to Eclipse 2020-03. No matter what I do, my .jsp files open in plain text even though JSP Editor is set as default. Choosing open with and manually picking JSP Editor will open the files correctly, but manually doing this every time is very annoying!! Can someone give an answer on what's causing this? Thank you so much! YL
(In reply to Viccy Lu from comment #14) Viccy, when you open the Properties dialog for one of those files, does the Resource page correctly list the file's Type as "File (JSP)"? When the file defaults to opening in a different editor, which one has become the default in the file's Open With context menu--exactly which name is shown as the default?
Hi Nitin, The properties -> resource of a .jsp file will show the type as File (JSP). If I use open with, the default is Generic Text Editor. Thanks.
(In reply to Viccy Lu from comment #16) > Hi Nitin, > > The properties -> resource of a .jsp file will show the type as File (JSP). > If I use open with, the default is Generic Text Editor. Thank you! Other than how the editor class itself is specified (which only changed for 2020-06), we haven't changed how the JSP Editor is registered since long before Juno.
What could the problem be then? I know it doesn't happen to everyone. But it does happen for me.
Having a little different problem, which might be related to this , otherwise move it as a new issue: installed JBoss-Tools had added jboss-editor for jsp files, but eclipse doesn't show anymore the default button for selecting the standard jsp-editor, see attachment. Eclipse IDE for Enterprise Java Developers (includes Incubating components) Version: 2020-09 (4.17.0) Build id: 20200910-1200 OS: Windows 10, v.10.0, x86_64 / win32 Java version: 14.0.2
Created attachment 284248 [details] Content type default editor button missing
(In reply to Gert Matern from comment #20) > Created attachment 284248 [details] > Content type default editor button missing That would be on the File Associations preference page.
Ok, thx for directing me to the right page, but even when setting the internal JSP editor as default, eclipse opens th jsp file with a blank page, no editor. It seems as if it can't find the default anymore. Only when opening explicitly with default from the right mouse button it now works.
Additional info: this happend only, because I still had the blank pages open and was directed there when clicking same jsp again. The file association page works! Sorry for starting confusion here!!!