private void sendPersistenceDisabledError(ToadletContext ctx) throws ToadletContextClosedException, IOException {
String title = l10n("awaitingPasswordTitle"+(uploads ? "Uploads" : "Downloads"));
if(core.node.awaitingPassword()) {
PageNode page = ctx.getPageMaker().getPageNode(title, ctx);
HTMLNode pageNode = page.outer;
HTMLNode contentNode = page.content;
HTMLNode infoboxContent = ctx.getPageMaker().getInfobox("infobox-error", title, contentNode, null, true);
SecurityLevelsToadlet.generatePasswordFormPage(false, container, infoboxContent, false, false, false, null, path());
addHomepageLink(infoboxContent);
writeHTMLReply(ctx, 500, "Internal Server Error", pageNode.generate());
return;
}
if(core.node.isStopping())
sendErrorPage(ctx, 200,
l10n("shuttingDownTitle"),
l10n("shuttingDown"));
else
sendErrorPage(ctx, 200,
l10n("persistenceBrokenTitle"),
l10n("persistenceBroken",
new String[]{ "TEMPDIR", "DBFILE" },
new String[]{ FileUtil.getCanonicalFile(core.getPersistentTempDir()).toString()+File.separator, core.node.getDatabasePath() }
));
}