0 Replies Latest reply on Jul 15, 2009 9:12 AM by Jerry62712

    Newbie - how do I access a servlet

    Jerry62712 Level 1

      I check the archives here before I post and I found this by Levancho:


      <mx:HTTPService id="yourd" url="yourContextpath/yourServlet.do" method="POST" result="yourResultHandler(event)" />

      so you should have mapping in web.xml for yourServlet.do
      (assuming you have .do mapping for servlets if not whatever you have ...)

      an thats it,

      P.S yourServlet.do should return response as xml.


      I don't think I understand this responce.  The servlet is at the web page ("youContextPath") and is a java servlet (.do).  I don't need a result to my application from it.  It's function will be to do these three lines of code:


      OutputStreamWriter out = new OutputStreamWriter (response.getOutputStream());


      This will write a stream of data formatted as XML.  It's not written to a file or database, just to the outputstream.


      My goal is to 1) learn how to include a servlet and 2) learn how to put it in a test environment.