Trifork Application Server, which is included in CMS Fiona, can not only be used for serving the Java Server Pages of the HTML user interface but also for static web pages. This means that the files exported by the Template Engine can be displayed without using a webserver. Proceed as follows to configure the Trifork server correspondingly:
First, create a new web application directory named Export
:
cd instance/myInstance/webapps mkdir Export cd Export mkdir WEB-INF mkdir META-INF
In the WEB-INF
directory create the file
web.xml
and place the following content into it:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <display-name>NPSExport</display-name> <mime-mapping> <extension>html</extension> <mime-type>text/html;charset=UTF-8</mime-type> </mime-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
Into the META-INF
directory, place the file
trifork-app-conf.xml
containing the following:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE trifork-app-conf PUBLIC '-//Trifork Technologies//DTD Trifork Application Descriptor1.0//EN' 'http://trifork.com/j2ee/dtds/trifork-app-conf_1_0.dtd'> <trifork-app-conf> <role-mapping /> <web-app> <display-name>NPSExport</display-name> <context-root>/NPS/Export</context-root> </web-app> </trifork-app-conf>
Furthermore, place the file Export.map
containing the following into the current directory NPS~/instance/default/webapps/Export
:
<?xml version="1.0"?> <jar name="NPSExport.war"> <dir path="WEB-INF" from="/opt/Infopark/NPS/instance/default/webapps/Export/WEB-INF"/> <dir path="META-INF" from="/opt/Infopark/NPS/instance/default/webapps/Export/META-INF"/> <dir path="" from="/opt/Infopark/NPS/instance/default/export/online/docs" /> </jar>
If you did not install Fiona into the /opt/Infopark/NPS
directory, please adapt the paths in the file above.
Then execute the following command in a shell to make the files in the Export directory available as a web application (the following two lines are one command line, not two):
TriforkInstallDir/domains/default/bin/trifork archive deploy -uadministrator -padminPassword -inplace default Export.map
The default password of the Trifork administrator is
trifork
. After the command has been executed successfully, you
can access your exported content using the following URL:
http://mein.npsserver:8080/NPS/Export
Instead of my.npsserver
provide your CMS host name. If the
page index.html
can not be found, please make sure that the
Template Engine has been integrated
properly and that the user runnig the Trifork server has read access to
the export directory of the Template Engine.