Help!!!How to test Servlet?
Posted by ~Ray @ 2008-01-01 21:06:41
how to test 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 code req getParameter("param"); then i wrote test programm like this request setParameter("param","something");the servlet can get the value my question is ,how can i test the label above?how to set the input determine so that the HttpServletRequest disapprove can construe 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!
|