package net.mybluemix.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.util.Enumeration;

/**
 * Servlet implementation class SimpleServlet
 */
@WebServlet("/SimpleServlet")
public class SimpleServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;

    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
        String fullMessage = "Hello World from Gearoid!\n";
        System.out.println(fullMessage);
        Enumeration headerNames = request.getHeaderNames();
		while (headerNames.hasMoreElements()) {
			String key = (String) headerNames.nextElement();
			String value = request.getHeader(key);
			fullMessage += "Header Key: " + key + ", Header Value: " + value;
			System.out.println("Header Key: " + key + ", Header Value: " + value);
		}
		response.getWriter().print(fullMessage);
    }

}

@@ -1266,12 +1266,578 @@
 );%0A    %7D
+%0A%09%0A%09/**%0A     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)%0A     */%0A    @Override%0A    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A        response.setContentType(%22text/html%22);%0A        Enumeration headerNames = request.getHeaderNames();%0A%09%09while (headerNames.hasMoreElements()) %7B%0A%09%09%09String key = (String) headerNames.nextElement();%0A%09%09%09String value = request.getHeader(key);%0A%09%09%09System.out.println(%22Header Key: %22 + key + %22, Header Value: %22 + value);%0A%09%09%7D%0A    %7D
 %0A%0A%7D%0A

Update SimpleServlet.java