I am new in Servlets, please help. I got File Not found issue, I am sure I have a gif file C:\temp\new1.gif. Please see the errors and the codes below.
java.io.FileNotFoundException: C:\app\eclipse-jee-juno-win32\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Images\C:\temp\new1.gif (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
Bear Bibeault wrote:Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.
I've gone ahead and added the code tags for you. See how much easier the code is to read?
I am sorry, will use code tags next time.
Joined: Jun 25, 2012
Bear Bibeault wrote:getRealPath() is used to find the actual path of a resource that is within the web app.
As you already have a full and absolute path to the file, it's not needed.