6 Replies Latest reply on Mar 28, 2008 10:14 AM by antoine_h

    file extension .jsf ? instead of .jsp and .xhtml

    antoine_h

      Hi,

      I have seen nothing about that in any doc, tuto, etc...

      **************************************
      Philosophical question : why the JSF files have the .jsp extension ?
      or the .xhtml ?

      they are not xhtml
      they are not anymore jsp

      in all the tutorials or doc I have seen, for configuring jsf on jboss, all the config samples leads you to : "you put .jsp... and you'll run with jsp"
      and idem with xhtml.

      well, I wonder why ?
      I would like to have JSF file with .jsf extension...
      or know the reason behing this amazing thing...



      *********************************
      Practical question : Config of JBoss Tools to set .jsf extension for the JSF files ?

      I have configured my JBoss Tools and JBoss Portal 2.6.4 with JSF, RichFaces... to use jsf files.
      works nice.

      but in JBoss Tools :
      - the jsf files are recognized for global editor features : without the toolTips, the code completion, the drag and drop of new components...
      - I have found nothing to define the extention of the jsf files

      => is there a way to configure JBoss Tools to have the JSF files with .jsf extension ? and so JBoss Tools runs with full features...

      even if someone knows how to do that cleanly by changing things directly in the xml descriptor files of the pluggin...

        • 1. Re: file extension .jsf ? instead of .jsp and .xhtml
          maxandersen

          why are you saying it is not .xhtml ?

          afaik, they are ;)

          About using .jsf extension then that should work as long as you setup our editor for it in Editor assoication preferences.

          • 2. Re: file extension .jsf ? instead of .jsp and .xhtml
            antoine_h

            thanks,

            yes... I realized after posting they are xhtml... (with the extensions...).

            For the preferences configuration :
            - in General => Editors => File Association

            - the .jsf is there, with several editors, among them :
            - JBoss Tools JSP Editor (locked by 'JSP Fragment' content type)

            - in the .xhtml extension, there is this editor :
            - JBoss Tools HTML Editor (locked by 'HTML Fragment' content type)

            I put also the JBoss Tools HTML Editor in the .jsf association.

            I have tried all these editor, to open a .jsf file.
            There still was no code completion, no toolTips about the tags, etc...

            May be this config is not enough ?...

            Which editor is "our editor" for jsf files ?
            Did I missed something ?



            • 3. Re: file extension .jsf ? instead of .jsp and .xhtml
              maxandersen

              hmmmm....that sounds a bit like a bug to me that JSP is chosen as the editor for JSF ...well actually depends if it is just jsp tags you use in those .jsf files.

              Does it work if you use Open With and choose JBoss tools HTML editor ?

              • 4. Re: file extension .jsf ? instead of .jsp and .xhtml
                antoine_h

                To check better :
                - I create a new file (simple new file), with .jsf extension
                - I copied into it the exact whole content of a .xhtml file that works well.

                => the file is set as a JSP (the icon is jsp, the default editor is JBoss Tool JSP editor).

                if I open it with "open with", and choose JBoss Tool HTML editor.
                idem : no code completion, no code validation etc...
                note : the icon of the editor window is "green with htm"... and not "blue with jsp"

                so, it seems there is something that prevent the editor to run with this file as a jsf file.

                for the time being, I keep on with .xhtml file, because I need to go on with my work.

                but I think .jsf files should be better.
                xhtml is a great standard... but it now means everything... so it means nothing...
                I mean : if someone want to search in files... it may be usefull to filter on the jsf file from other types of files... with the .jsf.

                If I can help with some testing ...
                I will try again the .jsf.... as soon as it can be possible...

                Thanks,





                • 5. Re: file extension .jsf ? instead of .jsp and .xhtml
                  maxandersen

                  could you report it in jira with a reference to this forum -then we won't forget it.

                  thanks

                  • 6. Re: file extension .jsf ? instead of .jsp and .xhtml
                    antoine_h