Hello,
Have a few doubts regarding applet-servlet communication.Will some one pl help?
(1) Is there any advantage in using
applet as front-end for communication with
servlet over say
JSP? If so what are they? and when should you use an applet/JSP?
(2) I am using an applet as front-end and has got two buttons ,"Register" and "Get Details". It sends a serialised object to the servlet.
(i) Now, in the servlet,how can i find out which button has been
clicked in the applet?(like getParameter("Register") method, using
request object, is there any way to determine which one has been
clicked in applet?)
(ii) How can you pass a parameter to the constructor when the object is
deserialised in the servlet?(because you will be using
ObjectInputStream and then casting it, to get back the object.)
(3) What is the difference between ServletOutputStream and PrintWriter?
(4) Can Hashtable and Vectors be serialised properly?
(5) Is is enough to have just one connection to database to cater to all the requests that comes to a servlet?ie. do you need one connection each for every request that ask for data from datatbase or only a single connection that the servlet may create in init()?
(6) Whats the difference between service(HttpServletRequest...) and doPost(HttpServletRequest.....)/doGet(HttpServletRequest.....)?When do you use them?
Thanks very much
gthri