Frequently Asked Questions
- How do I enable the Html-cache?
- What is the Html-cache?
- How do I enable cross publishing?
- How to start a new service without restarting Escenic?
- Why can not ece_frontpage be used as home section for an article?
- Can I define multiple servers in config.properties for studio?
- Is it possible to combine two fields?
- How do I create a PAR (Publication ARchive) file?
- How do I create a correctly nested Menu of <ul /> tags with the View …
- How do I get Content Studio up and running on my Linux distro?
- How do I turn off a cache?
How do I enable the Html-cache?
NB!(Pre Escenic 4.3)
* The html cache service has to be started (on one server if in a cluster). To start the service, the component called /neo/io/services/HtmlCache has a property called htmlCacheEnabled, which is by default switched on. In a multi server environment, it should therefore be switched off on all servers except one, to avoid conflicts when writing the same file.
* The server needs write permission to section directories, in order to write/delete the index.html file.
* "[[x] html cache" in the section editor will now work.
What is the Html-cache?
The HTML Cache is a poor mans web cache. It is a service which listens to events which indicate that a section page has changed, and issues a HTTP request to itself, and stores the resulting HTML page as the file 'index.html' in the same directory as 'index.jsp'.
Effectively, this makes web requests for index pages very efficient, since some front pages are accessed several thousand times for every update.
Updates are not done instantly; they are queued. The queue of sections is available in the Component Browser under /neo/io/managers/[SectionManager?], under the property queueOfSections. This queue will include all sections, not just the ones with HTML caching enabled; All updates to any sections will put the section in the queue. When the queue is serviced (the queue is serviced after a three-second grace period), the section is checked for its htmlcache=true|false flag, and if the flag is true, the html cache is updated.
The html cache is updated via a simple HTTP GET request to the page, passing the userid / password as specified by the 'htaccess.user' and 'htaccess.password Publication feature
If using a Web Cache of some sort, the HTML cache itself is probably superflous.
How do I enable cross publishing?
Cross publishing is the possibility of showing an article in the context of a section different than its home section. Cross publishing may also be done across publications. There is a CrossPublishing available.
How to start a new service without restarting Escenic?
Just call it in the Component browser. Say you've added "service.123=/my/service".
You could just browse to the component browser: /browser/my/service
http://your.server:8080/admin/browser/my/Service
Why can not ece_frontpage be used as home section for an article?
It can :)
See howto on this page: PublicationFeatures
Can I define multiple servers in config.properties for studio?
Yes you can, but I would use studio.xml (Only up to version 4.1-6 and 4.2-1. Doesn't make sense in 4.3-1 and later since it is using Java Web Start)!
Just create a file called studio.xml in your Escenic Content Studio installation directory. Edit as wanted.
<!-- Studio.xml -->
<studio>
<server>
<name>Testserver</name><!-- the visible name of the server. This is what's displayed in lists-->
<rmi>rmi://test.example:8123/neo/rio/RIOAccessImpl</rmi><!-- the old rmiserver property -->
<script>m = new Packages.com.css.rmi.ClientTwoWaySocketFactory(); m.establishSignallingChannel("test.example",8123); m;</script>
</server>
<server>
<name>Local</name>
<rmi>rmi://localhost:8123/neo/rio/RIOAccessImpl</rmi>
<script></script>
<reloginScript></reloginScript>
</server>
</studio>
<!-- end Studio.xml -->
Is it possible to combine two fields?
Yes it is! You can do this with a PresentationArticleDecorator?.
See howto on this page: [LocationContentDecorator]
How do I create a PAR (Publication ARchive) file?
The easiest way to create a PAR is to use the help of ant.
This is a simple introduction by ways of a sample ant target
<target name="dist-template" depends="compile" description="creates a distribution PAR file">
<fail unless="common.dir">
Please set the property 'common.dir' to where you have your common templates.
Please see 'build.xml.template' for example on how to do it...
</fail>
<echo taskname="${ant.project.name}">Creating par file from location: ${common.dir}</echo>
<property name="releasenumber" value="interim" />
<property name="par.file" location="${dist}/escenic-${component.name}-${component.version}.${releasenumber}.par" />
<delete file="${par.file}" />
<jar jarfile="${par.file}" compress="true" >
<zipfileset dir="${common.dir}">
<include name="template/**" />
<include name="WEB-INF/articleTypes.xml" />
<include name="WEB-INF/layouts.xml" />
<include name="WEB-INF/imageVersions.xml" />
<include name="WEB-INF/struts-config.xml" />
<include name="WEB-INF/xslt/**.xsl" />
<include name="WEB-INF/article-template.jsp" />
<include name="WEB-INF/index-template.jsp" />
<include name="WEB-INF/features.properties" />
<exclude name="**/*.*.bak" />
</zipfileset>
<zipfileset prefix="WEB-INF/classes/" dir="classes/">
<!--<include name="com/escenic/projects/apressen/apiskatt/*.*" />-->
<include name="com/escenic/projects/apressen/taglib/*.*" />
</zipfileset>
<zipfileset dir="pubs/www.blueprint.no/">
<include name="section.properties" />
<include name="WEB-INF/menu.xml" />
</zipfileset>
</jar>
<copy file="${par.file}" todir="${pars.dir}" />
</target>
This should be a good starting point.
How do I create a correctly nested Menu of <ul /> tags with the View library
For starts you can have a look at CreatingAMenu
How do I get Content Studio up and running on my Linux distro?
Most often you will need to comment out these to lines in the studio file:
LD_ASSUME_KERNEL=2.2.5 export LD_ASSUME_KERNEL
How do I turn off a cache?
Escenic's caches are defined in the component browser. The 'util:cache' tag for example caches its stuff to a component called JspCache?. If you want to disable the cache you can do this by telling that cache not to cache anything.
This can be done by changing the component
/neo/io/content/cache/JspCache
The cache can be turned off in one of the following ways:
* The cache will only hold objects for a very short time; e.g. 4 seconds:
validSeconds = 4
* The cache will never return any objects by setting it to -2:
validSeconds = -2
