From d94e99c8cf32f9f81bef340f20962afb5fbb4b68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Oct 2010 14:05:07 +0200 Subject: [PATCH] Get form password only once. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")); -- 2.7.4