i'm not able to initiate two URLConnection from the same applet. First i call the servet using URLConnection passing some parameter object and getting back the control to the Applet it works fine.
Again when i call a JSP with a URL Connection passing some parameter object, nothing is happenning. I tried using getAppletContext().showDocument(URL) it works fine, but when i call the JSP with URLConnection it doesn't. Can some one tell me what could be the problem. I've coded this in applet start method.
Some things to try:
1. Are you calling URLConnection.disconnect()? If not, perhaps the browser is limiting you to too few sockets and the lingering socket for your previous connection is locking out your second connection. Not likely, but worth a try...
2. Try to do this - open a socket (not a URL connection) to the HTTP server, then try to open a second one before closing the first. Does that work? If you close the first one prior to openning the second one, does that work?
3. What version of Java is your applet running undner? Try a plug-in or a different plug-in and/or browser to see if your results are different.
Hope that helps...
It works now, I have used the same connectiion for both. The JSP is being called by the Applet but control is still in the Applet. i'm not getting the JSP in the browser.
I think the control will still remain in the Applet, reason being it treats URLConnection as a method call and hence the control is back to the Applet