Introduction to the OpenCms application structure and tools
Cschoenfeld (Talk | contribs) (Updated section on runtime structure, added section with information on the VFS structure) |
Cschoenfeld (Talk | contribs) (Improved structure and addes section on the VFS structure) |
||
Line 2: | Line 2: | ||
OpenCms stores all content in the VFS, the Virtual File System, which is actually stored in the database. The structure you can see in the Explorer view does not exist on the RFS (real file system, your disk). | OpenCms stores all content in the VFS, the Virtual File System, which is actually stored in the database. The structure you can see in the Explorer view does not exist on the RFS (real file system, your disk). | ||
− | For performance reasons, content can be exported from the VFS to the RFS, and mostly to support development, | + | For performance reasons, content can be exported from the VFS to the RFS, and mostly to support development, VFS content can be synchronized with the RFS. See the section on [[RFS_Synchronization|RFS Synchronization]]. |
− | == | + | == Structure of the OpenCms web application == |
+ | === Initial Structure === | ||
When you unpack the binary distribution (ZIP file) of OpenCms you find the file opencms.war. This file contains the initial set of files required for the setup of OpenCms as well as the files for running OpenCms. | When you unpack the binary distribution (ZIP file) of OpenCms you find the file opencms.war. This file contains the initial set of files required for the setup of OpenCms as well as the files for running OpenCms. | ||
Line 76: | Line 77: | ||
</table> | </table> | ||
− | == Runtime structure | + | === Runtime structure === |
OpenCms requires the servlet container to unpack the WAR file or, if the container does not support this, requires you to deploy OpenCms from an unpacked WAR file. The unpacked deployment is required because OpenCms needs to write to the web application directory from which it is run. | OpenCms requires the servlet container to unpack the WAR file or, if the container does not support this, requires you to deploy OpenCms from an unpacked WAR file. The unpacked deployment is required because OpenCms needs to write to the web application directory from which it is run. | ||
Line 90: | Line 91: | ||
<tr> | <tr> | ||
<td><tt>export/</tt></td> | <td><tt>export/</tt></td> | ||
− | <td>Contains all statically exported files. | + | <td>Contains all statically exported files.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 100: | Line 101: | ||
OpenCms creates these folders in order to speed up access to those often needed files. | OpenCms creates these folders in order to speed up access to those often needed files. | ||
− | If you start editing content with OpenCms you will notice that you cannot find | + | If you start editing content with OpenCms you will notice that you cannot find the files you see in the Explorer view anywhere on the disk. This is because OpenCms stores all content within its the VFS. |
+ | |||
+ | == Structure of the VFS == | ||
+ | |||
+ | After installation you can find a structure as follows: | ||
+ | |||
+ | <table border="1"> | ||
+ | <tr> | ||
+ | <th>File/Folder</th> | ||
+ | <th>Explanation</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>sites/default</tt></td> | ||
+ | <td>Contains the index.jsp and other documentation accessible by default if you point your browser to the OpenCms context URL (default is: [http://localhost/opencms]).</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/galleries</tt></td> | ||
+ | <td>Download, Image, Link, and Table galleries.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/handler</tt></td> | ||
+ | <td>Pages for HTTP response codes 404 and 500.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/login</tt></td> | ||
+ | <td>Login page.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/lost-found</tt></td> | ||
+ | <td>This is (probably) the place where the OOCE integrity check module (available as an extension for money) puts invalid files and folders it finds during check runs in the VFS.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/modules</tt></td> | ||
+ | <td>Contains all installed modules.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/shared</tt></td> | ||
+ | <td>TODO</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><tt>system/workplace</tt></td> | ||
+ | <td>The JSP files, buttons, icons and other files used by OpenCms to create its user interface: the Explorer, the Administration and the Workflow interfaces.</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | You can customize all files within the VFS, even the system files which are used by OpenCms itself to render its user interface. Of course, you should be very careful about making changes to system files it can break your system. |
Revision as of 22:14, 1 November 2006
Contents |
RFS and VFS
OpenCms stores all content in the VFS, the Virtual File System, which is actually stored in the database. The structure you can see in the Explorer view does not exist on the RFS (real file system, your disk).
For performance reasons, content can be exported from the VFS to the RFS, and mostly to support development, VFS content can be synchronized with the RFS. See the section on RFS Synchronization.
Structure of the OpenCms web application
Initial Structure
When you unpack the binary distribution (ZIP file) of OpenCms you find the file opencms.war. This file contains the initial set of files required for the setup of OpenCms as well as the files for running OpenCms.
Following are the directories within opencms.war along with explanations of their meaning.
File/Folder | Explanation |
---|---|
META-INF/ | The place for the Manifest. There is nothing you can tune here. |
setup/ | This folder contains the JSP pages, images and SQL scripts used during the setup of OpenCms. After you finished setup it is a good idea to remove this folder completely. |
WEB-INF/ | This folder contains the web application and most of the interesting files and folders. It is detailed in the table below. |
Details of the folder WEB-INF/
File/Folder | Explanation |
---|---|
classes/ | This folder is initially empty but later filled with classes and classpath resources when you import and publish modules. It also contains the log4j.properties file which is responsible for the log settings in OpenCms. |
cmsshell.sh/bat | Shell script for Linux/Windows to start a shell prompt which gives you access to OpenCms |
cpappend.bat | TODO |
logs/ | The place where OpenCms keeps its log file, opencms.log. You can influence the name and location of this log file by customizing WEB-INF/classes/log4j.properties. |
packages/ | This folder contains a sub folder, modules/, where all ZIP archives of OpenCms modules are stored. The OpenCms setup will make all modules available for installation which it finds here. The module folder is the place where a module ZIP file ends up when you use the "Export Module" function within the OpenCms Administration UI. After the installation of OpenCms you can safely delete the files here. |
config/ | The place where OpenCms stores its configuration files. The files are loaded from here and updated as well if you make changes to the configuration via the Administration UI. |
lib/ | The standard WEB-INF/lib folder. It contains OpenCms's own library dependencies as well as the libraries found in each module's lib directory. |
opencms.tld | A Taglib Descriptor for the OpenCms custom tag library. |
setupdata/ | TODO |
web.xml | Defines the OpenCms servlets. |
Runtime structure
OpenCms requires the servlet container to unpack the WAR file or, if the container does not support this, requires you to deploy OpenCms from an unpacked WAR file. The unpacked deployment is required because OpenCms needs to write to the web application directory from which it is run.
If you deploy opencms.war on Tomcat the web application directory is $CATALINA_HOME/webapps/opencms.
The following folders are created there during setup and during static export of files:
File/Folder | Explanation |
---|---|
export/ | Contains all statically exported files. |
resources/ | Contains resource files, mostly button and icon images, of the workplace and your modules. |
OpenCms creates these folders in order to speed up access to those often needed files.
If you start editing content with OpenCms you will notice that you cannot find the files you see in the Explorer view anywhere on the disk. This is because OpenCms stores all content within its the VFS.
Structure of the VFS
After installation you can find a structure as follows:
File/Folder | Explanation |
---|---|
sites/default | Contains the index.jsp and other documentation accessible by default if you point your browser to the OpenCms context URL (default is: [1]). |
system/galleries | Download, Image, Link, and Table galleries. |
system/handler | Pages for HTTP response codes 404 and 500. |
system/login | Login page. |
system/lost-found | This is (probably) the place where the OOCE integrity check module (available as an extension for money) puts invalid files and folders it finds during check runs in the VFS. |
system/modules | Contains all installed modules. |
system/shared | TODO |
system/workplace | The JSP files, buttons, icons and other files used by OpenCms to create its user interface: the Explorer, the Administration and the Workflow interfaces. |
You can customize all files within the VFS, even the system files which are used by OpenCms itself to render its user interface. Of course, you should be very careful about making changes to system files it can break your system.