This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Get "Browsed File Path"?

 
meruva surendra
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want exact file path of uploaded file.Help Me...

My code is like this

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
Upload_Csv_Form ucf=(Upload_Csv_Form)form;
File file=ucf.getFile();


Advance Thanks,
 
Rakesh Keerthi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you can try



here 'file' is the object/instance you create for File(sorry for my bad explanation, you would understand from below example).



and call this file object with getAbsolutePath() method as shown in my Answer's 3rd line.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!