Often application servers have very convoluted batch files/scripts for
launching, and hacking these to add Tapestry system properties is last thing
you want to do.
Here is a neat way (well I think so) of configuring these properties using
an application specification extension bean.
Add the extension element to you application specification and add the
TapestryPropertiesSetter class.
The extentions element in specification, initializes the
TapestryPropertiesSetter bean and sets the configuration properties when the
application loaded.
Configuring Assets to an external directory can make a big difference to
performance.
regards Malcolm
-------------------------------
<extension name="sys-props" class="com.mycorp.TapestryPropertiesSetter"
immediate="yes">
<configure property-name="disableCaching"
type="boolean">true</configure>
<configure property-name="assetDir"
type="String">C:/java/jakarta-tomcat-4.1.18/webapps/tutorial/asset</configure>
<configure property-name="assetURL" type="String">asset</configure>
</extension>
-------------------------------
package com.mycorp;
public class TapestryPropertiesSetter
{
public void enableResetService(boolean enableReset)
{
System.setProperty("net.sf.tapestry.enable-reset-service", "" +
enableReset);
}
public void setDisableCaching(boolean disableCaching)
{
System.setProperty("net.sf.tapestry.disable-caching", "" +
disableCaching);
}
public void setAssetDir(String assetDir)
{
System.setProperty("net.sf.tapestry.asset.dir", assetDir);
}
public void setAssetURL(String assetURL)
{
System.setProperty("net.sf.tapestry.asset.URL", assetURL);
}
}
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*
http://join.msn.com/?page=features/virus
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
- Re: [Tapestry-developer] Configuring Tapestry propert... Malcolm Edgar
- Re: [Tapestry-developer] Configuring Tapestry pr... Howard M. Lewis Ship
- [Tapestry-developer] Configuring Tapestry proper... Malcolm Edgar
