Author: bstansberry(a)jboss.com
Date: 2008-10-28 13:42:59 -0400 (Tue, 28 Oct 2008)
New Revision: 2012
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java
Log:
Include node's jvmRoute in visual response
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java 2008-10-28
15:42:14 UTC (rev 2011)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java 2008-10-28
17:42:59 UTC (rev 2012)
@@ -21,6 +21,8 @@
*/
package org.jboss.modcluster.demo.servlet;
+import java.io.IOException;
+
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -64,6 +66,7 @@
*/
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
{
HttpSession session = request.getSession(true);
@@ -84,5 +87,12 @@
}
response.setHeader(Constants.NODE_HEADER, (String)
this.getServletContext().getAttribute(JVM_ROUTE));
+
+ this.writeLocalName(request, response);
}
+
+ protected void writeLocalName(HttpServletRequest request, HttpServletResponse
response) throws IOException
+ {
+ response.getWriter().append("Handled By: ").append((String)
this.getServletContext().getAttribute(JVM_ROUTE));
+ }
}