Generated Files - Web Application¶
Default File Locations¶
- src/main/java for Java source code
- src/test/java for Java source code for testing
- src/main/resources for message properties
- src/test/resources for JSON test data for Selenium tests
- src/main/webapp/WEB-INF for configuration files
- src/main/webapp for XHTML, CSS and JavaScript files
You can change the default directories by setting generator options.
Files for Web Apps¶
Modeling | File Naming | Description |
---|---|---|
application‑ui [name] | faces-config.xml | This file holds information about exception handlers, message properties and self-made JSF components |
application‑ui [name] | web.xml | This file has the purpose to provide configuration data for the web application. Nowadays, it is possible to develop a web application without providing such a web.xml file. However, the benefit of it is that you can find a big part of the overall configuration in one single place. |
application‑ui [name] | glassfish-web.xml | This file has the purpose to provide web application configuration data that is proprietary to the Glassfish application server (e.g. security role mapping and explicit context root configuration). |
application‑ui [name] | jboss-web.xml | This file has the purpose to provide web application configuration data that is proprietary to the JBoss/Wildfly application server (e.g. security role mapping and explicit context root configuration). |
application‑ui [name] | index.xhtml | an XHTML file for a default page that is going to be displayed when no specific page has been given in the URL, can also be used to navigate to whenever you want to navigate to “the web application’s default start page” (by doing an application specific redirect in index.xhtml) |
application‑ui [name] | index.html | simple HTML page that can be used to check whether the web application really is available on the server |
application‑ui [name] | application-style.css | This file contains css styles for the web application. This is the place to individualize the styling of a web application. |
application‑ui [name] | stylesheet-application.xhtml | an XHTML file that is added to all web pages by means of ui:include in an XHTML template and contains h:outputStylesheet tags to reference css files |
application‑ui [name] | [Name]PagesMenu.xhtml | This is an XHTML file that provides a p:menubar that lets you select one of the pages that the application is made of. |
application‑ui [name] | app-messages.properties app-messages_de.properties app-messages_en.properties |
These properties files contain texts that are displayed in page fragments that are located in the web application project itself. This could be for instance special menu items on the western or northern part of the layout. Initially, these files are empty. |
capability [name] | [name]-messages-overwrite_de.properties [name]-messages-overwrite_en.properties [name]-messages-overwrite.properties |
These properties files contain texts that overwrite the corresponding value in the properties files that are found in the web fragment component. Initially, this file is empty. |
application‑ui [name] | HiddenXhtmlFilesFilter.java | This class is a servlet filter that returns an HTTP status of 404 for all XHTML files that should not be directly accessible (but used with ui:include ) or not be accessible at all (pages that are part of a capability but not part of the application). |
application‑ui [name] | AppSessionScopedBean.java | This class is a @SessionScoped bean that lets you manually add code to store session data that is only relevant to one web application. |
capability [name] | App[Name]FeatureCustomization.java | This class has the method isFeatureActive() wherein you can manually write code to control, which features are activated in your web application. |
layout [name] where this layout is not used inside another layout |
App[Name]BeanCustomization.java | These classes let you customize the settings being made in [Name]BeanCustomization.java in the web fragment component. |
layout [name] where this layout is not used inside another layout |
App[Name]BeanNavigationCustomization.java | These classes let you customize the navigation settings being made in [Name]BeanNavigationCustomization.java in the web fragment component. |
organization [name] | AppLayoutCustomizationBean.java | This @RequestScoped class provides a mechanism to configure the appearance of all pages of a web application (content of north, west, south, east, center, …). |
layout [name] where this layout is not used inside another layout |
App[Name]BeanExtendedCustomization.java | These classes let you overwrite the values of the XHTML attributes like for instance style and styleClass , which are set in [Name]BeanExtendedCustomization.java in web fragment components. The JavaDoc of the classes explain which interfaces need to be implemented and how a bean should be named. There is one interface to be implemented for each modeled display [display-name]. |
ValidationMessages_de.java ValidationMessages_en.java ValidationMessages.java |
These are classes that enable to read ValidationMessages*.properties files from many different jar files. They accomplish this by inheriting from MultiPropertiesResourceBundle , which is part of the runtime libraries. |
|
application-ui [name] | AppMasterDataBean.java | This class serves to hold data that has to be made available to all ongoing user sessions. It serves as an application-wide data cache. |
application-ui [name] | center-north_generated.xhtml | the content of the upper part of every page, by default this is empty |
application-ui [name] | east_generated.xhtml | the content of the right sidebar, by default it contains what is in the sample application of PrimeFaces California Layout |
application-ui [name] | head_generated.xhtml | additional content of the section of a web page, by default this is empty |
application-ui [name] | megamenu-name_generated.xhtml | the name to be displayed on the mega menu of the PrimeFaces California Layout |
application-ui [name] | [name]PagesMenu_generated.xhtml | the list of the web app’s web pages, to be displayed in the developer bar |
application-ui [name] | north_generated.xhtml | the content of the top bar, this is not in use in case of the PrimeFaces California Layout |
application-ui [name] | north-left_generated.xhtml | the logo section of the PrimeFaces California Layout |
application-ui [name] | north-right_generated.xhtml | content to be placed on the right side of a page’s top bar, by default this is empty |
application-ui [name] | route-bar_generated.xhtml | content to be placed in the PrimeFaces California Layout’s route bar (right beneath the top bar), by default this is empty |
application-ui [name] | sidebar-menu_generated.xhtml | the generated menu on the left sidebar, one menu item per page of the application |
application-ui [name] | sidebar-profile-menu_generated.xhtml | the profile menu that is shown within the sidebar on the left, by default this is empty |
application-ui [name] | south_generated.xhtml | the footer of the application, by default this is empty |
application-ui [name] | top-menu_generated.xhtml | the content of the mega menu of the PrimeFaces California Layout, by default this is empty |
application-ui [name] | top-profile-menu_generated.xhtml | the profile menu that is shown within the top bar, by default it contains what is in the sample application of PrimeFaces California Layout |
application-ui [name] | west_generated.xhtml | content that is placed on top of the sidebar menu on the left of each web page, by default this is empty |
application-ui [name] | responsive-application-style.css | styles that are going to be used by this application only are added in here, by default this is empty |
application-ui [name] | CenterBean.java | this class is meant to be used to provide program logic for the main part of a web page |
application-ui [name] | EastBean.java | this class is meant to be used to provide program logic for the right sidebar of a web page |
application-ui [name] | NorthBean.java | this class is meant to be used to provide program logic for the top bar of a web page |
application-ui [name] | ProfileMenuBean.java | this class is meant to be used to provide program logic for the profile menu of a web page |
application-ui [name] | SouthBean.java | this class is meant to be used to provide program logic for the footer of a web page |
application-ui [name] | WestBean.java | this class is meant to be used to provide program logic for the sidebar menu of a web page |
Files for Web App Tests¶
Modeling | File Naming | Description |
---|---|---|
layout [name] | [Name]TestIT.java | These test classes inherit from abstract Selenium test classes that are available in web fragment components. This overwriting lets you use page classes with @Location annotations and test data in JSON files that are specific to your web application while re-using the test implementations from the web fragment components. |
test [name] | [Name]TestIT.java | These test classes inherit from abstract Selenium test classes that are available in web fragment components. This overwriting lets you use page classes with @Location annotations and test data in JSON files that are specific to your web application while re-using the test implementations from the web fragment components. |
layout [name] | [Name]Pages.java | These classes have inner classes that each nominates a URL to be used for testing. There is one inner class for each test that targets the same web page. |
layout [name] | [Name]TestInputData.json [Name]TestInputData_generated.json [Name]TestInputData_diff.json |
These files hold test data for form input in JSON format. The data in [Name]TestInputData.json can be manually modified/extended. Subsequent generations create the [Name]TestInputData_diff.json file that shows the differences between the generated and the manually modified file. |
test [name] | [Name]TestInputData.json [Name]TestInputData_generated.json [Name]TestInputData_diff.json |
These files hold test data for form input in JSON format. The data in [Name]TestInputData.json can be manually modified/extended. Subsequent generations create the [Name]TestInputData_diff.json file that shows the differences between the generated and the manually modified file. |
layout [name] | [Name]TestAssertData.json [Name]TestAssertData_generated.json |
These files hold test data in JSON format for asserts in test code. The data in [Name]TestAssertData.json can be manually modified/extended. |
test [name] | [Name]TestAssertData.json [Name]TestAssertData_generated.json |
These files hold test data in JSON format for asserts in test code. The data in [Name]TestAssertData.json can be manually modified/extended. |
Maven Build¶
Modeling | File Naming | Description |
---|---|---|
application [name] | pom.xml ⇒ This file can be manually modified. Any modifications will be preserved, except for XML comments and manual formatting. pom_generated.xhtml ⇒ the purely generated pom file, any changes to this file are going to be lost when regenerating |