This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileNotFoundException with relative path

 
Dhannya Zacharia
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having an action class and inside my action class i want to refer to an html file in the following directory : webContent/templates/check.html.

I am able to access this file if i specify absolute path, but when i give relative path, it gives a FileNotFoundException.

How do i solve this?

Thanks...
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to do this through the ServletContext



Mark
 
Dhannya Zacharia
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic