troubleshooting Question

path of file is cannot identified while img uploading servlet

Avatar of emsysindia
emsysindia asked on
JavaScriptWeb ServersWeb Applications
3 Comments1 Solution308 ViewsLast Modified:
I m using a jsp file for image upload  and forwording the paths to a servlet class.
But in servlet class the file name is retrieving(like aa.jpg), but the complete path of file is not showing.
<FORM action="ImageUpload"
enctype="multipart/form-data" >
<INPUT type="hidden" name="ID" value="1">
<TD ALIGN="center">
<input type="text" name="companyId" id="ppp">
<input type="hidden" id="aaa" >
Filename: <INPUT type="file" name="submitfile1" size="40">
Filename:<INPUT type="file" name="submitfile2" size="40">
Filename:<INPUT type="file" name="submitfile3" size="40">
<TD ALIGN="center">
<input type="submit" onClick="aaa();">
<INPUT type="reset">
request.getParameter("submitfile1");  //prints only file name(aa.jpg) not complete path(like D:\BackUp\MyPrograms\images\aa.jpg)
plz help, this is an urgent issue.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros