<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thoughts Electrique &#187; OpenCms</title>
	<atom:link href="http://www.sebastian.himberger.de/blog/tag/opencms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sebastian.himberger.de/blog</link>
	<description>Sebastian Himbergers blog about technology and software development</description>
	<lastBuildDate>Sat, 16 Jul 2011 22:48:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Overview of OpenCms Resourcetype IDs</title>
		<link>http://www.sebastian.himberger.de/blog/2010/02/13/overview-of-opencms-resourcetype-ids/</link>
		<comments>http://www.sebastian.himberger.de/blog/2010/02/13/overview-of-opencms-resourcetype-ids/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 23:37:46 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[OpenCms]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=598</guid>
		<description><![CDATA[I constantly forget the resource type IDs of the OpenCms resource types and then have to dig into the configuration to find them. So here is a list of all resource type IDs of the OpenCms core. Maybe it is useful to someone else. List of resource type IDs Resourcetype ID Comment Folder 0 OpenCms [...]]]></description>
			<content:encoded><![CDATA[<p>I constantly forget the resource type IDs of the OpenCms resource types and then have to dig into the <a title="opencms-vfs.xml" href="http://cvs.opencms.org/viewvc.cgi/opencms/webapp/WEB-INF/config/opencms-vfs.xml?revision=1.57&amp;view=markup" target="_blank">configuration</a> to find them. So here is a list of all resource type IDs of the OpenCms core. Maybe it is useful to someone else.</p>
<h3><span id="more-598"></span>List of resource type IDs</h3>
<table style="border: 1px solid #333333;">
<thead>
<tr>
<th>Resourcetype</th>
<th>ID</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>Folder</td>
<td>0</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Plain Text File</td>
<td>1</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Binary File</td>
<td>2</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Image</td>
<td>3</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>JSP File</td>
<td>4</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Pointer</td>
<td>5</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>XmlPage</td>
<td>6</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Generic XmlContent</td>
<td>7</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Image Gallery</td>
<td>8</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>DownloadGallery</td>
<td>9</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Link Gallery</td>
<td>10</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Html Gallery</td>
<td>11</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>Table Gallery</td>
<td>12</td>
<td>OpenCms Core</td>
</tr>
<tr>
<td>TemplateOne Microsite</td>
<td>19</td>
<td>Template One</td>
</tr>
<tr>
<td>TemplateOne E-Mail Form</td>
<td>60</td>
<td>Template One Form</td>
</tr>
<tr>
<td>TemplateOne News</td>
<td>30</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template One FAQ</td>
<td>35</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template One Event</td>
<td>40</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template One Job</td>
<td>45</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template One Linklist</td>
<td>50</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template One Layout</td>
<td>51</td>
<td>Template One Modules</td>
</tr>
<tr>
<td>Template Two Preset</td>
<td>70</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Config</td>
<td>71</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Textbox</td>
<td>72</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Listbox</td>
<td>73</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Style</td>
<td>74</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Options</td>
<td>75</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Linkbox</td>
<td>76</td>
<td>Template Two</td>
</tr>
<tr>
<td>Template Two Search</td>
<td>77</td>
<td>Template Two</td>
</tr>
</tbody>
</table>
<p>I have not included other Open Source modules or the OAMP suite. I may update this list later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2010/02/13/overview-of-opencms-resourcetype-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decentralized categories in OpenCms 7.5</title>
		<link>http://www.sebastian.himberger.de/blog/2009/11/06/decentralized-categories-in-opencms-7-5/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/11/06/decentralized-categories-in-opencms-7-5/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 19:33:26 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[CRE]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=417</guid>
		<description><![CDATA[This feature was presented by Michael Emmerich during the OpenCms Days 2009 and caused a lot of people to grab their pen. A short background on categories Categories are a built-in content relation in OpenCms and allow files in the VFS to be assigned one or more topics/keywords/whatever. They can often be used as a [...]]]></description>
			<content:encoded><![CDATA[<p>This feature was presented by <a href="http://www.opencms-days.org/en/program/sessions/t8.html" target="_blank">Michael Emmerich during the OpenCms Days 2009</a> and caused a lot of people to grab their pen.</p>
<h3>A short background on categories</h3>
<p><em>Categories </em>are a built-in content <em>relation</em> in <em>OpenCms</em> and allow files in the <em>VFS</em> to be assigned one or more topics/keywords/whatever. They can often be used as a replacement feature for siblings which are mostly misunderstood by users without a technical background. For example consider the typical example of a news site. You have a folder structure for your articles which could be the following way:</p>
<pre>/articles/2008/12-24-merry-christmas.html
/articles/2009/09-01-new-site.html
/articles/2009/10-02-a-great-article.html</pre>
<p>You now want to categorize the articles into topics so you would create another folder structure:</p>
<pre>/topic/must-read
/topic/technical</pre>
<p>The <em>sibling-way</em> would be to create a sibling (put simply: an automatically updating copy) of the articles in the desired <em>topic</em> folder. While this is a working solution it&#8217;s counterintuitive to most users. OpenCms 7 introduced the long awaited <em>Content Relation Engine</em> (<em>CRE</em>) including a default relation called categories. Similar to the sibling solution a category is effectively a folder but instead of creating it anywhere in the filesystem it&#8217;s created in the root site (&#8220;/&#8221;) under <em>/system/categories/.</em> Users can now assign categories to VFS files using the context-menu entry <em>Relations -&gt; Assign Categories</em>. This is a much easier approach although it has one caveat: Categories are globally defined in the <em>/system/</em> folder and can therefore only be created by users with access to the root site and can not be specified on a per site or even per folder basis. This can cause problems in multisite environments.</p>
<h3>Decentralization to the rescue</h3>
<p>With OpenCms 7.5 this limitation is finally gone. You can now define categories on a per-site and even per-folder basis. Simply create a folder named <em>_categories</em> in the folder where you want the categories to be available. Then create new folders inside this folder to define categories. The categories are available in the parent folder of the <em>_categories</em>-folder and all subfolders. They also cascade down. Example:</p>
<pre>/de/_categories/
/de/_categories/hot-topic
/de/_categories/support
/de/news/_categories/
/de/news/_categories/marketing
/de/news/_categories/development</pre>
<p>Inside the <em>/de/</em> folder the categories <em>hot-topic</em> and <em>support </em>are available. Inside<em> /de/news/</em> the categories <em>hot-topic</em>, <em>support</em>, <em>marketing</em> and <em>development</em> are available.</p>
<p>This feature should easily help you to get your content structured more nicely. Speaking from experience it is crucial to create an evolveable content structure upfront so your editors as well as visitors and search engines get the most out of your site.</p>
<p>See also:</p>
<ul>
<li><a href="http://www.opencms.org/en/events/opencms_days_2008/program/sessions/t2.html" target="_blank">Presentation from Michael Moossen about the CRE at OpenCms Days 2008</a></li>
<li><a href="http://www.w3.org/Provider/Style/URI" target="_blank">A guide to good URI design</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/11/06/decentralized-categories-in-opencms-7-5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to log in a user of a specified OpenCms OU</title>
		<link>http://www.sebastian.himberger.de/blog/2009/10/12/how-to-log-in-a-user-of-a-specified-opencms-ou/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/10/12/how-to-log-in-a-user-of-a-specified-opencms-ou/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 20:01:54 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[OU]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=538</guid>
		<description><![CDATA[I recently had to login a user of a specified OU (Organizational Unit) through a JSP. This is done by simply prepending the username with the path to the OU. Example: I want to login the user &#8220;foo&#8221; of the OU &#8220;/germany/marketing&#8220;. Simple specify the String &#8220;/germany/marketing/foo&#8221; as a username and you&#8217;re all set.]]></description>
			<content:encoded><![CDATA[<p>I recently had to login a user of a specified OU (Organizational Unit) through a JSP. This is done by simply prepending the username with the path to the OU.</p>
<p><strong>Example</strong>: I want to login the user &#8220;<em>foo</em>&#8221; of the OU &#8220;<em>/germany/marketing</em>&#8220;. Simple specify the String &#8220;<em>/germany/marketing/foo</em>&#8221; as a username and you&#8217;re all set.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/10/12/how-to-log-in-a-user-of-a-specified-opencms-ou/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCms Days 2009 (part 2)</title>
		<link>http://www.sebastian.himberger.de/blog/2009/06/27/opencms-days-2009-part-2/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/06/27/opencms-days-2009-part-2/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 15:43:08 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[OpenCms-Days]]></category>
		<category><![CDATA[Report]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=409</guid>
		<description><![CDATA[This is the continued report from the OpenCms Days 2009. If you haven&#8217;t read the first part you might as well read it first. The second day started with the keynote of Joel Tosi and I think this was one of the best talks of the conference (although his question totally took me by surprise [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-431" title="OpenCms Days Logo" src="http://www.sebastian.himberger.de/blog/wp-content/uploads/2009/06/logo_opencmsdays_2rows_2009_1103127930.png" alt="OpenCms Days Logo" width="160" height="79" align="left" /></p>
<p style="margin-bottom: 0cm;">This is the continued report from the <a title="OpenCms Days 2009" href="http://www.opencms-days.org" target="_blank">OpenCms Days 2009</a>. If you haven&#8217;t read the <a title="First part of the article" href="http://www.sebastian.himberger.de/blog/2009/06/18/opencms-days-2009-part-1/">first part you might as well read it first</a>.</p>
<p style="margin-bottom: 0cm;">The second day started with the <strong>keynote of Joel Tosi</strong> and I think this was one of the best talks of the conference (although his question totally took me by surprise since I had had no coffee yet).<br />
Joel took a very critical view on enterprise software and support claims and explained some of the benefits they get from OpenCms at the <a title="CME Group" href="http://www.cmegroup.com/" target="_blank">CME</a>.<br />
I especially liked that he presented very concrete information of implementation and business (numbers &amp; figures)  and also think taking the seriousness out of some enterprise label was really good.I saw many people smiling knowingly throughout the whole presentation. You rarely have a talk which is informative and also entertaining.</p>
<p style="margin-bottom: 0cm;"><span id="more-409"></span></p>
<p style="margin-bottom: 0cm;">After the keynote I watched a presentation by <strong>Pedro del Valle and Pedro Antón Alonso about the relaunch of spain.info</strong> and the creation of a tourist information portal for Spain (portals where all over the place at this conference). I personally didn&#8217;t expect to get very much out of this talk but I gladly admit that I could not have been more wrong.<br />
The presented solution showed some integrations which I had already developed (like the Google maps integration) and I was relieved that they took a similar route on implementation. I liked their argument that it&#8217;s best to put the information where the consumer is. They e.g. plan to publish the videos out to a dedicated YouTube channel. This is something I always suggested to my customers but often had a hard time selling. Mention this project will hopefully convince other people to take this route.<br />
There were a lot of questions afterwards and I think this was also one of the best talks of the conference.</p>
<p style="margin-bottom: 0cm;">After this talk I unfortunately started coding for the <a href="http://www.sebastian.himberger.de/comp/projects/opencms/scripting-integration/">scripting integration</a> on my laptop (sorry to all the speakers who saw this – This was not because I wasn&#8217;t interested but I somehow got into the flow and then wanted to push back my changes to sourceforge. You hopefully know this feeling and I hereby apologize). I might have missed some content in the following presentations.</p>
<p style="margin-bottom: 0cm;"><strong>Georgi Naplatanov presented the JPA driver for OpenCms</strong> and although there was confusion because of some figures, he has done a great job. There seemed to be some performance problems with JPA/OpenJPA and MySQL but Florian Hopf, Claus Priisholm and Dan Liliedahl all mentioned that these might be gone if one uses Hibernate instead of OpenJPA. I hope someone is trying this out.<br />
There was also the question of using this driver to run OpenCms on Google App Engine. So if anyone of the asking people is reading this: Please have a look at <a href="http://www.sebastian.himberger.de/blog/2009/06/24/opencms-and-google-app-engine/">my Blog post</a>. I think having JPA at hand is a big win for OpenCms. Especially if you plan on writing modules which introduce new database tables. Doing so with the current drivers is especially hard since you have to target all supported databases manually. At least if you want to be portable.</p>
<p style="margin-bottom: 0cm;">In the third session <strong>Alejandro Alves</strong> showcased <strong>some modules the <a title="Spanish OpenCms Community" href="http://www.opencmshispano.es" target="_blank">Spanish OpenCms community</a> has developed</strong>. I was impressed by the sheer amount of the modules. Especially the forum seems big.<br />
I like that he obviously used a real project for demoing the modules. This gave a good impression of the solutions other people develop with OpenCms. Often discussions tend to be very abstract and seeing some real world examples helps to get a feel for the solution. It occurred to me that there&#8217;s a lot of development going on in the Spanish world. I wish I would speak the language.</p>
<p style="margin-bottom: 0cm;">The last session of the conference I watched was done by <strong>Michael Emmerich about the Alkacon OAMP modules</strong>. I&#8217;ve not used the OAMP modules a lot so it was a really great opportunity to see everything in action and get some insider tips on how to customize them. Michael sure did a great job with this.<br />
I was most impressed by the DocCenter module because this was something I had to develop for a customer before and spent a lot time doing so (If it had just been open sourced by then&#8230;  &#8211; my solution was a lot worse).</p>
<p style="margin-bottom: 0cm;">There was a <strong>panel discussion</strong> at the end but I got sidetracked by trying to recover my sourceforge login. The questions were interesting but unfortunately it seemed that everyone (including myself) was already tired and so no real audience interaction came up.<br />
Maybe I should have saved some questions for this event because I already asked all the panel members everything that interested me during the first two days and there seemed no point in doing so again.<br />
It was interesting that the point of documentation (one of last years hot topics) didn&#8217;t came up very often. I think we can give credits to Dan who wrote a fantastic book about OpenCms 7 development and all the people who contributed to the wiki. I guess the documentation issue has been solved for the most part.<br />
The lack of a large set of available modules was also mentioned but it seemed to me that there&#8217;s a lot in the pipeline and maybe just needs to be presented better. It also feels like the module space is a bit fragmented. Often companies put their modules out  under their own namespace which makes it relatively unattractive for other companies to contribute. I think having something similar to the OAMP suite but on sourceforge or google code would help. Companies could still be mentioned as a sponsor and therefore get some publicity out of it.<br />
What might also be nice would be a higher level template/content framework to help people getting up to speed more quickly. But this might be coming with the advanced direct edit functionality which is planned for version 8 and was explained in Alexanders keynote.</p>
<p style="margin-bottom: 0cm;"><strong>To sum up everything</strong>: I think the OpenCms Days 2009 were great! I had a lot of fun although I&#8217;m very exhausted by the time of writing this draft. I met a lot of extremely nice and fun people. Thank you all for the good time. I&#8217;m looking forward to seeing you again. I think I missed to say a proper goodbye to some of you. This was just because I got somehow lost on my way out and then everyone seemed to be gone already.</p>
<p style="margin-bottom: 0cm;">See you in 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/06/27/opencms-days-2009-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSP to download OpenCms resources as a ZIP</title>
		<link>http://www.sebastian.himberger.de/blog/2009/06/25/jsp-to-download-opencms-resources-as-a-zip/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/06/25/jsp-to-download-opencms-resources-as-a-zip/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:09:38 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[Sourcecode]]></category>
		<category><![CDATA[ZIP]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=443</guid>
		<description><![CDATA[What often bugged me is that I can upload a set of files into OpenCms as a ZIP file but can not download a tree of files as such (without the use of the database export feature). I had hacked together this little JSP some time ago. It allows you to dynamically download a set [...]]]></description>
			<content:encoded><![CDATA[<p>What often bugged me is that I can upload a set of files into OpenCms as a ZIP file but can not download a tree of files as such (without the use of the database export feature). I had hacked together this little JSP some time ago. It allows you to dynamically download a set of OpenCms resources as a ZIP file.</p>
<p>The JSP has no interface since I mainly use it for development. Simply create a JSP somewhere in the OpenCms VFS and then open the file via the browser. E.g.:</p>
<p>&#8220;http://workplace.com/system/createzip?<strong>source</strong>=<em>/system/modules/foo</em>&amp;<strong>filename</strong>=<em>foo-module.zip</em>&#8221;</p>
<p>The <strong>source</strong> parameter specifies which directory to zip up and the <strong>filename</strong> parameter which filename to use for the generated file. You can only zip up resources with a total size of 10 megabytes. This is mainly to prevent OutOfMemory errors to happen. You can easily increase the size by altering the variable <strong>maxSourceSize</strong> to any value you need.</p>
<p>If you find any bugs or want to give feedback simply leave a comment or send me an email.</p>
<p><span id="more-443"></span></p>
<pre class="file">&lt;%@page import="org.opencms.util.*,
                org.opencms.jsp.*,
                org.opencms.file.*,
                java.util.*,
                java.io.*,
                java.util.zip.*
" %&gt;&lt;%

// Maximum filesize to prevent OutOfMemory errors
long maxSourceSize = 1024*1024*10; // 10 Megabytes

// The filename to use as output
String filename = request.getParameter("filename");

// The directory to zip
String source = request.getParameter("source");

if (CmsStringUtil.isEmpty(filename) || CmsStringUtil.isEmpty(source )) {
  // Ensure that all parameters are given
  throw new IllegalArgumentException("Please specify the 'source' and the 'filename' parameter");
}

if (!source.endsWith("/")) { source = source + "/"; }

CmsJspActionElement cmsa = new CmsJspActionElement(pageContext,request,response);
CmsObject cmso = cmsa.getCmsObject();
List zipResources = new ArrayList();

// Collect all the resources
CmsResource sourceResource = cmso.readResource(source);
if (!sourceResource.isFolder()) {
  throw new IllegalArgumentException("Please specify a folder to zip");
}
List cmsResources = cmso.readResources(source,CmsResourceFilter.DEFAULT);
for (Iterator i = cmsResources.iterator(); i.hasNext();) {
  zipResources.add(i.next());
}

// Create the zip file
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zipfile = new ZipOutputStream(bos);

long currentSize = 0;
for (Iterator i = zipResources.iterator(); i.hasNext(); ) {
  CmsResource res = (CmsResource) i.next();

  currentSize += res.getLength();
  if (currentSize &gt; maxSourceSize) {
    // Ensure that we don't zip up too much
    throw new RuntimeException("Source size is bigger than: " + (maxSourceSize/1024) + " kilobytes");
  }

  String sourcePath = cmso.getRequestContext().getSitePath(res);
  String targetPath = sourcePath;
  if (targetPath.startsWith(source)) {
    targetPath = targetPath.substring(source.length());
  }

  //out.println("Zipping " + sourcePath + " as " + targetPath + "&lt;br/&gt;");
  if (res.isFile()) {
  ZipEntry zipentry = new ZipEntry(targetPath);
  zipfile.putNextEntry(zipentry);
      CmsFile file = cmso.readFile(res);
      zipfile.write(file.getContents(),0,file.getLength());
  }
}

zipfile.close();
byte[] content = bos.toByteArray();

response.setContentType("application/octet-stream");
response.setContentLength((int)content.length);
response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"" );

response.getOutputStream().write(content,0,content.length);
response.getOutputStream().flush();

%&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/06/25/jsp-to-download-opencms-resources-as-a-zip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCms and Google App Engine</title>
		<link>http://www.sebastian.himberger.de/blog/2009/06/24/opencms-and-google-app-engine/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/06/24/opencms-and-google-app-engine/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 10:07:44 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenCms]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=415</guid>
		<description><![CDATA[Especially with the new JPA driver for OpenCms by Georgi Naplatanov the question of running OpenCms on Google App Engine came up quite often at the OpenCms Days 2009. I had the same Idea when I first heard of the Java support for App Engine and did some quick research on how to do this. [...]]]></description>
			<content:encoded><![CDATA[<p>Especially with the new JPA driver for OpenCms by Georgi Naplatanov the question of running OpenCms on <a title="AppEngine Java page" href="http://code.google.com/intl/de-DE/appengine/docs/java/overview.html" target="_blank">Google App Engine</a> came up quite often at the OpenCms Days 2009. I had the same Idea when I first heard of the Java support for App Engine and did some quick research on how to do this. The research showed that running OpenCms on Google App Engine would require a huge rewrite of some OpenCms core functionalities.</p>
<p><span id="more-415"></span></p>
<p>The problem with OpenCms and App Engine is that the applications on App Engine run in a restricted sandbox which limits what you can do in terms of Java API functionality. There&#8217;s also a JRE whitelist which limits the classes you can access in your application. If you look at the scalability model promoted by App Engine these limitations make a lot of sense but unfortunately they make running OpenCms on there nearly impossible. You can find a<a href="http://code.google.com/intl/de-DE/appengine/docs/java/runtime.html"> detailed description of the App Engine runtime at Google code</a>. The main problems are:</p>
<ul>
<li><strong>No filesystem access: </strong>OpenCms uses the filesystem for some very important tasks:
<ul>
<li>The JSP files are exported into the WEB-INF directory to be executable. This means there could be no dynamic updates or adds of JSP files through the workplace.</li>
<li>The configuration is stored in the filesystem and dynamically updated if e.g. the search configuration is updated or a module is installed. The configuration would have to be stored in the database.</li>
<li>The search index is stored in the filesystem. This could be circumvented if a Lucene database store like the one shipped with <a href="http://www.compass-project.org/" target="_blank">Compass </a>is used. Nevertheless this would have to be implemented.</li>
</ul>
</li>
<li><strong>No threading:</strong> OpenCms makes uses of threading for scheduled tasks, publishing and other tasks. Since App Engine doesn&#8217;t allow threads this would have to be implemented otherwise.</li>
<li><strong>Response-Time-Limit: </strong>App Engine imposes a time limit to handle request on the application. Escpecially the publishing mechanism in OpenCms causes very long response times. These parts would have to be rewritten.</li>
<li><strong>Persistent data has to be stored in the datastore</strong>: OpenCms uses an in memory HashMap to store the locking information (file locks). This makes it difficult to cluster OpenCms and also limits the use in Googles App Engine. This also affects the Flex-Cache: Publishing events would have to be propagated and I&#8217;m not sure if this would work with App Engine (comments are very welcome on this point).</li>
</ul>
<p>I had a short talk with Alexander about this topic and it at least seemed to us that making OpenCms run on the App Engine would be an enormous task and is currently not worth doing without excessive sponsoring.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/06/24/opencms-and-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCms Days 2009 (part 1)</title>
		<link>http://www.sebastian.himberger.de/blog/2009/06/18/opencms-days-2009-part-1/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/06/18/opencms-days-2009-part-1/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 13:30:43 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[OpenCms-Days]]></category>
		<category><![CDATA[Report]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=407</guid>
		<description><![CDATA[After two days of information overflow the OpenCms days 2009 are finally over. I think they were a success and personally got a lot value out of them. We had a small get together on Sunday evening with a nice diner and some Kölsch. I think it&#8217;s always nice to meet some people before the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="padding: 5px" title="OpenCms Days Logo" src="http://www.sebastian.himberger.de/blog/wp-content/uploads/2009/06/logo_opencmsdays_2rows_2009_1103127930.png" alt="OpenCms Days Logo" width="160" height="79" align="left" /></p>
<p style="margin-bottom: 0cm;">After two days of information overflow the <a title="Official website of the OpenCms Days" href="http://www.opencms-days.org" target="_blank">OpenCms days 2009</a> are finally over. I think they were a success and personally got a lot value out of them.</p>
<p style="margin-bottom: 0cm;">We had a small get together on Sunday evening with a nice diner and some <a title="Kölsch at Wikipedia" href="http://en.wikipedia.org/wiki/K%C3%B6lsch_(beer)" target="_blank">Kölsch</a>. I think it&#8217;s always nice to meet some people before the conference so you can already connect to some people. We stayed out rather long and I was back at the hotel around 3:00 AM, but it was a lot of fun. I had many interesting talks and met a lot of very nice people. If you&#8217;re thinking of attending the OpenCms Days 2010, I would really recommend to come on sunday evening so you don&#8217;t miss this event.</p>
<p style="margin-bottom: 0cm;"><span id="more-407"></span></p>
<p style="margin-bottom: 0cm;">The first day started with a short welcome and <strong>Alexander Kandziors keynote</strong>. I enjoyed the keynote a lot and I liked that Alex actually presented the new features and not only talked about them. I haven&#8217;t had time to play with the 7.5 version (which <a title="OpenCms 7.5 release notes" href="http://www.opencms.org/en/news/090615_v750_available.html" target="_blank">was released on the same day</a> – I guess a case of conference driven development <img src='http://www.sebastian.himberger.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) but it sure looks very promising. The announcement of the workflow functionality in version 8 caused some amusement and I think it has become a running gag over the years.<br />
But to be fair: I can understand that Alkacon can&#8217;t develop the feature without proper sponsoring. It is a big project and therefore needs to be well funded. I personally don&#8217;t think it is really important feature-wise but more a point to survive checklist driven evaluation. Most of the people I talked to don&#8217;t seem to have real use cases for it.<br />
The announcement of the scripting support surprised me a bit (positively) but I&#8217;m looking forward to working together with Alkacon. I had a short talk with Alex about it on the last day and I&#8217;m confident that we can get something done. The conference actually inspired me to commit some changes to my module but I will blog about these on another day.</p>
<p style="margin-bottom: 0cm;">My second session was about the <strong>new galleries and the advanced widget configuration</strong>. It was presented by <strong>Andreas Zahner</strong> and I think he did a great job of pointing out some lesser known features. I also liked that they are using JSON for the widget configuration and the demonstration of the decentralized categories caused a lot of people to grab their notebook and a pen. The new galleries looked very nice and I am very fond of the tab feature for the xmlcontent editor.</p>
<p style="margin-bottom: 0cm;">The next session was <strong>Andy Savin</strong> about the <strong>usage of OpenCms at the university of Bath</strong>. I enjoyed this session a lot even despite the fact that it was placed in the business track <img src='http://www.sebastian.himberger.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Andy explained their migration path to OpenCms including the evaluation and presented some of the new features they developed. For example using macros in the HTML editor to automatically insert address information.<br />
After the session I walked up to Andy and asked him if they use caching for the rendered content because I had done some similar functionality and couldn&#8217;t get caching to work. His denial really relieved me.<br />
I also liked his argumentation that using a single (configurable) template is often better than many templates with small differences. I share this viewpoint and agree wholeheartedly.</p>
<p style="margin-bottom: 0cm;">After a short break <strong>Dan Liliedahl</strong> explained how they <strong>integrated <a title="Official Liferay website" href="http://www.liferay.com" target="_blank">Liferay</a> and OpenCms</strong>. I was looking forward to this talk because I enjoyed Dan&#8217;s talk at the OpenCms Days 2008 a lot. I like his calm and professional style of presenting. You can tell that he has done a lot of presentations before. He showed how they developed a SOAP webservice to let Liferay access the OpenCms VFS via HTTP. He also presented how the content was prepared to be easily themed by liferays theming system.<br />
It struck me that many people have developed some kind of remote access to the VFS (mostly via webservices) and that this would probably be something to develop a module for (which I think Dan wants to do). I think the webdav servlet could deliver something like a REST (which seems to be in everybodies mouth right now) based interface to the OpenCms VFS but it seemed to me that no one is really using the webdav feature. Also it would be nice to have some kind of a JSON interface to the content.<br />
At lunch Dan explained this solution in more detail and now I&#8217;m looking forward to his module. It seems to be a trend to use OpenCms as a content repository nowadays. This was also reflected in a short poll Alex did to find out if OpenCms should either support <a title="JSR 170 specification" href="http://jcp.org/en/jsr/detail?id=170" target="_blank">JSR-170</a> or <a title="CMIS at Wikipedia" href="http://en.wikipedia.org/wiki/Content_Management_Interoperability_Services" target="_blank">CMIS </a>(which I had never heard of) in the future. It seems to me that CMIS is still in an early stage but already has a lot of important vendors in the process. The fact that it&#8217;s not tied to the Java language is also a nice bonus. This could allow good integration with other web frontends (for example PHP based ones). I think it is an option that should be seriously considered.</p>
<p style="margin-bottom: 0cm;">The last talk of the first day was about the <a title="Official IKS website" href="http://www.iks-project.eu/" target="_blank"><strong>IKS project of the European Union</strong></a> in which OpenCms/Alkacon participate. <strong>Andreas Gruber</strong> seemed very knowledgeable and explained the reasoning and structure of the IKS project and their concept of a complete stack for the semantic web.<br />
Although I already had some experience with RDF/OWL and <a title="Microformats website" href="http://microformats.org/" target="_blank">microformats</a> I had a hard time following the first part because it was relatively abstract. I think this may well be because the project is still in the requirements gathering phase and therefore had no concrete components to showcase. The second part when he presented the microformats by example and got down to the technical stuff. I was finally able to get the whole picture.<br />
One interesting thing he mentioned afterwards was the eventual development of components to process an existing corpus of content and annotating it automatically with semantic information (like finding addresses or names in plain text/html and marking them up). If the project is successful it will be very useful for content management and the semantic web movement in the long run. I still believe it&#8217;s hard to convince the casual content creator of the value of semantic web and helping him to do so correctly. But I think the project is looking into this direction also.</p>
<p style="margin-bottom: 0cm;">The <strong>conference dinner</strong> in the evening was a nice opportunity to talk to some people and find out that many people are facing the same problems as myself. This is something I really enjoyed throughout the whole conference. There was no marketing show going on and people seemed to be very honest about their development. I personally often get fooled by self confident blog posts or marketing based presentation and come to the believe that I&#8217;m the only one having problems understanding certain things or making mistakes. Hearing that others are struggling too is always very comforting. For me this meta-information is one of the most valuable things because it is helping me to understand where I&#8217;m standing professionally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/06/18/opencms-days-2009-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Restrict visibility of OpenCms templates to certain folders</title>
		<link>http://www.sebastian.himberger.de/blog/2009/06/03/restrict-visibility-of-opencms-templates-to-certain-folders/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/06/03/restrict-visibility-of-opencms-templates-to-certain-folders/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 15:51:26 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=401</guid>
		<description><![CDATA[Since I&#8217;m currently working on an OpenCms mutli site solution I was looking for a possibility to restrict the available templates of a site. I know this can be done via permissions but the manual implementation of this is rather painful. I&#8217;m currently in the process of extending the OpenCms security manager to take care [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m currently working on an OpenCms mutli site solution I was looking for a possibility to restrict the available templates of a site. I know this can be done via permissions but the manual implementation of this is rather painful. I&#8217;m currently in the process of extending the OpenCms security manager to take care of this but while doing this I found an (to me) unknown feature.</p>
<p>By usage of the property <em>folders.available</em> (you might have to define it first) on a template you can specify a list of comma seperated folders in which the template is available (in the dropdown).</p>
<p>Unfortunately this property works only on file level and can not be inherited via the folder hierarchy. Also it does not provide a secure solution since the template can always be set via the advanced property dialog.</p>
<p>But you never know when a feature could come in handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/06/03/restrict-visibility-of-opencms-templates-to-certain-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My OpenCms Days 2009 program: Day 1</title>
		<link>http://www.sebastian.himberger.de/blog/2009/04/03/my-opencms-days-2009-program-day-1/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/04/03/my-opencms-days-2009-program-day-1/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 15:51:18 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[OpenCms-Days]]></category>
		<category><![CDATA[Schedule]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=387</guid>
		<description><![CDATA[From June 15 to 16 the OpenCms Days 2009 are happening in Cologne. I really had a great time last year so for me the decision to go was a no-brainer. Unfortunately I had no time to prepare a session this year but having a quick look at the program tells me it may be [...]]]></description>
			<content:encoded><![CDATA[<p>From June 15 to 16 the <a title="Official OpenCms Days website" href="http://www.opencms-days.org" target="_blank">OpenCms Days 2009</a> are happening in Cologne. I really had a great time last year so for me the decision to go was a no-brainer. Unfortunately I had no time to prepare a session this year but having a quick look at the program tells me it may be better because I can enjoy even more great sessions (doing a session by myself was very exhausting and I only survived it because of Arash Kaffamanesh&#8217;s constant water devlivery <img src='http://www.sebastian.himberger.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) Here are my must-see sessions:</p>
<p><span id="more-387"></span></p>
<h2>Day 1</h2>
<h3>Slot 1</h3>
<h4><a href="http://www.opencms-days.org/en/program/sessions/t1.html">Advanced XML Content &amp; Widget Configuration</a></h4>
<p>Andreas is doing a session about XML Content configuration and some new features in the 7.5 series. While the title sounded extremely boring to me (sorry Andreas) the abstract convinced me that I have to see this session. I know Andreas is a <em>real </em>OpenCms professional so I expect it to be a great session. I really want to see this session now.</p>
<h3>Slot 2</h3>
<p>I really don&#8217;t know which session I want to see more. The <a href="http://www.opencms-days.org/en/program/sessions/t2.html">SAP NetWeaver integration</a> looks pretty advanced and interesting but since I&#8217;m not an SAP-person I don&#8217;t know how much I can get out of it. I remember meeting <a href="http://www.opencms-days.org/en/speakers/andy_savin.html">Andy Savin</a> (<a href="http://www.opencms-days.org/en/program/sessions/b2.html">University of Bath: Boldly going where others fear to tread&#8230;</a>) last year and he told me he was looking forward to my session (which I found very encouraging). We also talked a bit about how they use OpenCms at the university. It all sounded really interesting so I think I will propably watch this session.</p>
<h3>Slot 3</h3>
<h4><a href="http://www.opencms-days.org/en/program/sessions/t3.html">Integrating OpenCms with Liferay Portal Server</a></h4>
<p>I met Dan last year and remember him as an extremely friendly and professional person. I&#8217;m looking forward to meeting him again. I enjoyed his session last year a lot and will certainly watch this one too. The topic looks very promising since OpenCms and Liferay seem like a perfect match. Can&#8217;t wait to see it.</p>
<h3>Slot 4</h3>
<h4><a href="http://www.opencms-days.org/en/program/sessions/t4.html">The Interactive Knowledge Stack (IKS) Project and OpenCms</a></h4>
<p>The semantic web is something I was always interested in. I really don&#8217;t know anything about IKS but it sounds very interesting to me. I thought about integrating RDF based metadata into OpenCms before but never had the time to implement it. I think this is going to be very interesting.</p>
<p><strong>To sum up it all up:</strong> To me the OpenCms Days 2009 look very promising. I hope I will see a few familiar faces and I&#8217;m looking forward to meeting new people.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/04/03/my-opencms-days-2009-program-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCms Apache integration: The simplest solution</title>
		<link>http://www.sebastian.himberger.de/blog/2009/03/11/opencms-apache-integration-the-simplest-solution/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/03/11/opencms-apache-integration-the-simplest-solution/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 17:28:09 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[OpenCms]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=353</guid>
		<description><![CDATA[My OpenCms Apache Integration Howto for OpenCms 6 still get&#8217;s a lot of visitors. Many things have changed since I first wrote this howto and certainly things are a lot easier now. I always wanted to rewrite the howto but till then I will just publish a short update on how to integrate OpenCms 7 [...]]]></description>
			<content:encoded><![CDATA[<p>My <a title="OpenCms Apache Integration Howto" href="/comp/tutorials/opencms/apache-integration/" target="_blank">OpenCms Apache Integration Howto for OpenCms 6</a> still get&#8217;s a lot of visitors. Many things have changed since I first wrote this howto and certainly things are a lot easier now. I always wanted to rewrite the howto but till then I will just publish a short update on how to integrate OpenCms 7 with Apache and to remove the <em>/opencms</em> prefix with the most recent software.</p>
<p><span id="more-353"></span></p>
<h3>Prerequisites</h3>
<ul>
<li>OpenCms 7 (already installed)</li>
<li>Apache HTTPD 2.2 with mod_proxy_ajp</li>
<li>Apache Tomcat 5.5+</li>
</ul>
<h3>Goal of the setup</h3>
<ul>
<li>Dynamic content served from http://www.yourdomain.com/</li>
<li>Static content served from http://www.yourdomain.com/opencms/export/</li>
</ul>
<h3>Steps to perform</h3>
<h4>Configure Tomcat</h4>
<p>As described in the Howto you have to add the <em>emptySessionPath=&#8221;true&#8221;</em> attribute to the Tomcat AJP Connector in the <em>server.xml</em>:</p>
<pre class="file">&lt;Connector <strong>emptySessionPath="true"</strong> port="8009" protocol="AJP/1.3" /&gt;</pre>
<h4>Configure OpenCms</h4>
<p>You have to modify the <em>opencms-importexport.xml</em> configuration file. But beware the <em>&lt;rfs-prefix&gt;</em> doesn&#8217;t need changing anymore. In fact: Things won&#8217;t work if you change it the old way. These are the settings you want.</p>
<pre class="file">       &lt;rfs-prefix&gt;${CONTEXT_NAME}/export&lt;/rfs-prefix&gt;
       &lt;vfs-prefix&gt;&lt;/vfs-prefix&gt;</pre>
<p>Don&#8217;t forget to restart OpenCms.</p>
<h4>Configure Apache HTTPD</h4>
<p>Since the AJP Connector is now integrated in mod_proxy you don&#8217;t need the (stupid) rewrite rules anymore. I also got rid of the fact that static content is served from Apache. This has several reasons:</p>
<ol>
<li>The new Tomcat is fast enough to serve static content itself. Espcecially with the NIO / APR Connector.</li>
<li>If you ever want to move the Tomcat to a different machine and use Apache HTTPD as a simple load balancer things get a lot easier if Apache doesn&#8217;t need access to the web application files.</li>
</ol>
<p>Here&#8217;s an example virtual host:</p>
<pre class="file">&lt;VirtualHost *:80&gt;

  ServerName yourdomain.com
  DocumentRoot /some/directory

  &lt;Proxy ajp://localhost:8009*&gt;
     Allow from all
  &lt;/Proxy&gt;

  ProxyPass        /opencms/   ajp://localhost:8009/opencms/
  ProxyPassReverse /opencms/   ajp://localhost:8009/opencms/

  ProxyPass /          ajp://localhost:8009/opencms/opencms/
  ProxyPassReverse /   ajp://localhost:8009/opencms/opencms/

&lt;/VirtualHost&gt;</pre>
<p>This is it. Don&#8217;t hesitate to ask questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/03/11/opencms-apache-integration-the-simplest-solution/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
	</channel>
</rss>

