@@ -0,0 +1,1414 @@
+/*%0D%0A * Created on May 5, 2005%0D%0A *%0D%0A * TODO To change the template for this generated file go to%0D%0A * Window - Preferences - Java - Code Style - Code Templates%0D%0A */%0D%0Apackage edu.wustl.common.struts;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.io.ObjectOutputStream;%0D%0A%0D%0Aimport javax.servlet.ServletException;%0D%0Aimport javax.servlet.http.HttpServlet;%0D%0Aimport javax.servlet.http.HttpServletRequest;%0D%0Aimport javax.servlet.http.HttpServletResponse;%0D%0A%0D%0Aimport org.apache.struts.Globals;%0D%0Aimport org.apache.struts.action.ActionMessages;%0D%0A%0D%0A/**%0D%0A * @author kapil_kaveeshwar%0D%0A *%0D%0A * TODO To change the template for this generated type comment go to%0D%0A * Window - Preferences - Java - Code Style - Code Templates%0D%0A */%0D%0Apublic class ResponseServlet extends HttpServlet%0D%0A%7B%0D%0A%09/* (non-Javadoc)%0D%0A%09 * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)%0D%0A%09 */%0D%0A%09protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1)%0D%0A%09%09%09throws ServletException, IOException%0D%0A%09%7B%0D%0A%09%09doPost(arg0, arg1); %0D%0A%09%7D%0D%0A%09%0D%0A%09protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException%0D%0A%09%7B%0D%0A%09%09ActionMessages messages = (ActionMessages)req.getAttribute(Globals.MESSAGE_KEY);%0D%0A%09%09res.setContentType(%22BI%22);%0D%0A%09%09ObjectOutputStream oos = new ObjectOutputStream(res.getOutputStream());%0D%0A%09%09oos.writeObject(messages);%0D%0A%09%09oos.close();%0D%0A%09%7D%0D%0A%7D%0D%0A

Use to send a response of HTTP API call