Hi,
Okay I have been now successfully been able to read the parameters given from a client program invoked on the command prompt in a servlet and give out the result in the console.I can do that by using a URL class and invoking the servlet in this way from the client program:-
URL url = new URL("http://localhost:8080/servlet/MyServlet?param1=A¶m2=B¶m3=C");
In servlet code I use(to read those parameters):-
String param1 = new String();
param1 = req.getParameter("param1");
..
***Now the Problem is :-***
I am able to run the program successfly the first time but if I run the program a second time or change the parameters in the client(recompile & then run),I don't get the result.Only if I stop & then re-start my servlet engine(which is on the server side),I am able to run this correctly.
Can anyone please let me know what is the problem?
Thanking you,
Ashwin