test
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/EventServer.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/EventServer.java
index 32b64cd..611c8dd 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/EventServer.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/EventServer.java
@@ -16,6 +16,8 @@
import javax.servlet.AsyncContext;
import javax.servlet.ServletContext;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@@ -28,7 +30,7 @@
/**
* A Http Servlet to server response streams
*/
-public class EventServer extends DefaultServlet {
+public class EventServer extends HttpServlet {
private static final Logger log = LoggerFactory.getLogger(EventServer.class);
private static ArrayList<String> clientUriList = new ArrayList<String>();
@@ -66,6 +68,18 @@
}
@Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+ try {
+ response.setContentType("text/html");
+ response.setStatus(HttpServletResponse.SC_OK);
+ response.getWriter().println("<h1>Hello World</h1>");
+ response.getWriter().println("session=" + request.getSession(true).getId());
+ } catch (IOException e) {
+ log.error(ExceptionUtils.getFullStackTrace(e));
+ }
+ }
+
+ @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) {
log.info("here doPost");
try {
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/NotificationServer.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/NotificationServer.java
index 8c150e4..a67eb41 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/NotificationServer.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/eventStream/NotificationServer.java
@@ -16,6 +16,8 @@
import javax.servlet.AsyncContext;
import javax.servlet.ServletContext;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@@ -27,10 +29,22 @@
/**
* A HTTP servlet that handles requests for notification streams
*/
-public class NotificationServer extends DefaultServlet {
+public class NotificationServer extends HttpServlet {
private static final Logger log = LoggerFactory.getLogger(EventServer.class);
@Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+ try {
+ response.setContentType("text/html");
+ response.setStatus(HttpServletResponse.SC_OK);
+ response.getWriter().println("<h1>Hello World</h1>");
+ response.getWriter().println("session=" + request.getSession(true).getId());
+ } catch (IOException e) {
+ log.error(ExceptionUtils.getFullStackTrace(e));
+ }
+ }
+
+ @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) {
log.info("Notification stream Inititated");
String clientId = null;