amrita singhal wrote:no it return abstract path because i made it
I don't know what that is supposed to mean. But it's clear from the stack trace that you are passing null to the File constructor.
posted 9 years ago
i create an input tag with file type named "image" in a page
now in this page i got the value using "image" name with getParameter function
as i wrote earlier
s12 returns the path that i will supplied in input tag
here it is images/11.jpg in s12
1) 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.
2) You can't use File I/O to access a file on the client. See the JSP FAQ for the ways that file uploading must be handled.
What it comes down to is that if you want to upload the file from the client to the server you are approaching it completely incorrectly. You can't just get the name of the file and expect the server to be able to read it from the client. Can't happen.
Please see the JSP FAQ entry on file uploading. Anything else is just a waste of your time and everybody else's.