(*** This bug was imported into bugs.kde.org ***) Package: konqueror Version: 2.1.1 (using KDE 2.1.2 ) Severity: normal Installed from: Linux-Mandrake 8.0 i586 Compiler: gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk) OS: Linux 2.4.3-20mdk i686 OS/Compiler notes: Konqueror knows what program to use to open a file based on its 'file type' which can be edited. Right click on file and choose edit file type allow configuration of filename patterns (filename extension) and application to use to open file. However it appears (but not sure) that konqueror is using first few chars of file to determine MIME type rather than using file extension. Thats ok but take these two .jsp files first file starts <%-- You must .... --%> <% java %> <html> ......... second file starts <%@ include file="yada" %> <% java %> <html> ............... Now both are valid .jsp files but konqueor recognises the first as a html file and wants to open in KHMTL but the second is recognised as a C++ source file. I've tried changing extension in file type and stuff like that but I cant see a why of getting real html to open in KHMTL and all .jsp regardless of how they start to open in kwrite. (Submitted via bugs.kde.org) (Called from KBugReport dialog)
On Friday 18 May 2001 11:54 rob@webleicester.net wrote: > Package: konqueror > Version: 2.1.1 (using KDE 2.1.2 ) > Severity: normal > Installed from: Linux-Mandrake 8.0 i586 > Compiler: gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk) > OS: Linux 2.4.3-20mdk i686 > OS/Compiler notes: > > Konqueror knows what program to use to open a file based on its 'file type' which can be > edited. Right click on file and choose edit > file type allow configuration of filename patterns (filename extension) and application to use to open file. > > However it appears (but not sure) that konqueror is using first few chars of file to determine MIME type rather than using file extension. > > Thats ok but take these two .jsp files > > first file starts > <%-- You must .... --%> > <% java %> > <html> > ......... > > second file starts > <%@ include file="yada" %> > <% java %> > <html> > ............... > > Now both are valid .jsp files but konqueor > recognises the first as a html file and > wants to open in KHMTL but the second is > recognised as a C++ source file. > > I've tried changing extension in file type and > stuff like that but I cant see a why of getting real html to open in KHMTL and all .jsp regardless of how they start to open in kwrite. Well did you add the .jsp extension to the text/html file type ? This way you enforce that .jsp files are recognized as text/html turning off any kind of automatic-mimetype-determination. You could also define a different type of file if you wanted and associate it to khtml but I'm not too sure if khtml would still display them... Hmm I guess it would yes. -- David FAURE david@mandrakesoft.com faure@kde.org http://perso.mandrakesoft.com/~david/ http://www.konqueror.org/ KDE Making The Future of Computing Available Today