Why would you post a new topic when we already have a conversation
here?. Do you want to waste the community's time having someone else answer questions we've already covered?
I already answered why this doesn't work in your previous topic:
As for this code:
You don't tell us where your image is located. In your previous topic, I told you that you needed to package the image with your web application. Did you do that? The
javadoc for Class explains the rules the class loader uses to find a resource.