This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

Read excel file from form file tag?  RSS feed

 
chandana nalin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Report post to moderator
How to get real path name using form file tag using servlet??
 
chandana nalin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Report post to moderator


didnt support
 
chandana nalin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Report post to moderator
java.io.FileNotFoundException: itemPriceListnew.xlsx (The system cannot find the file specified)
 
Tim Moores
Saloon Keeper
Posts: 3882
91
  • Mark post as helpful
  • send pies
  • Report post to moderator
In web apps you need to use absolute paths, not relative paths like the code uses here. What's more, the file name passed to the servlet is a client-side file or path, and thus of no use on the server.

As was pointed out to you yesterday, use a file upload library like Apache Commons FileUpload.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66187
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
I've closed this topic so that the discussion can be continued in the original topic on file uploading.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!