Files and Directories
- Scripts and license file
- Views and themes (app)
- Configuration files (config)
- Logging (logs/)
Most App Studio customization is performed by editing Web resources or configuration files. This topic shows you where to find the files you need.
When you first install App Studio by unzipping the project archive, the
app-studio directory contains
The first time you start App Studio, an additional
logs subdirectory is created.
Scripts and license file
At the root level in the
app-studio directory, you’ll find these important files:
app-studio.sh- The Unix script for startup, shutdown, packaging and distribution.
app-studio-stop.bat- The Windows script for startup and shutdown.
twigkit.lic- Your App Studio license file.
Views and themes (
This directory contains all of the visual controls and assets that configure the behavior of your application and the display of its UI. You can read more about how to use these in Customizing Your Application.
This folder contains supporting downloadable assets like images.
In special cases, you can work in this directory to add functionality, for example by defining your own controllers.
This directory contains the files that control App Studio’s setup wizard. You should not modify the files in this directory.
Your application comes with a sample style. You can easily remove the style settings and set your own such as colors, fonts, and layout. Put any custom styling into
A view is a page template that contains all the directives needed to handle requests and display the responses. Views are created with flexible markup that makes it easy to connect to a data provider, choose what to display, and configure how to display it. Each view is automatically given a pretty URL.
search.html is the main search view. You can find the templates for the header and footer in
Configuration files (
To set up the minimum configuration needed to start using App Studio, see Getting Started.
The configuration files are organized by function or by module, as follows:
/config /activity /message /platforms /processors /security /services
These configuration files support hierarchical cascading of the files via the open-source Fig project.
This section describes the most important configuration files in the
Global configuration settings.
Cross-Origin Resource Sharing (CORS) configuration.
Specify Fusion platform settings.
Specify which Fusion query profile to use.
Configure the Fusion security realm.
The App Studio application looks up global settings from a
twigkit.conf configuration file that the application tries to locate relative to
config on the runtime classpath.
The path to the license file relative to the
"True" to trim white space in the application UI.
The number of milliseconds a resource bundle (for example, a file like
CORS or Cross-Origin Resource Sharing is a recent W3C effort to introduce a standard mechanism for enabling cross-domain requests from web browsers to servers that wish to handle them.
App Studio supports CORS filtering by default. You can control the options for the particular header attributes using the
cors.conf file at the root of the
Whitespace-separated list of origins that the CORS filter must allow. Requests from origins not included here will be refused with an HTTP 403 "Forbidden" response. If set to
List of the supported HTTP methods. These are advertised through the Access-Control-Allow-Methods header and must also be implemented by the actual CORS web service. Requests for methods not included here will be refused by the CORS filter with an HTTP 405 "Method not allowed" response.
Indicates whether user credentials, such as cookies, HTTP authentication or client-side certificates, are supported. The CORS filter uses this value in constructing the Access-Control-Allow-Credentials header.
Indicates how long the results of a preflight request can be cached by the web browser, in seconds. If -1 unspecified. This information is passed to the browser via the Access-Control-Max-Age header.
To make version control and specialization of configuration easier, the configuration is loaded hierarchically. For example, in the
/platforms directory are subdirectories for
/config /platforms /fusion /solr
/fusion folder is
/fusion/fusion.conf, which may contain the following general attributes:
name: twigkit.search.fusion.Fusion backwardsCompatible: true timeOut: 30000 resultIDField: id highlight: true defaultQuery: *:*
Within the same folder, you might find one or more configuration files which inherit or extend this one, such as
people.conf. To access a given configuration, use dot notation, such as
platforms.fusion.people. The configuration system will traverse the hierarchy (no matter how deep) and aggregate the configuration files, overwriting attributes from higher-level files when those attributes also appear in lower-level files.
For example, if
fusion.conf contains a
defaultQuery attribute and you create
internal.conf which also contains a
defaultQuery, then the value from
internal.conf is used. This allows you to create variations on the same platform configuration. You can then refer to any platform instance in other configuration files or in the platform tag:
<search:platform conf="platforms.fusion.internal" />
In this case App Studio will use the platform as configured centrally, irrespective of the search engine behind it, effectively abstracting the data provider from the view.
The configuration files can be placed outside of the application and centrally accessed by multiple instances.
To reference these in a different location, set the
twigkit.conf system property to the absolute file path of the
/conf folder, like this:
Adding special characters to key names in configuration files
To add special characters to key names in configuration files you need to escape the special characters. For example, if a key name contained a whitespace, such as
My key: value then you would need to escape the whitespace for the configuration to be correctly loaded. In this case, the correct syntax would be:
My\ key: value
This rule does not just apply to whitespace but any special character that you may wish to use within a key name.
logs/ directory contains an event log,
app-studio.log, which rolls over daily by default. Look here for diagnostic information to help with troubleshooting. This directory is created the first time you start App Studio.
Fusion Server also keeps event logs about Web apps, including App Studio apps, at