Skip to content

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 [name] faces-config.xml This file holds information about exception handlers, message properties and self-made JSF components
application [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 [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 [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 [name] index.html simple HTML page that can be used to check whether the web application really is available on the server
application [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 [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 [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. Also, it provides information about the number of components on the page and a p:selectBooleanCheckbox to enable the display of additional information for developers (mainly through tooltips).
application [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 [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 [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].

Files for Web App Tests

Modeling File Naming Description
test [name] [Name].java These classes let you overwrite Selenium tests 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.
test [name] [Name]InputData.json
[Name]InputData_generated.json
[Name]InputData_diff.json
These files hold test data for form input in JSON format. The data in [Name]InputData.json can be manually modified/extended. Subsequent generations create the [Test]InputData_diff.json file that shows the differences between the generated and the manually modified file. Please note that the generation implicitly creates one test model element for each web page, so you get JSON files generated even when you do not have any test modeled yourself.
test [name] [Name]AssertData.json
[Name]AssertData_generated.json
These files hold test data in JSON format for asserts in test code. The data in [Name]AssertData.json can be manually modified/extended. Please note that the generation implicitly creates one test model element for each web page, so you get JSON files generated even when you do not have any test modeled yourself.