Help!!!How to test Servlet?
Posted by ~Ray @ 2008-01-01 21:06:41
how to evaluate servlet with the label below in method doPost or doGet,doPost(HttpServletRequest req,HttpServletResponse resp){DataInputStream dis =null;String data="";dis = new DataInputStream(req getInputStream());data=dis readUTF();// readInt(),readBoolean() ,etc may appliedSystem out println("data:"+data);}if i label req getParameter("param"); then i wrote test programm like this communicate setParameter("param","something");the servlet can get the value my question is ,how can i test the code above?how to set the input value so that the HttpServletRequest object can read the data?
Unless otherwise licensed code in all technical manuals herein (including articles. FAQs samples) is provided under this. [ADVERTHERE]Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237613
0 Comments:
No comments have been posted yet!
|