This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am trying to set up a simple mail server, when some one sign up i want a servlet to be invoked which give the form for a new user and when he log's in the mail box should open. but my confusion is how on the press of a button (ie and applet button) while i perform this task. please me with this query. thanks .
Inside the Applet, u instantiate a URL object by passing the url of the servlet which is going to handle the request as a parameter. Invoke a method called open request on the URL object which would give u URLConnection Object. Using connection object, get input & output streams and then write into the stream the datas which u want to pass to the servlet. I would give u the code (frame work) URL url = new URL("servlet url"); URLConnection con = url.openConnection(); OutputStream out = con.getOutputStream(); out.write("date to be sent"); Does this clears ur doubt?
Hi, Applet to servlet communication is a great way (and more pure Java) to reproduce 2 components of the model-view-controller. Take a look at the following article for a good overview, with code, on how to do it. I won't repeat it by writing any more here! http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html Good luck T