access mwClient from the application context
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user