DistributionThe Jucas distribution contains the following things: JUCAS_HOME/ (the directory you unzipped jucas to) |--- src/ (the source-code) |--- docs/ (all the documentation) |--- jucas[version].jar (the jucas jar file) |--- jucas.war (the war file which contains the samples, all the jars jucas depends. The war file also represents the default Jucas setup) |--- LICENSE.txt |--- README.txt Just unzip the distribution to a directory of your choice. Installation of ExamplesIf you just want to run the examples than just deploy the jucas.war file in the distribution in your web-container. For tomcat this means normally just to copy it to the webapps directory. Than point your bowser to the index.html file. Installation of a new Jucas ProjectIf you want to start a new Jucas project the easiest way is to unzipp the jucas.war file to a new directory and to remove everything except the WEB-INF directory and its content ( that are all the example template files). If you do not use Freemarker or JSP as your templating engine than you will also have to change the web.xml file. The default web-xml file of Jucas already contains a servlet which will read Freemarker templates like JSPs directly from the web-app (without the need of further configuration). After this you code your Jucas components and put them either in a jar in the WEB-INF/lib directory or as classes in the WEB-INF/classes directory (like always in web-applications). And than you make the view-templates. When you have finished the project make a war file and deploy it. Installing and Integrating Jucas with an existing web-appIntegrating Jucas with an existing web-app demands three steps: include the jucas.jar file and its dependences in the WEB-INF/lib directory, make a certain directory structure in the WEB-INF directory and update the web.xml file. There is no need for further configuration. For all this you will also first unzip the jucas.war file to a new directory. Than you just copy everything from the the jucas.war files WEB-INF/lib directory to the lib directory of your web-app. The directory structure jucas needs in the WEB-INF directory can also be copied from the jucas.war file. Explicitly it is: /WEB-INF/jucas |-- /config |-- /resources |-- /beans |-- /services All the directories are empty. Last you have to modify the web.xml file to include the following (This is also the full content of the web.xml in the jucas.war file). <!-- The JucasFilter will make the Jucas framework available to everything which is executed under this filter. --> <filter> <filter-name>JucasFilter</filter-name> <filter-class>org.jucas.impl.JucasFilter</filter-class> </filter> <!-- by default Jucas should be available in the whole webapp therefore we filter every request. However you may restrict this --> <filter-mapping> <filter-name>JucasFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- the mandatory ContextListener used by Jucas--> <listener> <listener-class>org.jucas.JucasContextListener</listener-class> </listener> <!-- Freemarker uses this listener --> <listener> <listener-class>freemarker.ext.jsp.EventForwarding</listener-class> </listener> <!-- Through this servlet Freemarker templates can be used as jsps. Freemarker is used as a 'standard' templating machine by Jucas. Note: it is only there so that components may rely on it. Components are not demanded to use it, nor does Jucas use or refer to it in any way. --> <servlet> <servlet-name>freemarker</servlet-name> <servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class> <!-- FreemarkerServlet settings: --> <init-param> <param-name>TemplatePath</param-name> <param-value>/</param-value> </init-param> <init-param> <param-name>NoCache</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>ContentType</param-name> <param-value>text/html</param-value> </init-param> <!-- FreeMarker settings: --> <init-param> <param-name>template_update_delay</param-name> <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. --> </init-param> <init-param> <param-name>default_encoding</param-name> <param-value>ISO-8859-1</param-value> </init-param> <init-param> <param-name>number_format</param-name> <param-value>0.##########</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>freemarker</servlet-name> <url-pattern>*.ftl</url-pattern> </servlet-mapping> <!-- taglib can be used to get Jucas components from the ViewHelper --> <taglib> <taglib-uri> http://www.jucas.org/taglib </taglib-uri> <taglib-location> /WEB-INF/taglib.tld </taglib-location> </taglib> |