throws ServletException, IOException
{
// Get the repository
ServletContext sc = getServletContext();
WebContentRepositoryRegistry reg = WebContentRepositoryRegistry.getInstance();
WebContentRepository wcr = reg.getRepository(sc);
if (wcr == null) {
error(request, response, "No content repositories found. <br>" +
"Please contact your system administrator for assistance.");
return;
}
// Fetch the content node for the "x-apps" directory under "system". If
// "x-apps" isn't there, then create it.
ContentCollection xAppsCollection = null;
try {
ContentCollection sysRoot = wcr.getSystemRoot();
ContentNode xappsNode = sysRoot.getChild("x-apps");
if (xappsNode == null) {
xappsNode = sysRoot.createChild("x-apps", Type.COLLECTION);
}
xAppsCollection = (ContentCollection)xappsNode;