-
Sub-task
-
Resolution: Unresolved
-
Major
-
2.16.2.Final
-
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>
- is related to
-
FORGE-2361 Having web front related commands
- Open
- relates to
-
FORGE-1594 Being able to create a new JSF View
- Open