Win a copy of Design for the Mind this week in the Design 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