Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      The goal of this feature is to define a standard structure for a JSF 2.2 application. And here is the proposal :

      Resources


      The css, js, images files must be stored in the resources folder like for JSF 2.0

      • resources
      Views


      The views must be stored in a folder named views

      • views


      The protected views must be stored in a sub folder named protected

      • views
        • protected
      Templates


      The templates must be stored in a folder named templates

      • templates
        • mytemplate
          • css
          • js
          • images
          • template.xhtml
          • template.png
          • template.xml
      Tasks Flows (modules)


      The modules must be stored in a folder named modules. Note that the structure of a Task flow has not yet been set.

      • modules

      And we end up finally with this standard and cohesive structure :

      • app
        • resources
        • views
        • templates
        • modules
        • web-inf
      Externalization of the JSF artifacts


      The folders must be externalized and stored out of the WAR file to enlarge the possibilities for new ideas and systems.

        Activity

        Hide
        Neil Griffin added a comment -

        I think we need to maintain compatibility with Servlet 2.5 (Tomcat 6) for JSF 2.2

        So I think the web fragment feature could be utilized, so long as developers realize that a zero-config feature like that will only get activated if they deploy their webapps/portlets in Servlet 3.0 (Tomcat 7).

        Show
        Neil Griffin added a comment - I think we need to maintain compatibility with Servlet 2.5 (Tomcat 6) for JSF 2.2 So I think the web fragment feature could be utilized, so long as developers realize that a zero-config feature like that will only get activated if they deploy their webapps/portlets in Servlet 3.0 (Tomcat 7).
        Hide
        lamine_ba added a comment -

        Yes I agree but having a default web-fragment.xml file does not mean, we will not be compatible with Servlet 2.5. This api does not even know what a web-fragment.xml is all about. It means only when a developer is using a server like Tomcat 6, he has to do things manually but when he moves to use tomcat 7, things are done automatically for him. And that is another good reason for a developer to make the switch...

        Show
        lamine_ba added a comment - Yes I agree but having a default web-fragment.xml file does not mean, we will not be compatible with Servlet 2.5. This api does not even know what a web-fragment.xml is all about. It means only when a developer is using a server like Tomcat 6, he has to do things manually but when he moves to use tomcat 7, things are done automatically for him. And that is another good reason for a developer to make the switch...
        Hide
        Neil Griffin added a comment -

        Right, I think you and I basically just said the same thing.

        Show
        Neil Griffin added a comment - Right, I think you and I basically just said the same thing.
        Hide
        lamine_ba added a comment -

        I'm closing this feature now. Thank you all for your clever comments.

        As blake sullivan wrote, it is better to make it a recommended best practice.
        Thus it will be implemented as a JSF 2.2 maven archetype. In this implementation, you will see also the solution described by Neil Griffin to protect the artifacts from direct access by the user-agent. This behavior will be automated and implemented using the Servlet 3.0 web-fragment feature. So if you are not using this api, please do it yourself.

        Thanks.

        Show
        lamine_ba added a comment - I'm closing this feature now. Thank you all for your clever comments. As blake sullivan wrote, it is better to make it a recommended best practice. Thus it will be implemented as a JSF 2.2 maven archetype. In this implementation, you will see also the solution described by Neil Griffin to protect the artifacts from direct access by the user-agent. This behavior will be automated and implemented using the Servlet 3.0 web-fragment feature. So if you are not using this api, please do it yourself. Thanks.
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out

          People

          • Assignee:
            Ed Burns
            Reporter:
            lamine_ba
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: