access mwClient from the application context

This commit is contained in:
Zlatin Balevsky
2019-12-02 14:12:23 +00:00
parent 3871170e44
commit d1c308f118
3 changed files with 2 additions and 3 deletions

View File

@@ -45,7 +45,6 @@ public class MuWireServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.getSession().setAttribute("mwClient", client);
if (client.needsMWInit()) {
resp.sendRedirect("/MuWire/MuWire.jsp");
} else {

View File

@@ -10,7 +10,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
MuWireClient client = (MuWireClient) session.getAttribute("mwClient");
MuWireClient client = (MuWireClient) application.getAttribute("mwClient");
ConnectionCounter connectionCounter = (ConnectionCounter) client.getServletContext().getAttribute("connectionCounter");
%>
<html>

View File

@@ -10,7 +10,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
MuWireClient client = (MuWireClient) session.getAttribute("mwClient");
MuWireClient client = (MuWireClient) application.getAttribute("mwClient");
ConnectionCounter connectionCounter = (ConnectionCounter) client.getServletContext().getAttribute("connectionCounter");
String persona = client.getCore().getMe().getHumanReadableName();