Paul Clapham wrote:You do have to specify the applet's classpath (via the "archive" attribute of the <applet> tag, I think). Presumably you set up the classpath in Netbeans, now you have to do that for your HTML as well.
Hare Shiva wrote:in jsp portion i wrote this code
i m using netbeans so i build that applet project and pasted it in my web page.Other applet project i did worked in the same way.Do you know any other method of sending image.If then please post codes.I m beginner in java and i really need to complete it soon.
Paul Clapham wrote:
Hare Shiva wrote:in jsp portion i wrote this code
i m using netbeans so i build that applet project and pasted it in my web page.Other applet project i did worked in the same way.Do you know any other method of sending image.If then please post codes.I m beginner in java and i really need to complete it soon.
And now we can all see that the "archive" attribute does not mention the jar which contains Apache HttpClient. So fix that. Make sure that the jar is in your web application, preferably in the same folder as the apptesting.jar, so that it can be downloaded to the client.
And no, we don't post code here. Read our FAQ entry DoYourOwnHomework which explains why we don't do that.
Andrew Thompson
http://pscode.org/
Andrew Thompson wrote:Are you the same person that asked this question on SO?
Paul Clapham wrote:I suppose it might help if you stopped using the invalid URL "http://localhost:8080//test//Uploader" and corrected it to "http://localhost:8080/test/Uploader", but I suspect that isn't your problem.
However I don't know what your problem is. You didn't say whether any exceptions were being thrown -- so tell us that. And you said your servlet wasn't being run, but you didn't say whether the applet was even connecting to the servlet -- so tell us that. It's no use telling us what should have happened -- tell us what actually happened instead.
Hare Shiva wrote:I dont know how to see exception when applet runs in web browser.
Paul Clapham wrote:
Hare Shiva wrote:I dont know how to see exception when applet runs in web browser.
You'll see a "Java" icon in your taskbar (I'm correct in assuming you're using Windows, right?). Double-click that and look in the Java console, that's where System.out and System.err go, along with errors which you don't catch.
I'm not looking at your code because if something works in Setup A but not in Setup B then it's probably something to do with the configuration and not the code.
Paul Clapham wrote:
Hare Shiva wrote:I dont know how to see exception when applet runs in web browser.
You'll see a "Java" icon in your taskbar (I'm correct in assuming you're using Windows, right?). Double-click that and look in the Java console, that's where System.out and System.err go, along with errors which you don't catch.
I'm not looking at your code because if something works in Setup A but not in Setup B then it's probably something to do with the configuration and not the code.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |