XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.x Future
    • 2.16.2.Final
    • Java EE
    • None

      At the moment the only way to generate HTML pages is with scaffolding. It would be good to have a separate command to create HTML pages. Commands such as :

      html-new-page --named mypage
      

      This will create a mypage.html on the root of the webapp directory. You could also give a different directory with :

      html-new-page --named mypage --targetDirectory admin
      

      This will create the page under webapp/admin/mypage.html.

      <!DOCTYPE HTML>
      <html>
      <head>
        <title>mypage</title>
      </head>
      <body>
        <h1>mypage</h1>
      </body>
      </html>
      

      The name of the page mypage is used for the title but we could customize it :

      html-new-page --named mypage --title Administration Page
      

      It would just generate the following HTML page :

      <!DOCTYPE HTML>
      <html>
      <head>
        <title>Administration Page</title>
      </head>
      <body>
        <h1>Administration Page</h1>
      </body>
      </html>
      

      If the page needs to be included in the welcome-file-list in the web.xml we could :

      html-new-page --named mypage --isWelcomePage
      html-new-page --named mypage2 --isWelcomePage
      
      <web-app>
        <welcome-file-list>
          <welcome-file>mypage.html</welcome-file>
          <welcome-file>mypage2.html</welcome-file>
        </welcome-file-list>
      </web-app>
      

      If we want a page that redirects to somewhere else, we just type :

      html-new-page --named mypage --redirectsTo ./faces/index.xhtml
      
      <!DOCTYPE HTML>
      <meta http-equiv="refresh" content="0;url=./faces/index.xhtml" /> 
      <html>
      <head>
        <title>mypage</title>
      </head>
      <body>
        <h1>mypage</h1>
      </body>
      </html>
      

              Unassigned Unassigned
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: