JavaServer Page

November 28, 2006

Once the import is complete, the Ok button

Filed under: OpenCms 6 — webmaster @ 1:15 am

I want to import all of this into OpenCms so that I can manage it from the Workplace. The first thing to do is set up the target folders in OpenCms. I have created a new folder (named unimaginatively old-site) in the explorer view. The old site has an image file, a downloadable file and a link to an external website (in index.html), so OpenCms will need galleries for each of these content types. For that reason, I have created an image gallery (old-site/imagegal), a download gallery (old-site/downloads) and an external link gallery (old-site/links), all inside of the old-site directory. In Chapter 3 we covered creating folders and galleries. The old-site folder looks like this: Now that the VFS is set up to handle the import, we can go back to the Database Management screen in the administration view. Clicking on the Extended HTML Import button loads the import tool:

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

Once the import is complete, the Ok button

Filed under: OpenCms 6 — webmaster @ 1:15 am

Type in the complete path to the site that will be imported in the first field on the form, File system folder. The files must exist in the file system of the server running OpenCms. Unfortunately, there is no button for browsing the file system. You will need to type in the exact location (i.e. the absolute path, for example C:folder in Windows or /var/www on UNIX) to the main folder that contains the website. The second field, Destination in OpenCms, refers to the VFS. When the files are imported, they will be placed in this folder. You can type the path in by hand, but this field (like the next three fields) has a folder icon which, when clicked, brings up a file browser. The Image gallery, External link gallery, and Download gallery fields should all point to galleries in the VFS. While importing, OpenCms will store images, links, and downloads in these galleries, instead of putting them with the HTML files in the folder specified in the Destination in OpenCms field.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

Once the import is complete, the Ok button

Filed under: OpenCms 6 — webmaster @ 1:15 am

Once the import is complete, the Ok button at the bottom of this screen will become active. Clicking it will return you to the Database Management screen. Switching to the explorer view, we can see the imported files: Since these files are all new, they are marked as new and unpublished (blue text, red flag). We have seen how to export files from the VFS and how to import them using tools accessed from the Database Import/Export Tools section of the Database Management screen. There are two other tools that can be accessed from the Additional Tools section of the same screen, the Extended HTML Import screen and the Start Static Export screen. Extended HTML Imports In my experience, one of the biggest headaches in migrating a website to a content management system is getting all of the old information loaded into the new server. OpenCms provides a tool to ease the pain. The Extended HTML Import screen can be accessed from the Database Management screen in the administration view. It can be used to read through a collection of HTML files stored in the local file system, parse the files and then import the content (images and all) into OpenCms. The import tool is designed to handle a moderately sized website, but in this example, we will be importing a very small site, which has two web pages, an image and a downloadable file. The site, stored on the server’s file system, looks like this: mbutcher@locahost:~$ ls -R old-site/ old-site/: images/ index.html penguin.html penguin.zip old-site/images: penguin.jpg mbutcher@localhost:~$

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

November 27, 2006

If you take a look inside the file,

Filed under: OpenCms 6 — webmaster @ 8:26 pm

The Import File from Server screen is used to import from the same folder that the Export Database screen is used to export to. This is very convenient when it comes to restoring OpenCms from a backup. The Import File from Server screen has drop-down list with the names of all the ZIP files in the export folder: Simply select the desired export file and click Ok. OpenCms will then import the files. These files will appear in the VFS organized in the same way as they were on the server from which they were exported. The imported version is considered definitive. Thus, if an imported file has the same name as a file already in the VFS, the imported file will always replace the other file. If an import file is identical to a file already in the VFS, the file will be marked as modified, so importing a file may result in a number of unchanged files being marked as modified. Once the files have been imported, they work just like all other OpenCms files. While the Import File from Server screen is indispensable for recovering from failures, it is not always convenient for uploading content from another server. The file must be moved from the remote server to the correct location on the desired server before it can be imported. Sometimes it is more convenient to import content from your local workstation to the server over the network. This can be accomplished with the Import File with HTTP screen. Importing a File with HTTP The Import File with HTTP screen can also be accessed from the Database Management screen. This screen is used to load a file from the local file system (the file system of the machine on which the web browser is running). It uses HTTP (Hypertext Transfer Protocol the protocol for requesting and retrieving web pages) to send the file from a local machine to the server. The Import File with HTTP screen looks like this:

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

If you take a look inside the file,

Filed under: OpenCms 6 — webmaster @ 8:26 pm

You can either type in the path to the desired file in the Filename text field or click the Browse… button to navigate to the file in your local file system. Once you have found the file, click Ok to upload it to the OpenCms server. OpenCms will immediately import the file, showing you the status of the import as it goes.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

If you take a look inside the file,

Filed under: OpenCms 6 — webmaster @ 8:26 pm

If you take a look inside the file, you may be surprised at what you find. At the root of the export folder, there is a file called manifest.xml, which contains information about everything (files, folders, users, and all) exported from the database. This file is generated automatically during the export process. Many of the files appear very differently in the export than in the Workplace. For example, all the HTML files are actually XML files containing not only the HTML generated by the WYSIWYG editor but also additional information about the hyperlinks and images used in the document. Why do the files appear this way? Because they are exact copies of what is in the database. When you view these files in the Workplace, or when OpenCms displays these files for the browser, the server has already manipulated these files, formatting them for presentation. But when OpenCms exports files, it exports them in their raw format. This is done so that these files can be re-imported into OpenCms without losing any important information. The Export Database screen is used to export data so that it can be re-used by OpenCms. If you want to generate processed (ready to view) content, you should use OpenCms’s static export tool, which is covered below. So far, we have looked at the process of exporting the contents of the VFS from the database to a set of files compressed into a ZIP file stored on the file system. In the example above, I showed how to back up the entire VFS. Of course, the export tool is useful for more than just backing up files. It can also be used to move content from one OpenCms server to another. For example, we could create a folder full of content on one OpenCms server and then export just that folder. If we have a folder, /site/default/editorials, on one OpenCms server and want to move it to another OpenCms server, we should start by creating a new export containing only the contents of /site/default/editorials. Now we have two different ways of loading the content into the desired OpenCms. We can either do a local import or import the file over the network. Both of these tasks can be accomplished from the Database Management screen. Importing a File from the Server The first button in the Database Import/Export Tools section is called Import File from Server. The Import File from Server screen is used to look for ZIP files in the export folder $CATALINA_HOME/webappas/opencms/WEB-INF/packages. So the first step when importing a file is to place the desired file in that folder.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

The contents of an export are determined in

Filed under: OpenCms 6 — webmaster @ 3:04 pm

Beneath the Export settings section is the Resources to export section. By default, this has one field, the Resource text field. However, you can add more text entry fields by clicking on the green plus sign to the right this field. For example, below is an image with two resource fields. (The Resource field is relabeled Resource [1], and the new field is labeled Resource [2].) These fields are used to specify which files and folders to export. You can either type in the path, or you can click on the file folder icon to the right of the text input and navigate to the desired file or folder. By using various combinations of the Export settings screen’s fields, you can be highly selective as to what data are exported. Once the desired configuration is set, clicking the Ok button will begin the export process. An export of the complete VFS can take a long time, as even a default installation of OpenCms has many megabytes of data stored in the VFS especially in the /system folder.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

The contents of an export are determined in

Filed under: OpenCms 6 — webmaster @ 3:04 pm

A complete backup of my relatively empty OpenCms instance (with the Include system folder box checked) still exported over 3,400 files, and the resulting ZIP file was over seven megabytes in size. Once the export has finished, you can click the Ok button at the bottom of the screen to return to the Database Management screen. But where is the exported file? Exported files are stored in the server’s file system in one of the directories within the OpenCms web application. In our case, export files are written to the folder $CATALINA_HOME/ webapps/opencms/WEB-INF/packages.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

The contents of an export are determined in

Filed under: OpenCms 6 — webmaster @ 3:04 pm

The contents of an export are determined in part by the project from which the export is run. If the current project is the Offline project, then the export process will look at all the files in that project. If the current project is Online, then only the published files in the Online project will be stored in the exported file. Custom projects (such as the Playground project that we created in Chapter 3) are considered sub-projects of Offline, so exports run from these projects should be the same as exports run from the Offline project. In the Export settings section, there are three checkboxes and one optional field. The first checkbox is Include unchanged files. If this box is unchecked, then only files that are marked as changed (added or modified) will be exported, but if the box is checked (the default), then files will be exported regardless of whether they are marked as changed. Information about folders is always exported, regardless of their publishing state. If a project containing only one changed file is exported, information about all of the folders (even those that contain no changed data) is exported. When the second checkbox, Include account data, is checked, user and group information is exported as well, but webusers are not exported. If you have a large number of webusers, you should not use the Export Database screen to protect their account data. The third checkbox, Include system folder, determines what parts of the VFS will be exported. As you may recall from Chapter 3, content is stored in site folders located in the /sites folder. By default, there is only one site, located (aptly) in the folder /sites/default. If the Include system folder checkbox is unchecked, then only files in the current site will be exported. However, OpenCms stores valuable data (including OpenCms modules and the Workplace files) in different parts of the VFS. For example, modules are stored in /system/modules, and the Workplace files are stored in /system/workplace. To export the complete VFS, you must check the Include system folder checkbox and switch sites from /sites/default to /. Checking the Include system folder checkbox is not enough to include the system folder, /, in an export. You must also set the Site drop-down list (in the toolbar at the top of the Workplace) to / and enter the appropriate path (usually just /) in the Resource field of the Export Database screen. The last item in the Export settings section is the optional Resource changed since field. Clicking the green plus sign will add a text input field with a calendar icon, which allows you to specify a particular date. Only files modified after that date will be exported. You can either type in the desired date and time information (for example 01/06/2006 03:18 PM), or you can click on the calendar icon, and select the desired date and time from the pop-up calendar widget.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

Webusers cannot be directly added to these groups,

Filed under: OpenCms 6 — webmaster @ 7:40 am

cleaning HTML tags or running java or jsp code. In this section, there are two buttons, Extended HTML Import and Start Static Export. Exporting from the Database First, we will examine the Export Database screen, as we will need to use it before we can do much with the other two tools. The Export Database screen allows you to selectively export resources from the database. You can export all the VFS content (as well as user and group information), or you can export just a selected portion of the VFS, which is then dumped into a zip-compressed file that is stored in the server’s file system. You can make a complete backup of the entire contents of the VFS, including all of the information in the system (root) folder. The screenshot below shows such an export: The first text field, Export file name, is for the name for the ZIP file containing the export. The .zip extension is automatically appended for example, I have entered complete-backup, so my information will be stored in a file called complete-backup.zip.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Discount Web Hosting services

« Previous PageNext Page »

Powered by Java Web Hosting