The home directory is the root directory for the runtime directory structure used by Pineapple. The directory structure contains:
Two examples are included:
The unzipped client contains the directory layout:
pineapple-web-application-VERSION.war
|
+--- META-INF
|
+--- WEB-INF
| +--- classes
| | +--- stufff
| |
| +--- images
| | +--- stufff
| |
| +--- jsp
| | +--- stufff
| |
| +--- lib
| | +--- stufff
| |
| +--- log4j
| | +--- stufff
| |
| +--- spring
| | +--- stufff
| |
| |--- web.xml
|
The home directory is configured in the web.xml file where it is defined by the context parameter pineapple.home.dir.
web.xml looks something like this;
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Pineapple web application</display-name>
<!-- Configures the pineapple.home.dir system property, used by the PineappleHomeInitializer class -->
<context-param>
<param-name>pineapple.home.dir</param-name>
<param-value>${user.home}/.pineapple</param-value>
</context-param>
<!-- Initialization of the Pineapple Home directory -->
<listener>
<description>ServletContextListener which initiates the Pineapple Home directory.</description>
<listener-class>com.alpha.pineapple.web.context.PineappleHomeInitializer</listener-class>
</listener>
.......
The home directory is defined by the property:
<!-- Configures the pineapple.home.dir system property, used by the PineappleHomeInitializer class -->
<context-param>
<param-name>pineapple.home.dir</param-name>
<param-value>${user.home}/.pineapple</param-value>
</context-param>
The value of the home directory is resolved from the JVM system property user.home which defines the Home directory for the current user.