• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to read file

 
Jherald Lacambra
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i read file from my jsp
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at java.util.File.

There is one limitation to using File. If you're deploying your app as a packed war, it's contents won't be accessible as a file. In that case, you would want to use ServletContext.getResource or getResourceAsStream.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the I/O forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!