But I am getting a null pointerexception at GOT INPUTSTREAM -**
The filename is a variable which I am passing to the applet through my JSP.
It could be anything like xyz.txt.
I think I am doing all the steps properly but may be I am missing out on something .
Joined: Apr 28, 2004
Well, I am not absolutely sure about it, but this might be the way: You said that your war is in an ear. Try, if you can access a file in your ear this way. If yes, getResource(" to your war") and work away on the returned url.
I know that this is after your deadline, but just as a matter of interest. Will you let us know if it worked?
Best regards, Petr
Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
My impression was that it was the Applet that was trying to load the txt file from the SystemClassLoader, and the applet security rules would certainly stop this from happening. I would have expected a SecurityException rather than a null return value though.