From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 12:05:07 +0000 (+0200) Subject: Get form password only once. X-Git-Tag: 0.1-RC1~489 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d94e99c8cf32f9f81bef340f20962afb5fbb4b68;p=Sone.git Get form password only once. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 8063019..2e11b35 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -136,9 +136,10 @@ public class WebInterface extends AbstractService { */ private void registerToadlets() { TemplateFactory templateFactory = new SoneTemplateFactory(l10n()); + String formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword(); Template loginTemplate = templateFactory.createTemplate(createReader("/templates/login.html")); - loginTemplate.set("formPassword", sonePlugin.pluginRespirator().getToadletContainer().getFormPassword()); + loginTemplate.set("formPassword", formPassword); PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/"); pageToadlets.add(pageToadletFactory.createPageToadlet(new LoginPage(loginTemplate, this), "Login"));