Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Code Block
languagexml
titleweb.xml (partial)
<!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <display-name>My Tapestry Application</display-name>
    <context-param>
        <param-name>tapestry.app-package</param-name>
        <param-value>org.example.myapp</param-value>
    </context-param>
    <filter>
        <filter-name>app</filter-name>
        <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
        <!-- Or org.apache.tapestry5.http.TapestryFilter if you're using tapestry-http without tapestry-core -->
    </filter>
    <filter-mapping>
        <filter-name>app</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>



Wiki Markup
{float:right|width=30%|background=#eee}
{color:#539126}*Tapestry Requests vs. Container Requests*{color}

The Tapestry filter matches all the requests that apply to Tapestry, and passes the rest off to the servlet container. In situations where there would be a naming conflict, actual files inside the web application take precedence over Tapestry pages.

Tapestry recognizes the _root URL_, where the servlet path is simply "/", and renders the application page "Index", if it exists.
{float}

The application-specific part, the tapestry.app-package context parameter, provides your application's root package name. Tapestry uses this to locate your page and component classes. It expects page classes in the pages sub-package and components in the components sub-package. In the example above, page classes will be stored in the org.example.myapp.pages package (or in sub-packages below). Likewise, component classes will be stored in the org.example.myapp.components package.

...

tapestry.application-version

 
Since
since5.4

SymbolConstants.APPLICATION_VERSION – The version of the application, which is incorporated into URLs for context and classpath assets in Tapestry versions prior to 5.4. Assets may be compressed, and will have far-future expiration headers; they will be aggressively cached by the client web browser. You should change the application version on each new deployment of the application (that is, any time assets in the context change), to force clients to re-download changed versions of files. If you do not specify an application version, a random one will be assigned on every deployment (which is good for development but very bad for production).

tapestry.application-folder

 
Since
since5.3

SymbolConstants.APPLICATION_FOLDER – The folder, of the context, in which the Tapestry application executes. By default this is blank, meaning the Tapestry application executes in the root of the web application context. Setting this value allows the Tapestry application to be segregated into a folder, which can be useful when Tapestry is executed inside a web application with other servlets or filters.

tapestry.asset-url-fully-qualified

 
Since
since5.3

SymbolConstants.ASSET_URL_FULL_QUALIFIED – A boolean value to indicate whether asset URLs should be fully qualified in the rendered page. This defaults to false (not fully qualified).

tapestry.asset-path-prefix

 
Since
since5.3.1

SymbolConstants.ASSET_PATH_PREFIX – The prefix to be used for all asset paths. This should start and end with a slash ("/"). By default this is "/assets/".

...

SymbolConstants.BLACKBIRD_ENABLED – A flag (true or false). When "false" the Blackbird JavaScript console will be disabled (in Tapestry 5.2 and newer). Defaults to "true".

Deprecated
since5.3
The client-side BlackBird console has been removed.


tapestry.bootstrap-root

 
Since
since5.4

SymbolConstants.BOOTSTRAP_ROOT – The root asset path for Twitter Bootstrap; if your application uses a modified version of Bootstrap, you can override this symbol to have Tapestry automatically use your version. The value should be a path to a folder (under "classpath:" or "context:") and should not include a trailing slash.

tapestry

...

.font-awesome-root

Since
since5.5.0

SymbolConstants.CHARSETFONT_AWESOME_ROOT – The root asset path for FontAwesome; if your application uses a modified version of it, you can override this symbol to have Tapestry automatically use your version. The value should be a path to a folder (under "classpath:" or "context:") and should not include a trailing slash.

tapestry.charset

SymbolConstants.CHARSET – The character encoding used when generating output  – The character encoding used when generating output (or parsing input). The default is "UTF-8". See Content Type and Markup for more details.

tapestry.clustered-sessions

 
Since
since5.3

SymbolConstants.CLUSTERED_SESSIONS – If "true" then at the end of each request the SessionPersistedObjectAnalyzer will be called on each session persisted object that was accessed during the request. The default is "true", to preserve 5.2 behavior. For non-clustered applications (the majority), this value should be overridden to "false".

...

tapestry.compact-json

 
Since
since5.2

SymbolConstants.COMPACT_JSON – If "true", then JSON page initialization content is compressed; if "false" then extra white space is added (pretty printing). Defaults to "true" in production mode.

tapestry.compatibility.unknown-component-id-check-enabled

 
Since
since5.3


 
Deprecated
since5.3

SymbolConstants.UNKNOWN_COMPONENT_ID_CHECK_ENABLED – When enabled, Tapestry will check that component ids referenced in event handler method names (or the @OnEvent annotation) match up against components in the container's template. The default is true, but applications upgraded form Tapestry 5.2 may want to set this to false, to keep pages from failing due to the presence of such dead code.

...

tapestry.module-path-prefix

 
Since
since5.4

SymbolConstants.MODULE_PATH_PREFIX – Prefix used for all module resources. This may contain slashes, but should not being begin or end with one. Tapestry will create two Dispatchers from this: one for normal modules, the other for GZip compressed modules (by appending ".gz" to this value).

tapestry.context-path

Since
since5.4
 

SymbolConstants.CONTEXT_PATH – Identifies the context path of the application, as determined from ServletContext.getContextPath() method. This is either a blank string or a string that starts with a slash but does not end with one.

tapestry.datepicker

Since
since5.2
 

SymbolConstants.DATEPICKER – The path to the assets of the embedded DatePicker component

...

tapestry.default-stylesheet

 
Since
since5.3.6

SymbolConstants.DEFAULT_STYLESHEET – In 5.3, this is the default stylesheet automatically injected into every rendered HTML page. Many Tapestry components assume that this stylesheet is available. All the classes defined in the stylesheet are prefixed with "t-". The exact contents of the stylesheet are subject to change at any time (they are considered internal), so replacing the stylesheet, rather than overriding selected rules within it, entails some risk.

The default is org/apache/tapestry5/default.css, stored on the classpath.

...

Deprecated in 5.4

...

with no replacement. The stylesheet is now associated with the core JavaScriptStack.

Undeprecated in 5.5.0. The stylesheet defined by this symbol is needed when Tapestry is configured to not include Bootstrap at all.

tapestry.

...

error-

...

css-

...

class

Since
since5.

...

.5

SymbolConstants.ENABLEERROR_HTML5_SUPPORT – CSS_CLASS – Defines the CSS class that will be given to the HTML element generated by the Error component. If the value isn't help-block, the class attribute
will be help-block [symbol value]. The default value is help-block.

tapestry.enable-html5-support


Since
since5.4

SymbolConstants.ENABLE_HTML5_SUPPORT – If "true", then certain HTML5 features are invoked by built-in Tapestry components. Mostly this controls whether the TextField component If "true", then certain HTML5 features are invoked by built-in Tapestry components. Mostly this controls whether the TextField component will emit HTML5 "type" attributes automatically when certain validators are used. See Forms and Validation for details. The default is false.

...

tapestry.enable-minification

Since
since5.3.6
 

SymbolConstants.MINIFICATION_ENABLED – If "true", then resources (individually or when aggregated into stacks) will be minimized via the ResourceMinimizer service. If "false", then minification is disabled. The default is "true" in production mode, "false" otherwise.

...

tapestry.enable-pageloading-mask

 
Since
since5.4

SymbolConstantsaENABLE_PAGELOADING_MASK – If true, then when a page includes any JavaScript, a <script> block is added to insert a pageloader mask into the page to ensure that the user can't interact with the page until the page is fully initialized. The default is true.

...

tapestry.exception-reports-dir


Since
since5.4

...


SymbolConstants.EXCEPTION_REPORTS_DIR – The root directory where Tapestry's built-in OperationTracker will create dated folders into which it writes exception report files. This is build/exceptions by default but should be overridden for production. See the related tapestry.restrictive-environment symbol below.

...

tapestry.hostname

Since
since5.3
 

SymbolConstants.HOSTNAME – The hostname that application should use when constructing an absolute URL. The default is "", i.e. an empty string, in which case system will use request.getServerName(). Not the same as environment variable HOSTNAME (but you could contribute "$HOSTNAME" as the value to make it the same).

tapestry.hostport

Since
since5.3
 

SymbolConstants.HOSTPORT – The port that application should use when constructing an absolute URL. The default is "0", which means to use the port value from the request.

tapestry.hostport-secure

Since
since5.3
 

SymbolConstants.HOSTPORT_SECURE – The secure (https) port that application should use when constructing an absolute URL. The default is "0", i.e. use the value from the request.

tapestry.hmac-passphrase

Since
since5.3.6
 

SymbolConstants.HMAC_PASSPHRASE – The plaintext phrase used to set the key for HMAC securing of serialized object data. The default is blank, which causes a runtime alert and console error. You should set this to a reasonably unique, private value, and ensure (in a cluster) that all servers use the same value – typically by making a contribution in your applications module class (normally AppModule.java). See Security for details.

tapestry.include-core-stack

 
Since
since5.4

SymbolConstants.INCLUDE_CORE_STACK – Whether to include Tapestry's "core" stack of JavaScript libraries. The default is "true".

tapestry.javascript-infrastructure-provider

 
Since
since5.4

SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER – Tapestry relies on an underlying client-side JavaScript infrastructure framework to handle DOM manipulation, event handling, and Ajax requests. Prior to Tapestry 5.4, the foundation was Prototype. In 5.4 and later, support for jQuery has been added, and it is possible to add others. This symbol defines a value that is used to select a resource that is provided to the ModuleManager service as a JavaScriptModuleConfiguration to provide a specific implementation of the t5/core/dom module. Tapestry 5.4 directly supports "prototype" or "jquery". To support other foundation frameworks, override this symbol value and supply your own module configuration.

...

tapestry.lenient-date-format

 
Since
since5.4

SymbolConstants.LENIENT_DATE_FORMAT – When set to true, the DateField component will be lenient about date calculations, for example allowing a January 32 date as input and automatically converting it to February 1. When false (the default), only valid dates may be entered.

...

tapestry.page-preload-mode


Since
since5.4

...


SymbolConstants.PRELOADER_MODE – Controls in what environment page preloading should occur. By default, preloading only occurs in production. Possible values are "ALWAYS", "DEVELOPMENT", "NEVER", or "PRODUCTION" (the default is PRODUCTION when in production mode, or DEVELOPMENT otherwise). See PreloaderMode.

...

tapestry.restrictive-environment


Since
since5.4

 SymbolConstants.RESTRICTIVE_ENVIRONMENT – A flag (true or false) that, if true, changes some default Tapestry behavior to make it work better in restrictive environments such as Google App Engine (GAE). Specifically, if true, then OperationsTracker writes its exception report files into a single folder (specified by the tapestry.exception-reports-dir symbol, above) rather than creating dated sub-folders under that path, and ResourceTransformerFactory avoids creating a cache folder for resources.

...

tapestry.service-reloading-enabled

Since
since5.2
 

If true (the default), then Tapestry IoC will attempt to reload service implementations when they change. This only applies to classes that Tapestry IoC instantiates itself, and have a known service interface (the container creates a proxy that, internally, can reload the implementation). Service reloading only works when the underlying class files are on the filesystem ... it is intended for development, not as an option in production.

...

tapestry.scriptaculous

Since
5.2
sincesince 5.2
 

SymbolConstants.SCRIPTACULOUS – The path to the embedded copy of script.aculo.us packaged with Tapestry. This value may be overridden to use a different version of the script.aculo.us library. See Legacy JavaScript for the default version.

tapestry.session-locking-enabled

Since
since5.4
 

SymbolConstants.SESSION_LOCKING_ENABLED – If true (the default), then Tapestry will use a lock when reading/updating HttpSession attributes, to avoid simultaneous access by multiple threads when using AJAX. See TAP5-2049. Set to false to deactivate the session locking logic.

...

The default is (currently) "en,it,es,zh_CN,pt_PT,de,ru,hr,fi_FI,sv_SE,fr_FR,da,pt_BR,ja,el". As the community contributes new localizations of the necessary messages files, this list will expand. Note that the Tapestry quickstart archetype overrides the factory default, forcing the application to be localized only for "en".,da,pt_BR,ja,el". As the community contributes new localizations of the necessary messages files, this list will expand. Note that the Tapestry quickstart archetype overrides the factory default, forcing the application to be localized only for "en".

tapestry.cors-enabled

SymbolConstants.CORS_ENABLED – Defines whether the CORS (Cross-Origing Resource Sharing) support should be enabled or not. Default value is false. If you set this to true,
you should also set at least Symbol.CORS_ALLOWED_ORIGINS too.

Since
since5.8.2

tapestry.cors-allowed-origins

SymbolConstants.CORS_ALLOWED_ORIGINS – Comma-delimited of origins allowed for CORS. The special value * means allowing all origins.  This is used by the default implementation of CorsHandlerHelper.getAllowedOrigin(HttpServletRequest). Default value is the empty string (i.e. no origins allowed and CORS actually disabled).

Since
since5.8.2

tapestry.cors-allow-credentials

SymbolConstants.CORS_ALLOW_CREDENTIALS – Boolean value defining whether the Access-Control-Allow-Credentials HTTP header should be set automatically in the response for CORS requests. Default value is false. This is used by the default implementation of CorsHandlerHelper.configureCredentials(HttpServletResponse).

Since
since5.8.2

tapestry.cors-allow-methods

SymbolConstants.CORS_ALLOW_METHODS – Value to be used in the Access-Control-Allow-Methods in CORS preflight request responses. This is used by the default implementation of CorsHandlerHelper.configureMethods(HttpServletResponse). Default value is GET,HEAD,PUT,PATCH,POST,DELETE.

Since
since5.8.2

tapestry.cors-allowed-headers

SymbolConstants.CORS_ALLOWED_HEADERS – Value to be used in the Access-Control-Allow-Headers in CORS preflight request responses. This is used by the default implementation of CorsHandlerHelper.configureAllowedHeaders(HttpServletResponse), which only sets the header if the value isn't empty. Default value is the empty string.

Since
since5.8.2

tapestry.cors-expose-headers

SymbolConstants.CORS_EXPOSE_HEADERS – Value to be used in the Access-Control-Expose-Headers in CORS preflight request responses. This is used by the default implementation of CorsHandlerHelper.configureExposeHeaders(HttpServletResponse), which only sets the header if the value isn't empty. Default value is the empty string.

Since
since5.8.2

tapestry.cors-max-age

SymbolConstants.CORS_MAX_AGE – Value to be used in the Access-Control-Max-Age in CORS preflight request responses. This is used by the default implementation of CorsHandlerHelper.configureMaxAge(HttpServletResponse), which only sets the header if the value isn't empty. Default value is the empty string.

Since
since5.8.2

tapestry.suppress-redirect-from-action-requests

...

At this time, it is still not possible to run multiple Tapestry 5 applications within the same web application.


Scrollbar