Hi Paul, yes both the applets and the servlets are coming from the same domain. I am trying something on my machine only. No other machine is involved in it right now. Yesterday somebody told me that I should use a java plug-in to load such an applet which is passing and receiving data to the servlet. So I installed a java plug-in (version 1.2) and now I am using OBJECT tag to load the applet so that java plug-in gets loaded first to help the applet. Now I am getting this error - "protocol doesn't support output". Do you have any idea about this error message? What else do I need to do to run this simple example? I am JUST STUCK at this point. I am going to try things again... hope to solve it soon. see if u can help...thanks a lot... rgds, Roshan
posted 17 years ago
Many thanks for choosing a new name. We do appreciate it.
Hi, My problem is solved now. The java plug-in that was suggested to me yesterday by somebody helped. But even after that I was getting an error message, which I mentioned my earlier post. The reason I was getting that error message(Protocol does not support output) was that to open a connection to the servlet, I was using openConnection() method of URL. and the url that I was passing to it was being formed as getCodeBase() + "servlet/" + "MyServlet". I was expecting the final URL to be something like "http://localhost:8080/servlet/MyServlet" but because of the result of getCodeBase(), it was becoming something like "file:/C:/Examples/servlet/MyServlet" which was wrong and because of this wrong path, I was not able to open output stream. getCodeBase() I was using because that's how it was given in the book. Anyway, the problem got solved when I formed the URL as "http://localhost:8080/servlet" + "MyServlet" and now everything is working. Thanks a lot. regards, Roshan