• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getResource method

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Java API has the follwing for
ServletContext.getResource(String path)-
Returns a URL to the resource that is mapped to a specified path. The path must begin with a "/" and is interpreted as relative to the current context root.
This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a .war file.
---
How does the path parameter look for a remote file system?
Thanks,
Aruna
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before someone gets mad at me again for asking questions that are too basic
I think I am getting mixed up between the absolute, root-relative and non-root-relative URIs and absolute and realtive paths. In my original question, we are talking about paths, not URIs. Absolute paths start with "/" where as relative paths can be some thing like "../../blah blah".
So, I think I figured it out.
Aruna.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic