2.5.0

Context Configuration#

ztemplates has a series of configuration settings. The setting are accessed by ztemplates with servletContext.getInitParameter(), so read your appserver docu for where to place them.

In tomcat the best place is the context file


<Context ...>
	<Parameter name="ztemplates.devMode" value="true"/>
	<Parameter name="ztemplates.devMode.html.comments" value="true"/>
	<Parameter name="ztemplates.velocity.nocache" value="true"/>
	<Parameter name="ztemplates.zscript.merge" value="true"/>
	<Parameter name="ztemplates.url.prefix.https" value="https://www.yourdomain.tld"/>	
	<Parameter name="ztemplates.url.prefix.http" value="http://www.yourdomain.tld"/>	
</Context>

Parameters#

ztemplates.devMode#

if true enables the ztemplates dev mode.


<Context ...>
	<Parameter name="ztemplates.devMode" value="true"/>
</Context>

Disables as many internal caches as possible to support tools like JRebel for no redeploy

Makes available the following urls

  • /ztemplates/devMode/refresh to refresh most cached data, like url match tree
  • /ztemplates/devMode/actions to show actions and matched urls

ztemplates.devMode.html.comments#


<Context ...>
	<Parameter name="ztemplates.devMode.html.comments" value="true"/>
</Context>

if true ztemplates will create comments in text/html output to show the pojo structure. Use carefully, could create problems with nested html-comments.

ztemplates.url.prefix.https #


<Context ...>
	<Parameter name="ztemplates.url.prefix.https" value="https://www.yourdomain.tld"/>	
</Context>

If set the value is prepended to your url when creating urls to action pojos annotated with @ZSecure with ZIActionService.createUrl(pojo).

zemplates.url.prefix.http #


<Context ...>
	<Parameter name="ztemplates.url.prefix.http" value="http://www.yourdomain.tld"/>	
</Context>

If set the value is prepended to your url when creating urls to action pojos with ZIActionService.createUrl(pojo). If the action-pojo is annotated with @ZSecure ztemplates will use the property ztemplates.url.prefix.https

ztemplates.velocity.nocache#

If true will disable the velocity cache, even if cache is enabled in velocity.properties. If you use this you can use the same velocity.properties deployment for dev and prod environments.


<Context ...>
	<Parameter name="ztemplates.velocity.nocache" value="true"/>
</Context>

ztemplates.zscript.merge#

If true ztemplates merges the zscript scripts into one.


<Context ...>
	<Parameter name="ztemplates.zscript.merge" value="true"/>
</Context>

Neuen Anhang hinzuf�gen

Du bist nicht autorisiert, Anh�nge zu dieser Seite hochzuladen.
« Diese Seite (Version-) wurde zuletzt am 29-Dez-2011 14:03 von gerdziegler.de ge�ndert.