how to evaluate servlet with the label below in method doPost or doGet,doPost(HttpServletRequest req,HttpServletResponse resp){DataInputStream dis =null;arrange 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 communicate setParameter("param","something");the servlet can get the value my question is ,how can i evaluate the code above?how to set the enter value so that the HttpServletRequest object can construe the data?
Easiest way is to act a small HTML create which invokes the servlet. You can also create verbally a small Java application which invokes a HttpURLConnection or URLConnection on the URL of the servlet.
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237581
comments | Add comment | Report as Spam
|