This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 116401 - problem by define custom file extensions or MIME Types
Summary: problem by define custom file extensions or MIME Types
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 121851 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-22 15:57 UTC by gawrik
Modified: 2008-08-26 17:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image to issue (204.28 KB, image/jpeg)
2007-09-22 16:01 UTC, gawrik
Details
The exceptions (19.79 KB, text/plain)
2007-09-24 10:18 UTC, Marek Fukala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gawrik 2007-09-22 15:57:33 UTC
i probable add my custom(emvx) file extension to Options - Advanced Options - System - Object type - jsf jsp Objects and
nothing was changed by editor and file type icon. I have NB 6.0 beta1.
This work fine in NB5.5.1 and NB5.0
Comment 1 gawrik 2007-09-22 16:01:11 UTC
Created attachment 49298 [details]
image to issue
Comment 2 Marek Fukala 2007-09-24 10:15:33 UTC
I cannot reproduce the problem, the JSP loader loads the files with the extension added in the advanced options to the
JSP object type. However, plenty of exceptions are thrown then when trying to open the file. See attached log file.
Comment 3 Marek Fukala 2007-09-24 10:18:26 UTC
Created attachment 49346 [details]
The exceptions
Comment 4 Marek Fukala 2007-10-29 16:07:21 UTC
not critical issue, the fix is not trivial - the jsp parser expects the standart file extensions.
Comment 5 Marek Fukala 2007-11-14 08:58:00 UTC
*** Issue 121851 has been marked as a duplicate of this issue. ***
Comment 6 Petr Jiricka 2007-11-14 09:29:13 UTC
> not critical issue, the fix is not trivial - the jsp parser expects the standart file extensions.

So should we open an enhancement request against the JSP parser, or against GlassFish?
Comment 7 Marek Fukala 2007-11-14 09:53:25 UTC
I think the problem is more in our code than in the parser itself. 

Currently the JspContextInfo.getContextInfo(FileObject) gets the mimetype from the fileobject and finds an instance of
JspContextInfo in the default filesystem under corresponding folder. However for the custom file extenstions the
mimetype is content/unknown so no JspContextInfo is found and then no jsp features work.

If I put the custom extension into the web/core mime resolver everythink works fine.

Comment 8 Marek Fukala 2008-08-21 11:07:48 UTC
should already work
Comment 9 gawrik 2008-08-21 20:40:38 UTC
this problem is not soo critical fo mz new projects.
but for mz old projrcts who this exstention alreadz defined is! is this soo complex? older NB versions(5.5) maked this without problem!
you can this isssue as fixed commiten, but this not work by me! haave new file test.emvx created and as body from another jsp copied - no results! who must 
i the settings byy 6.5 changen? 
Comment 10 Marek Fukala 2008-08-26 14:53:01 UTC
Download netbeans 6.5 beta or recent daily build.

Choose Tools -> Options menu.

Choose Miscellaneous tab

Choose File tab below

Click to New... button

Specify your extension

Select associated mimetype (filetype) in the combobox below - JSP Files (text/x-jsp)

Click OK in the right down corner.

BETTER restart netbans now

Open your file with the special extension

=> all jsp features works as in normal JSP file

Comment 11 gawrik 2008-08-26 17:55:14 UTC
thanks! it's work! super!